/* ══════════════════════════════════════════════════════════════════════════════
   Lunch Roulette — styles PROPRES À L'OUTIL.
   Le chrome (header, boutons, footer, toast, tokens) vient de
   ../shared/innospira-ui.css, lié AVANT ce fichier. Toutes les couleurs passent
   par les tokens partagés : la roue suit le thème clair et le thème sombre sans
   une ligne en double (les secteurs SVG sont peints en CSS, pas en JS).
   ══════════════════════════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.roulette {
  width: 100%; max-width: 1060px; margin: 0 auto; padding: 22px 24px 40px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px; align-items: start;
}
@media (max-width: 860px) {
  .roulette { grid-template-columns: 1fr; padding: 16px 16px 32px; gap: 20px; }
}

/* ═══ Roue ═════════════════════════════════════════════════════════════════════ */
.wheel-zone { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.wheel {
  position: relative; width: min(100%, 440px); aspect-ratio: 1;
  /* place pour le pointeur au-dessus */
  margin-top: 14px;
}
.wheel__svg {
  width: 100%; height: 100%; display: block; overflow: visible;
  filter: drop-shadow(0 14px 28px light-dark(oklch(0.5 0.05 60 / .18), oklch(0 0 0 / .45)));
}
#wheelRotor { will-change: transform; }

/* Secteurs : 4 teintes en rotation, toutes en tokens */
.seg-a { fill: var(--brand); }
.seg-b { fill: var(--panel); }
.seg-c { fill: var(--spark-wash); }
.seg-d { fill: var(--brand-wash); }
.wheel__sep { stroke: var(--line-2); stroke-width: .6; }
.wheel__rim { fill: none; stroke: var(--text); stroke-width: 3; }
.wheel__pegs circle { fill: var(--text); }
.wheel__emoji { font-size: 15px; text-anchor: middle; dominant-baseline: central; }
.wheel__label {
  font-family: var(--mono); font-size: 6.4px; font-weight: 700; letter-spacing: .02em;
  text-anchor: middle; dominant-baseline: central; fill: var(--text);
}
.seg-a ~ .wheel__label, .wheel__label--ink { fill: var(--brand-ink); }
.wheel__empty { fill: var(--bg-2); }
.wheel__empty-text { font-family: var(--font); font-size: 8px; fill: var(--muted); text-anchor: middle; dominant-baseline: central; }
.is-dimmed { opacity: .35; transition: opacity .3s ease; }

/* Pointeur fixe, en haut */
.wheel__pointer {
  position: absolute; left: 50%; top: -14px; z-index: 2;
  width: 30px; height: 36px; transform: translateX(-50%); transform-origin: 50% 8px;
  background: var(--text);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 3px 4px oklch(0 0 0 / .25));
}
.wheel__pointer.is-tick { animation: flick .09s ease-out; }
@keyframes flick { 40% { transform: translateX(-50%) rotate(-14deg); } }

/* Moyeu central : l'emoji du secteur sous le pointeur */
.wheel__hub {
  position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel); border: 3px solid var(--text);
  box-shadow: var(--shadow);
  font-size: clamp(26px, 6vw, 40px); line-height: 1;
}

.spin-btn { width: min(100%, 340px); font-size: 18px; padding: 17px 24px; }

.sound-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 10px; border-radius: 99px;
  font: 500 13px/1 var(--font); color: var(--muted); cursor: pointer;
}
.sound-btn:hover { background: var(--panel-2); color: var(--text); }
.sound-btn__ico { font-size: 15px; }

/* ═══ Colonne de droite ═══════════════════════════════════════════════════════ */
.side { display: flex; flex-direction: column; gap: 16px; }
.side .card { padding: 20px; }
.side__title {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
  display: flex; align-items: baseline; gap: 8px;
}
.side__title--gap { margin-top: 20px; }
.side__hint { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted-2); }
.side__help { margin: -4px 0 12px; font-size: 13.5px; color: var(--muted); }

/* Position */
.where { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; line-height: 1.4; }
.where__dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.where__dot.is-busy { background: var(--brand); animation: pulse 1s ease-in-out infinite; }
.where__dot.is-ok { background: var(--ok); }
.where__dot.is-err { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }
.where__actions { margin-bottom: 10px; }

.city { display: flex; gap: 8px; }
.city__input {
  flex: 1; min-width: 0; padding: 11px 14px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: 500 15px var(--font);
}
.city__input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }

/* Rayon : boutons segmentés */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 12px; }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span {
  display: block; text-align: center; padding: 8px 4px; border-radius: 9px;
  font: 600 13.5px var(--font); color: var(--muted); transition: background .15s ease, color .15s ease;
}
.seg__opt:hover span { color: var(--text); }
.seg__opt input:checked + span { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--spark); }

/* Cuisines */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips__empty { font-size: 14px; color: var(--muted-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 99px; cursor: pointer;
  background: var(--brand-wash); border: 1px solid transparent; color: var(--text);
  font: 600 13.5px var(--font); transition: background .15s ease, opacity .15s ease;
}
.chip__n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.chip:hover { border-color: var(--line-2); }
.chip[aria-pressed="false"] { background: transparent; border-color: var(--line); color: var(--muted-2); text-decoration: line-through; }

/* Résultat */
.result { border: 2px solid var(--brand); animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.result__cat { font-family: var(--mono); font-size: 12.5px; color: var(--brand-strong); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.result__name {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2rem);
  letter-spacing: -.02em; line-height: 1.1; margin: 6px 0 6px; overflow-wrap: anywhere;
}
.result__meta { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.result__links { display: flex; gap: 8px; flex-wrap: wrap; }
.result__again {
  margin-top: 12px; background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 13.5px var(--font); color: var(--spark-strong); text-decoration: underline; text-underline-offset: 3px;
}
.result__again:disabled { color: var(--muted-2); cursor: default; text-decoration: none; }

.site-footer__tag a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .wheel__pointer.is-tick, .result, .where__dot.is-busy { animation: none; }
}
.chips__retry { margin-top: 4px; }
.result__links .btn { text-decoration: none; }
