/* Assistant « Trouver ma sortie » (21/09/2026) — page /trouver-ma-sortie et
   bouton du hero de l'accueil. Utilise les variables de site.css (clair/sombre
   automatiques) ; le bouton du hero garde un bleu nuit fixe, comme sur les apps. */

@property --a-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* ------------------------------------------------------------- Bouton hero */
.hero-assistant { display: flex; justify-content: center; margin-top: var(--sp-6); padding-inline: var(--sp-4); }
.assistant-cta {
  --a-angle: 0deg;
  display: block; width: min(440px, 100%); padding: 2px; border-radius: 999px; text-decoration: none;
  background: conic-gradient(from var(--a-angle), #22d3c8, #2966ff, #8c4df2, #ff6b61, #22d3c8);
  box-shadow: 0 6px 22px rgba(41, 102, 255, .28);
  animation: a-spin 10s linear infinite;
  transition: transform .12s ease, box-shadow .12s ease;
}
.assistant-cta:hover { box-shadow: 0 8px 28px rgba(41, 102, 255, .38); }
.assistant-cta:active { transform: scale(.98); }
.assistant-cta:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.assistant-cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  background: #0a1738; color: #fff; font-weight: 700; font-size: 1rem;
}
.assistant-cta__inner span { flex: 1; text-align: center; }
.assistant-cta svg { flex: none; }
@keyframes a-spin { to { --a-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .assistant-cta { animation: none; } }

/* -------------------------------------------- Pastille flottante (ordinateur) */
.assistant-fab { display: none; }
@media (min-width: 900px) {
  /* Le bouton du hero laisse la place à la pastille flottante. */
  .hero-assistant { display: none; }
  .assistant-fab {
    position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 40;
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
    pointer-events: none;   /* le libellé masqué ne doit jamais bloquer les clics derrière */
  }
  .assistant-fab__ring { pointer-events: auto;
    --a-angle: 0deg; display: block; padding: 2px; border-radius: 50%;
    background: conic-gradient(from var(--a-angle), #22d3c8, #2966ff, #8c4df2, #ff6b61, #22d3c8);
    box-shadow: 0 6px 22px rgba(41, 102, 255, .35);
    animation: a-spin 10s linear infinite; transition: transform .15s ease, box-shadow .15s ease;
  }
  .assistant-fab__disc {
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #0a1738; color: #fff;
  }
  .assistant-fab:hover .assistant-fab__ring, .assistant-fab:focus-visible .assistant-fab__ring { transform: scale(1.06); box-shadow: 0 8px 28px rgba(41, 102, 255, .5); }
  .assistant-fab:focus-visible { outline: none; }
  .assistant-fab:focus-visible .assistant-fab__ring { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
  .assistant-fab:active .assistant-fab__ring { transform: scale(.96); }
  /* Libellé qui apparaît à gauche au survol / au clavier. */
  .assistant-fab__label {
    order: -1; padding: 8px 14px; border-radius: 999px; background: #0a1738; color: #fff; font-size: .875rem; font-weight: 700; white-space: nowrap;
    opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity .15s ease, transform .15s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  }
  .assistant-fab:hover .assistant-fab__label, .assistant-fab:focus-visible .assistant-fab__label { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .assistant-fab__ring { animation: none; transition: none; } .assistant-fab__label { transition: none; } }

/* ------------------------------------------------------------------ Page */
.assistant { padding-block: var(--sp-8) var(--sp-10); background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%); min-height: 60vh; }
.assistant__inner { max-width: 760px; }
.assistant__head { text-align: center; margin-bottom: var(--sp-6); }
.assistant__title { font-size: var(--fs-xl); color: var(--heading); margin: 0; }
.assistant__title:focus { outline: none; }
.assistant__subtitle { color: var(--ink-soft); margin: var(--sp-2) auto 0; max-width: 540px; }
.assistant__notice, .assistant__note { color: var(--ink-soft); font-size: var(--fs-sm); margin: var(--sp-3) 0 0; }

.assistant__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.assistant__step-label { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-soft); }
.assistant__icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--heading); cursor: pointer;
}
.assistant__icon-btn:hover { background: var(--bg-tint-2); }
.assistant__icon-btn[disabled], .assistant__icon-btn[hidden] { visibility: hidden; }
.assistant__progress { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin-bottom: var(--sp-6); }
.assistant__progress span { display: block; height: 100%; width: 25%; background: var(--turquoise); transition: width .25s ease; }

.assistant__step { border: 0; padding: 0; margin: 0; min-width: 0; }
.assistant__step legend, .assistant__legend2 { font-size: var(--fs-lg); font-weight: 700; color: var(--heading); margin: 0 0 var(--sp-3); padding: 0; }
.assistant__legend2 { margin-top: var(--sp-6); font-size: var(--fs-md); }

