:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
  background: #f6f7f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.eyebrow { margin: 0 0 .2rem; font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 2.2rem); }
.subtitle { margin: .35rem 0 0; color: #6b7280; }

main { width: min(1250px, calc(100% - 2rem)); margin: 1rem auto 3rem; }

.panel {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(140px, 1fr)) minmax(220px, 1.4fr);
  gap: .75rem;
  align-items: end;
}

.field { display: grid; gap: .35rem; min-width: 0; }
label, .sort-panel strong, .view-label { font-size: .82rem; color: #4b5563; }

input, select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: .72rem .8rem;
  background: white;
}

button {
  border: 0;
  border-radius: 10px;
  padding: .72rem .9rem;
  cursor: pointer;
}

button.secondary { border: 1px solid #d1d5db; background: white; }
button.compact { padding: .55rem .7rem; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.sort-panel {
  display: flex;
  align-items: end;
  gap: .75rem;
}
.sort-panel > div { min-width: 180px; }

.view-switch {
  display: grid;
  gap: .35rem;
  justify-items: end;
}

.segmented {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 11px;
  overflow: hidden;
  background: white;
}
.segmented button {
  border-radius: 0;
  background: white;
  padding: .68rem .85rem;
  white-space: nowrap;
}
.segmented button + button { border-left: 1px solid #d1d5db; }
.segmented button[aria-pressed="true"] {
  background: #111827;
  color: white;
  font-weight: 700;
}

.judge-filter {
  position: relative;
}
.judge-filter summary {
  min-height: 45px;
  display: flex;
  align-items: center;
  padding: .72rem .8rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  list-style-position: inside;
}
.judge-filter[open] summary { border-radius: 10px 10px 0 0; }
.judge-filter-menu {
  position: absolute;
  z-index: 30;
  right: 0;
  width: min(360px, 90vw);
  padding: .75rem;
  background: white;
  border: 1px solid #d1d5db;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
.judge-options {
  max-height: 250px;
  overflow-y: auto;
  margin: .6rem 0;
  border-top: 1px solid #eef0f2;
  border-bottom: 1px solid #eef0f2;
}
.judge-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .15rem;
  cursor: pointer;
}
.judge-option input {
  width: auto;
  margin: 0;
}
.judge-option span {
  color: #1f2937;
  font-size: .9rem;
}
.judge-empty { color: #6b7280; font-size: .9rem; }

.summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: .5rem .2rem 1rem;
  color: #6b7280;
  font-size: .9rem;
}
.summary #sync-info { margin-left: auto; }

.status {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-bottom: 1rem;
}
.status.error { font-weight: 600; }

.cancelled {
  display: inline-block;
  margin-left: .45rem;
  font-size: .72rem;
  font-weight: 800;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: .18rem .45rem;
  vertical-align: middle;
}

/* ----- Cartes ----- */
.cards { display: none; }
.card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: .85rem;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
}
.card h2 { font-size: 1.03rem; margin: 0; }
.city { color: #6b7280; margin: .2rem 0 .8rem; }

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.meta-item small {
  display: block;
  color: #6b7280;
  margin-bottom: .1rem;
}
.judge-meta {
  grid-column: 1 / -1;
  padding-top: .25rem;
}

button.follow {
  border: 1px solid #d1d5db;
  background: white;
  white-space: nowrap;
}
button.follow.active { font-weight: 700; }

.card-actions {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}
.card-actions a,
.list-actions a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: .65rem;
}

/* ----- Liste mobile ----- */
.compact-list { display: none; }

.list-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  margin-bottom: .55rem;
  overflow: hidden;
}

.list-item > summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .75rem;
  cursor: pointer;
  list-style: none;
}
.list-item > summary::-webkit-details-marker { display: none; }

