/* Styles chargés uniquement sur le comparatif. */
body { min-width: min(20rem, 100%); }

.offer-jump-links {
  --offer-tile-radius: .65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.6rem, 1.4vw, 1rem);
  width: 100%;
  margin-inline: auto;
}

.offer-jump-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: 0;
  min-height: clamp(5.5rem, 9vw, 6.75rem);
  padding: clamp(.65rem, 1.5vw, 1rem) clamp(.4rem, 1vw, .8rem);
  border-radius: var(--offer-tile-radius);
  box-shadow: 0 .2rem .65rem #083b5c05;
  font-size: clamp(.875rem, 1.8vw, 1rem);
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.offer-jump-links a small {
  color: var(--teal);
  font-size: .78rem;
  font-weight: 500;
}

.offer-jump-links a:hover,
.offer-jump-links a[aria-expanded="true"] {
  background: #eff8f6;
  border-color: var(--teal);
  box-shadow: var(--shadow-card);
}

.offer-jump-links a:focus-visible,
.offer-modal-close:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

@media (max-width: 41.999rem) {
  .offer-jump-links a small { display: none; }
}

@media (min-width: 42rem) {
  .offer-jump-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 68rem) {
  .offer-jump-links { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

html.offer-modal-open,
html.offer-modal-open body { overflow: hidden; }

.offer-modal {
  --offer-opening-duration: 1.2s;
  --offer-modal-padding: clamp(1rem, 4vw, 2.5rem);
  position: fixed;
  inset: 0;
  width: min(92%, 52rem);
  height: min(88dvh, 54rem);
  max-width: 92%;
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: clamp(.8rem, 2vw, 1.35rem);
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 1.5rem 5rem #052c4540;
}

.offer-modal[open] { display: flex; flex-direction: column; }
.offer-modal::backdrop {
  background: #052c4580;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.offer-modal-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem var(--offer-modal-padding);
  border-bottom: 1px solid var(--line);
  background: var(--off-white);
}

.offer-modal-head p {
  margin: 0;
  color: var(--teal);
  font-size: clamp(.8rem, 2vw, .95rem);
  font-weight: 700;
}

.offer-modal-close {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: .5rem;
  border: 1px solid var(--line-strong);
  border-radius: .6rem;
  color: var(--navy);
  background: var(--white);
  cursor: pointer;
}

.offer-modal-close:hover { background: #e6f5f0; }
.offer-modal-stage { position: relative; flex: 1; min-height: 0; }
.offer-modal-body { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.offer-modal-body,
.offer-table-scroll,
.engagement-table {
  --offer-scrollbar-track: #edf4f3;
  scrollbar-width: thin;
  scrollbar-color: var(--teal) var(--offer-scrollbar-track);
}

/* Complément pour les navigateurs WebKit sans scrollbar-color. */
.offer-modal-body::-webkit-scrollbar,
.offer-table-scroll::-webkit-scrollbar,
.engagement-table::-webkit-scrollbar { width: .6rem; height: .6rem; }
.offer-modal-body::-webkit-scrollbar-track,
.offer-table-scroll::-webkit-scrollbar-track,
.engagement-table::-webkit-scrollbar-track { background: var(--offer-scrollbar-track); border-radius: 1rem; }
.offer-modal-body::-webkit-scrollbar-thumb,
.offer-table-scroll::-webkit-scrollbar-thumb,
.engagement-table::-webkit-scrollbar-thumb { background: var(--teal); border: 2px solid var(--offer-scrollbar-track); border-radius: 1rem; }
.offer-modal-body::-webkit-scrollbar-thumb:hover,
.offer-table-scroll::-webkit-scrollbar-thumb:hover,
.engagement-table::-webkit-scrollbar-thumb:hover { background: var(--navy); }

.offer-modal-body[inert] { visibility: hidden; }
.offer-modal .offer-detail-card { padding: var(--offer-modal-padding); border: 0; border-radius: 0; }
.offer-modal .offer-detail-card h3 { margin-bottom: .6rem; font-size: clamp(1.6rem, 4vw, 2.25rem); }
.offer-modal .offer-detail-price { color: var(--teal); font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
.offer-modal .offer-detail-card h4 { margin-top: 1.5rem; }
.offer-modal .offer-detail-price { margin-block: 1.5rem 0; }
.offer-modal-actions {
  flex: none;
  padding: clamp(.75rem, 2vw, 1rem) var(--offer-modal-padding);
  padding-bottom: max(clamp(.75rem, 2vw, 1rem), env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--white);
}
.offer-modal-actions:empty { display: none; }
.offer-modal-actions > .button { width: 100%; margin: 0; }

.offer-modal-intro:not([hidden]) {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: offer-intro var(--offer-opening-duration) ease both;
}

.offer-modal-intro p { color: var(--slate); font-size: .9rem; }
.offer-modal-logo { position: relative; width: clamp(9rem, 30vw, 13rem); aspect-ratio: 1; }
.offer-modal-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.offer-modal-logo-ring { animation: offer-logo-ring var(--offer-opening-duration) cubic-bezier(.22, .68, .2, 1) both; }
.offer-modal-logo-graph { animation: offer-logo-graph var(--offer-opening-duration) ease both; }

@keyframes offer-intro {
  0% { opacity: 0; }
  15%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes offer-logo-ring {
  0% { transform: rotate(-280deg) scale(.8); }
  70%, 100% { transform: rotate(0) scale(1); }
}

@keyframes offer-logo-graph {
  0%, 20% { opacity: 0; transform: translateY(12%) scale(.75); }
  65%, 100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .offer-modal { --offer-opening-duration: 0s; }
  .offer-jump-links a { transition: none; }
}