/* Choix simples : vrais <input type=radio> (clavier + lecteurs d'écran natifs). */
.a-option, .a-switch { position: relative; display: flex; align-items: center; min-height: 56px; margin-top: 12px; cursor: pointer; }
.a-option input, .a-cat input, .a-surprise input, .a-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.a-option > span {
  display: flex; align-items: center; width: 100%; min-height: 56px; padding: 0 16px; border-radius: 16px;
  background: var(--white); border: 1px solid var(--border); font-weight: 700; color: var(--ink);
}
.a-option--btn { width: 100%; background: none; border: 0; padding: 0; text-align: left; font: inherit; }
.a-opt-icon { flex: none; margin-right: 14px; color: var(--ink); }
.a-option input:checked + span, .a-option--btn.is-on > span {
  background: var(--bg-tint-2); border: 2px solid var(--turquoise-600); padding: 0 15px;
}
.a-option input:checked + span::after {
  content: '✓'; margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--turquoise-600);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.a-option input:focus-visible + span, .a-cat input:focus-visible ~ .a-cat__name,
.a-surprise input:focus-visible ~ .a-surprise__text, .a-switch input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.a-switch { gap: 10px; }
.a-switch > span { font-weight: 600; }
.a-date { margin-top: 12px; display: grid; gap: 6px; max-width: 260px; }
.a-date label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-soft); }
.a-date input { min-height: 48px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: var(--white); color: var(--ink); }

/* Cartes de catégories : icône teintée + coche (checkbox natif). */
.a-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
@media (min-width: 620px) { .a-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.a-cat {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 112px;
  padding: 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--border); cursor: pointer;
}
.a-cat__icon {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--tint); background: color-mix(in srgb, var(--tint) 16%, transparent);
}
.a-cat__name { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); line-height: 1.25; }
.a-cat__check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--turquoise-600);
  color: #fff; display: none; align-items: center; justify-content: center; font-size: 13px;
}
.a-cat:has(input:checked) { border: 2px solid var(--turquoise-600); padding: 13px; background: var(--bg-tint-2); }
.a-cat:has(input:checked) .a-cat__check { display: inline-flex; }

/* « Surprenez-moi » : carte turquoise clair + interrupteur. */
.a-surprise {
  position: relative; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 18px; cursor: pointer;
  background: color-mix(in srgb, var(--turquoise) 12%, var(--white)); border: 1.5px solid var(--turquoise-600);
}
.a-surprise:has(input:checked) { border-width: 3px; padding: 10.5px; }
.a-surprise__orb {
  width: 38px; height: 38px; flex: none; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2fe0d6, #129e9b);
}
.a-surprise__text { flex: 1; display: grid; }
.a-surprise__text strong { color: var(--ink); }
.a-surprise__text small { color: var(--ink-soft); }
.a-surprise__switch { width: 46px; height: 28px; border-radius: 14px; background: var(--border); position: relative; flex: none; transition: background .15s; }
.a-surprise__switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.a-surprise input:checked ~ .a-surprise__switch { background: var(--turquoise-600); }
.a-surprise input:checked ~ .a-surprise__switch::after { left: 21px; }

/* Ville (distance) */
.a-city { position: relative; margin-top: 12px; display: grid; gap: 6px; }
.a-city label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-soft); }
.a-city input { min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: var(--white); color: var(--ink); }
.a-city__list { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--white); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; }
.a-city__list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.a-city__list li:hover, .a-city__list li[aria-selected="true"] { background: var(--bg-tint-2); }
.a-city__list small { color: var(--ink-soft); }

/* Boutons */
.assistant__actions { position: sticky; bottom: 0; padding: 14px 0 4px; margin-top: var(--sp-6); background: linear-gradient(180deg, transparent, var(--bg) 40%); }
.a-primary, .a-secondary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
}
.a-primary { width: 100%; border: 0; background: var(--turquoise-600); color: #fff; }
.a-primary[disabled] { opacity: .4; cursor: not-allowed; }
.a-secondary { border: 1.5px solid var(--border); background: transparent; color: var(--heading); }
.a-link { background: none; border: 0; color: var(--coral); font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }

.assistant__state { text-align: center; padding: var(--sp-10) 0; }
.assistant__spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--turquoise-600); border-radius: 50%; animation: a-rot .8s linear infinite; }
@keyframes a-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .assistant__spinner { animation-duration: 2.4s; } }