.list-date {
  font-weight: 800;
  font-size: .92rem;
}
.list-main {
  min-width: 0;
  display: grid;
  gap: .12rem;
}
.list-main strong,
.list-main small,
.list-judge {
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-main small {
  color: #6b7280;
  font-size: .78rem;
}
.list-judge {
  font-size: .82rem;
  margin-top: .15rem;
}
.list-travel {
  font-weight: 750;
  white-space: nowrap;
  text-align: right;
}
.list-details {
  border-top: 1px solid #eef0f2;
  padding: .8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.list-details small {
  display: block;
  color: #6b7280;
}
.list-details .wide { grid-column: 1 / -1; }
.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.list-actions button,
.list-actions a {
  min-height: 42px;
}

/* ----- Tableau PC ----- */
.table-wrap {
  display: none;
  overflow-x: auto;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}
table { width: 100%; border-collapse: collapse; min-width: 1120px; }
th, td {
  padding: .85rem .8rem;
  text-align: left;
  border-bottom: 1px solid #eef0f2;
  vertical-align: top;
}
th {
  font-size: .78rem;
  color: #6b7280;
  background: #fafafa;
  position: sticky;
  top: 0;
}
td { font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.judges-cell { min-width: 175px; }

.empty {
  background: white;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}

/* Le choix Cartes/Liste appartient à l'utilisateur, pas à la taille de l'écran. */
body[data-view="cards"] .cards { display: block; }
body[data-view="cards"] .compact-list,
body[data-view="cards"] .table-wrap { display: none; }

body[data-view="list"] .cards { display: none; }
body[data-view="list"] .table-wrap { display: block; }
body[data-view="list"] .compact-list { display: none; }

@media (max-width: 1050px) {
  .filters {
    grid-template-columns: 2fr repeat(2, minmax(140px, 1fr));
  }
  .judge-filter-field { grid-column: span 2; }
}

@media (max-width: 850px) {
  .app-header {
    position: static;
    align-items: start;
  }
  .app-header .subtitle { display: none; }

  main { width: min(100% - 1rem, 720px); }

  .filters { grid-template-columns: 1fr 1fr; }
  .filters .search-field,
  .judge-filter-field { grid-column: 1 / -1; }

  .judge-filter-menu {
    position: static;
    width: 100%;
  }

  .toolbar {
    display: grid;
    gap: .85rem;
  }
  .sort-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sort-panel > div { min-width: 0; }
  .sort-panel button { grid-column: 1 / -1; }

  .view-switch {
    justify-items: stretch;
  }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .view-label { display: none; }

  .summary #sync-info { margin-left: 0; }

  body[data-view="list"] .table-wrap { display: none; }
  body[data-view="list"] .compact-list { display: block; }
}

@media (max-width: 520px) {
  .app-header { padding: 1rem; }
  .app-header button { font-size: .82rem; padding: .6rem .7rem; }

  .filters { grid-template-columns: 1fr 1fr; }
  .meta { grid-template-columns: 1fr 1fr; }
  .list-details { grid-template-columns: 1fr 1fr; }
}


/* ----- V5 : compte et synchronisation des favoris ----- */
.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.account-button.connected {
  font-weight: 700;
}

button.primary {
  background: #111827;
  color: white;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

.auth-dialog {
  width: min(520px, calc(100% - 1.5rem));
  border: 0;
  border-radius: 16px;
  padding: 0;
}

.auth-dialog::backdrop {
  background: rgb(17 24 39 / 45%);
}

.auth-dialog-inner {
  padding: 1rem;
}

.auth-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.auth-title-row h2 {
  margin: 0 0 .35rem;
  font-size: 1.2rem;
}

.auth-title-row p {
  margin: 0 0 1rem;
  color: #6b7280;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  padding: .4rem;
  background: white;
  border: 1px solid #d1d5db;
  font-size: 1.4rem;
  line-height: 1;
}

#auth-form {
  display: grid;
  gap: .65rem;
}

#auth-form button {
  min-height: 44px;
}

.auth-help {
  color: #6b7280;
  font-size: .86rem;
  line-height: 1.45;
}

.auth-message {
  min-height: 1.3em;
  margin: .8rem 0 0;
  font-size: .9rem;
}

#favorite-sync-info {
  white-space: nowrap;
}

@media (max-width: 650px) {
  .app-header {
    display: grid;
  }

  .header-actions {
    justify-content: stretch;
  }

  .header-actions button {
    flex: 1;
  }

  #favorite-sync-info {
    white-space: normal;
  }
}


/* ----- V6 : Google Agenda ----- */
.calendar-connect-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin: 1rem 0;
  padding: .85rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.calendar-connect-panel > div {
  min-width: 0;
}

.calendar-connect-panel p {
  margin: .2rem 0 0;
}

.calendar-connect-panel button {
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .calendar-connect-panel {
    display: grid;
  }

  .calendar-connect-panel button {
    width: 100%;
  }
}


/* ----- V6.2 : regroupement visuel par date ----- */
.date-section-title {
  margin: 1.35rem 0 .55rem;
  padding: .55rem .75rem;
  border-left: 4px solid currentColor;
  background: rgba(17, 24, 39, .045);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 800;
}

.date-section-title:first-child {
  margin-top: .15rem;
}

.date-section-row td {
  padding: .65rem .8rem;
  background: #f3f4f6;
  font-weight: 800;
  font-size: .95rem;
  border-bottom: 1px solid #dfe3e8;
}

@media (max-width: 520px) {
  .date-section-title {
    margin-top: 1rem;
    font-size: .95rem;
  }
}


/* ----- V6.3 : groupes de dates robustes mobile ----- */
.date-group {
  margin: 0 0 1.35rem;
}

.date-group-title {
  margin: 1.2rem 0 .65rem;
  padding: .72rem .85rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
}

.date-group:first-child .date-group-title {
  margin-top: .15rem;
}

.date-group-content > :last-child {
  margin-bottom: 0;
}

.app-version {
  margin-left: .45rem;
  color: #9ca3af;
  font-size: .75rem;
  white-space: nowrap;
}

@media (max-width: 850px) {
  .date-group {
    margin-bottom: 1.15rem;
  }

  .date-group-title {
    position: relative;
    margin-top: 1rem;
    padding: .7rem .8rem;
    font-size: 1rem;
    background: #eef1f5;
  }
}


/* ----- V6.4 : Vue calendrier ----- */
.calendar-view {
  display: none;
}

body[data-view="calendar"] .cards,
body[data-view="calendar"] .compact-list,
body[data-view="calendar"] .table-wrap {
  display: none !important;
}

body[data-view="calendar"] .calendar-view {
  display: block;
}

.calendar-shell {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .8rem;
}

.calendar-heading {
  text-align: center;
  min-width: 0;
}

.calendar-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.calendar-heading p {
  margin: .2rem 0 0;
  font-size: .82rem;
  color: #6b7280;
}

.calendar-nav {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.45rem;
  line-height: 1;
}

.calendar-secondary-toolbar {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin: .9rem 0 .75rem;
}

.calendar-holiday-info {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-width: 0;
}

.holiday-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #fff4d6;
  border: 1px solid #f0d890;
  font-size: .78rem;
  font-weight: 650;
}

.holiday-none {
  color: #6b7280;
  font-size: .82rem;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}

.calendar-weekdays {
  margin-bottom: .35rem;
}

.calendar-weekdays span {
  text-align: center;
  padding: .35rem 0;
  font-size: .75rem;
  color: #6b7280;
  font-weight: 700;
}

.calendar-day {
  position: relative;
  min-height: 82px;
  padding: .45rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  text-align: left;
  color: #1f2937;
}

.calendar-day.blank {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day.weekend {
  background: #fafafa;
}

.calendar-day.school-holiday {
  background: #fff9e8;
  border-color: #f0ddaa;
}

.calendar-day.has-contests {
  border-color: #9ca3af;
  box-shadow: inset 0 -3px 0 #4b5563;
}

.calendar-day.has-followed {
  box-shadow: inset 0 -3px 0 #a33b65;
}

.calendar-day.selected {
  outline: 2px solid #111827;
  outline-offset: 1px;
}

.calendar-day.today .calendar-day-number {
  background: #111827;
  color: white;
  border-radius: 999px;
  min-width: 26px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
}

.calendar-day-number {
  font-weight: 800;
  font-size: .92rem;
}

.calendar-day-markers {
  position: absolute;
  left: .42rem;
  right: .42rem;
  bottom: .4rem;
  display: flex;
  justify-content: space-between;
  gap: .25rem;
  align-items: end;
}

.calendar-contest-count,
.calendar-followed-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  min-width: 23px;
  padding: .18rem .35rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}

.calendar-contest-count {
  background: #eef0f3;
}

.calendar-followed-count {
  background: #f8e8ef;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: .75rem;
  color: #6b7280;
  font-size: .78rem;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid #d1d5db;
}

.legend-contest {
  background: #eef0f3;
}

.legend-followed {
  background: #f8e8ef;
}

.legend-holiday {
  background: #fff4d6;
}