/* Résultats — même présentation que les apps iOS/Android */
.assistant [hidden] { display: none !important; }   /* les display: grid/flex plus bas ne doivent jamais annuler [hidden] */
.assistant__results-head { text-align: center; margin: -8px 0 var(--sp-4); }
.assistant__around { color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 600; margin: 0; }
.assistant__empty { text-align: center; color: var(--ink-soft); padding: var(--sp-6) 0; }
.a-results { max-width: 560px; margin-inline: auto; }

.a-best { margin-bottom: var(--sp-6); }
.a-best__frame { position: relative; padding: 2px; border-radius: 28px; background: linear-gradient(135deg, #22d3c8, #2966ff 55%, #8c4df2); box-shadow: 0 8px 28px rgba(41, 102, 255, .22); }
.a-best__card { position: relative; display: block; height: 340px; border-radius: 26px; overflow: hidden; background: #0a1738; color: #fff; text-decoration: none; }
.a-best__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.a-best__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 65%); }
.a-best__badge {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; color: #fff; background: linear-gradient(90deg, #22d3c8, #2966ff, #8c4df2); box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.a-best__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; display: grid; gap: 8px; }
.a-best__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.a-chip { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; color: #fff; }
.a-chip--white { background: #fff; color: #0a1738; }
.a-best__title { font-size: 1.5rem; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.a-best__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8125rem; font-weight: 600; opacity: .95; }

/* Cœur : médaillon blanc fixe, cœur bleu nuit (lisible en clair ET en sombre). */
.a-fav {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.94); color: #0a1738; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.a-fav[aria-pressed="true"] { color: var(--coral); }
.a-fav:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.a-fav--sm { top: auto; bottom: 10px; right: 10px; width: 40px; height: 40px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.a-fav--sm svg { width: 18px; height: 18px; }

.a-facts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm); }
.a-facts li { padding: 6px 12px; border-radius: 999px; background: var(--bg-tint-2); color: var(--ink); font-weight: 600; }
.a-facts li.is-reason::before { content: '✓ '; color: var(--turquoise-600); font-weight: 700; }

.a-others-title { font-size: var(--fs-md); font-weight: 700; color: var(--heading); margin: var(--sp-6) 0 var(--sp-3); }
.a-idea { margin-bottom: var(--sp-4); }
.a-compact { position: relative; border-radius: 24px; background: var(--white); border: 1px solid var(--border); }
.a-compact__link { display: flex; gap: 14px; padding: 10px; color: inherit; text-decoration: none; }
.a-compact__photo { flex: none; width: 112px; height: 132px; border-radius: 18px; overflow: hidden; background: var(--bg-tint-2); }
.a-compact__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-compact__text { flex: 1; min-width: 0; min-height: 132px; display: flex; flex-direction: column; gap: 4px; }
.a-role { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--turquoise-600) 14%, transparent); color: var(--turquoise-600); }
.a-idea--free .a-role { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.a-idea--original .a-role { background: color-mix(in srgb, #8c4df2 14%, transparent); color: #8c4df2; }
.a-compact__title { font-size: 1rem; font-weight: 700; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.a-compact__city { font-size: var(--fs-sm); color: var(--ink-soft); }
.a-compact__price { margin-top: auto; margin-right: 46px; font-weight: 700; color: var(--heading); font-size: .875rem; }
.a-compact__price small { font-weight: 400; color: var(--ink-soft); margin-left: 6px; }

.a-relaxed { padding: 16px; border-radius: 18px; background: #fdf3e3; color: #4a3200; margin-bottom: var(--sp-6); max-width: 560px; margin-inline: auto; }
.a-relaxed p { margin: 0 0 8px; }
.a-relaxed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.a-relaxed li { padding: 4px 10px; border-radius: 999px; background: #fff; font-size: var(--fs-sm); font-weight: 700; }

/* Actions : deux boutons contour côte à côte, un bouton plein dessous. */
.a-actions { display: grid; gap: 10px; margin-top: var(--sp-6); }
.a-actions__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border-strong, #cbd3e5); background: transparent; color: var(--heading); font: inherit; font-weight: 700; box-shadow: none;
}
.a-outline:hover { background: var(--bg-tint-2); }
.a-actions .a-primary { width: 100%; text-decoration: none; }

.a-save { margin-top: var(--sp-6); padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.a-save p { margin: 4px 0 8px; color: var(--ink-soft); font-size: var(--fs-sm); }
.a-save a { font-weight: 700; color: var(--turquoise-600); }

/* Boutons contour : bordure plus discrète en mode sombre. */
@media (prefers-color-scheme: dark) { .a-outline { border-color: rgba(255, 255, 255, .28); } .a-outline:hover { background: rgba(255, 255, 255, .06); } }