.calendar-day-details {
  margin-top: 1rem;
}

.calendar-selected-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin: 0 0 .65rem;
}

.calendar-selected-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.calendar-selected-heading p {
  margin: .15rem 0 0;
  color: #6b7280;
  font-size: .82rem;
}

.holiday-selected {
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #fff4d6;
  border: 1px solid #f0d890;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-contests {
  display: grid;
  gap: .65rem;
}

.calendar-contest {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: .9rem;
}

.calendar-contest-main {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
}

.calendar-contest-main p {
  margin: .18rem 0 0;
  color: #6b7280;
  font-size: .82rem;
}

.calendar-contest-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
  margin-top: .75rem;
}

.calendar-contest-meta small {
  display: block;
  color: #6b7280;
  font-size: .72rem;
}

.calendar-contest-meta strong {
  display: block;
  margin-top: .08rem;
  font-size: .84rem;
  overflow-wrap: anywhere;
}

.calendar-contest-actions {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
}

.calendar-contest-actions a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: .6rem;
}

.calendar-day-empty {
  background: white;
  border: 1px dashed #d1d5db;
  border-radius: 14px;
  padding: 1rem;
  color: #6b7280;
}

.calendar-day-empty p {
  margin: .25rem 0 0;
}

@media (max-width: 850px) {
  .segmented button {
    padding-left: .55rem;
    padding-right: .55rem;
    font-size: .84rem;
  }

  .calendar-shell {
    padding: .7rem;
  }

  .calendar-day {
    min-height: 66px;
    padding: .35rem;
    border-radius: 8px;
  }

  .calendar-day-markers {
    left: .28rem;
    right: .28rem;
    bottom: .28rem;
  }

  .calendar-contest-count,
  .calendar-followed-count {
    min-width: 20px;
    min-height: 20px;
    padding: .12rem .28rem;
    font-size: .65rem;
  }

  .calendar-contest-meta {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-contest-meta span:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (max-width: 520px) {
  .calendar-weekdays,
  .calendar-grid {
    gap: .22rem;
  }

  .calendar-weekdays span {
    font-size: .67rem;
  }

  .calendar-day {
    min-height: 58px;
    padding: .28rem;
  }

  .calendar-day-number {
    font-size: .82rem;
  }

  .calendar-day.today .calendar-day-number {
    min-width: 22px;
    min-height: 22px;
  }

  .calendar-followed-count {
    font-size: 0;
    min-width: 20px;
  }

  .calendar-followed-count::before {
    content: "♥";
    font-size: .72rem;
  }

  .calendar-contest-main {
    display: grid;
  }

  .calendar-contest-main .follow {
    justify-self: start;
  }

  .calendar-contest-meta {
    grid-template-columns: 1fr;
  }

  .calendar-contest-meta span:nth-child(2) {
    grid-column: auto;
    order: initial;
  }

  .calendar-selected-heading {
    align-items: start;
    flex-direction: column;
  }
}


/* ----- V6.5 : vacances colorées + détails en vraie liste ----- */

.calendar-day.school-holiday {
  border-width: 1px;
}

/* Couleurs distinctes par période de vacances */
.calendar-day.holiday-toussaint,
.holiday-chip.holiday-toussaint,
.holiday-selected.holiday-toussaint {
  background: #ffe4cc;
  border-color: #e7a96f;
}

.calendar-day.holiday-noel,
.holiday-chip.holiday-noel,
.holiday-selected.holiday-noel {
  background: #dceeff;
  border-color: #8ebde8;
}

.calendar-day.holiday-hiver,
.holiday-chip.holiday-hiver,
.holiday-selected.holiday-hiver {
  background: #e8e2ff;
  border-color: #afa0e8;
}

.calendar-day.holiday-printemps,
.holiday-chip.holiday-printemps,
.holiday-selected.holiday-printemps {
  background: #dcf3df;
  border-color: #91c99a;
}

.calendar-day.holiday-ete,
.holiday-chip.holiday-ete,
.holiday-selected.holiday-ete {
  background: #fff0b8;
  border-color: #dfc15b;
}

.calendar-day.holiday-generic,
.holiday-chip.holiday-generic,
.holiday-selected.holiday-generic {
  background: #f4ead8;
  border-color: #cab58f;
}

/* Les concours et favoris restent parfaitement visibles sur les fonds colorés */
.calendar-day.school-holiday.has-contests {
  box-shadow: inset 0 -4px 0 #4b5563;
}

.calendar-day.school-holiday.has-followed {
  box-shadow: inset 0 -4px 0 #a33b65;
}

.calendar-holiday-marker {
  display: block;
  margin-top: .3rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .58rem;
  line-height: 1;
  font-weight: 750;
  opacity: .72;
}

/* La liste sous le calendrier réutilise exactement les composants du mode Liste */
.calendar-selected-list {
  display: grid;
  gap: .5rem;
}

.calendar-selected-list .list-item {
  display: block;
}

@media (max-width: 520px) {
  .calendar-holiday-marker {
    font-size: 0;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: .25rem;
    background: rgba(31, 41, 55, .38);
  }

  .calendar-day.school-holiday {
    border-width: 1.5px;
  }

  .calendar-selected-list .list-item {
    margin: 0;
  }
}


.legend-toussaint { background: #ffe4cc; border-color: #e7a96f; }
.legend-noel { background: #dceeff; border-color: #8ebde8; }
.legend-hiver { background: #e8e2ff; border-color: #afa0e8; }
.legend-printemps { background: #dcf3df; border-color: #91c99a; }
.legend-ete { background: #fff0b8; border-color: #dfc15b; }


/* ----- V6.6 : filtre de temps de trajet à double curseur ----- */

.travel-range-field {
  grid-column: 1 / -1;
  padding-top: .15rem;
}

.travel-range-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
}

.travel-range-heading strong {
  font-size: .86rem;
  color: #111827;
  white-space: nowrap;
}

.travel-range-control {
  --travel-min-pct: 0%;
  --travel-max-pct: 100%;
  position: relative;
  height: 34px;
  margin: .05rem .1rem 0;
}

.travel-range-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background:
    linear-gradient(
      to right,
      #e5e7eb 0,
      #e5e7eb var(--travel-min-pct),
      #374151 var(--travel-min-pct),
      #374151 var(--travel-max-pct),
      #e5e7eb var(--travel-max-pct),
      #e5e7eb 100%
    );
}

.travel-range-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  outline: none;
}

.travel-range-input::-webkit-slider-runnable-track {
  height: 7px;
  background: transparent;
}

.travel-range-input::-moz-range-track {
  height: 7px;
  background: transparent;
  border: 0;
}

.travel-range-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8.5px;
  border: 3px solid #374151;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  pointer-events: auto;
  cursor: grab;
}

.travel-range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #374151;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
  pointer-events: auto;
  cursor: grab;
}

.travel-range-input:focus-visible::-webkit-slider-thumb {
  outline: 3px solid rgba(55, 65, 81, .18);
  outline-offset: 2px;
}

.travel-range-input:focus-visible::-moz-range-thumb {
  outline: 3px solid rgba(55, 65, 81, .18);
  outline-offset: 2px;
}

.travel-range-min {
  z-index: 2;
}

.travel-range-max {
  z-index: 3;
}

.travel-range-scale {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-top: -.1rem;
  color: #9ca3af;
  font-size: .68rem;
  line-height: 1;
}

.travel-range-scale span {
  text-align: center;
}

.travel-range-scale span:first-child {
  text-align: left;
}

.travel-range-scale span:last-child {
  text-align: right;
}

@media (max-width: 850px) {
  .travel-range-field {
    grid-column: 1 / -1;
  }

  .travel-range-control {
    height: 42px;
    margin-top: .1rem;
  }

  .travel-range-input {
    height: 42px;
  }

  .travel-range-input::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -10.5px;
  }

  .travel-range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 520px) {
  .travel-range-heading {
    align-items: center;
  }

  .travel-range-heading strong {
    font-size: .82rem;
  }

  .travel-range-scale {
    font-size: .61rem;
  }

  .travel-range-scale span:nth-child(even) {
    visibility: hidden;
  }
}


/* ----- V6.8 : confidentialité ----- */
.app-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.25rem auto 2rem;
  padding-top: .85rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: .82rem;
  color: #6b7280;
}

.app-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-footer a:hover,
.app-footer a:focus-visible {
  color: #111827;
}

@media (max-width: 850px) {
  .app-footer {
    width: min(100% - 1rem, 720px);
  }
}
