/* La carte de la ville (app/carte.js) : l'élément de l'accueil, la carte en plein écran, la fiche d'un quartier. */

/* L'élément de l'accueil : un morceau de la carte, autour du quartier en cours. */
.vers-carte { position: relative; display: block; height: 148px; border-radius: 22px; overflow: hidden; border: 1.5px solid var(--pink); box-shadow: 0 0 18px rgba(255,61,154,.45); color: var(--text); text-decoration: none; background: var(--panel); }
.vers-carte .fond { position: absolute; inset: 0; background: var(--vignette) center / cover no-repeat; }
.vers-carte::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,26,.92), rgba(11,11,26,.55) 55%, rgba(11,11,26,.05)); }
.vers-carte > div { position: absolute; z-index: 1; left: 16px; top: 14px; bottom: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.vers-carte h3 { margin: 3px 0 0; font: 400 24px/1.02 var(--sign); text-shadow: 0 3px 0 var(--pink); }
.vers-carte .ou { display: flex; align-items: center; gap: 8px; }
.vers-carte .ou b { padding: 7px 12px 6px; border-radius: 999px; background: var(--gold); color: #1A0B1F; font: 400 13px/1 var(--sign); white-space: nowrap; }
.vers-carte .pts { display: flex; gap: 5px; }
.vers-carte .pts i { width: 12px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.3); }
.vers-carte .pts i.on { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.vers-carte .pts i.gagne { background: var(--teal); }
.vers-carte .fl { position: absolute; z-index: 1; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 22px; background: var(--sunset); display: grid; place-items: center; box-shadow: 0 4px 0 #8A1457; }
.vers-carte .fl svg { width: 24px; height: 24px; fill: none; stroke: #1A0B1F; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.vers-carte .ici { position: absolute; z-index: 1; right: 27%; top: 44%; width: 18px; height: 18px; border-radius: 9px; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(255,209,102,.35), 0 0 18px var(--gold); }
.vers-carte:active { transform: scale(.985); }

/* La carte, en vrai plein écran : l'image couvre tout l'écran, de l'encoche à la barre du bas, sans bord ; le
   titre et la croix sont posés dessus. Les quartiers sont posés sur l'image en centièmes.
   RIEN NE BOUGE SOUS LE DOIGT : la page ne se tire ni ne rebondit (touch-action, overscroll-behavior), et l'effet
   de pression de l'appli (vie.css, `.appui`) est coupé ici : il remplaçait la transformation qui place un repère,
   et le repère sautait de côté au moment où on le touchait. */
.carte-ville { position: fixed; z-index: 30; top: 0; bottom: 0; left: 50%; width: 100%; max-width: 480px; transform: translateX(-50%); overflow: hidden; background: var(--ink); touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.carte-ville .appui, .vie .carte-ville :is(a, button).appui, .carte-ville .cta:active { transform: none; }
.carte-ville .cadre-plan { position: absolute; inset: 0; overflow: hidden; }
/* L'image garde ses proportions et couvre l'écran : elle prend toute la hauteur, et déborde sur les côtés. */
.carte-ville .plan { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1080 / 1910; transform: translateX(-50%); }
@supports (width: 1cqw) {
  .carte-ville .cadre-plan { container-type: size; }
  /* (un écran plus large que l'image, une tablette : elle prend alors toute la largeur, et déborde en haut et en bas) */
  .carte-ville .plan { height: auto; width: max(100cqw, calc(100cqh * 1080 / 1910)); top: 50%; transform: translate(-50%, -50%); }
}
/* Le décalage posé par app/carte.js (ajusterCarte) pour que les repères tiennent dans l'écran : il s'ajoute au centrage. */
.carte-ville .plan { translate: var(--dx, 0px) var(--dy, 0px); }
.carte-ville .aide.cachee { visibility: hidden; }
.carte-ville .plan > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.carte-ville .brume { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,26,.7) 0, rgba(11,11,26,.62) var(--clair, 60%), rgba(11,11,26,0) calc(var(--clair, 60%) + 14%)); pointer-events: none; }
.carte-ville > header { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 34px; background: linear-gradient(180deg, rgba(11,11,26,.92), rgba(11,11,26,.6) 60%, rgba(11,11,26,0)); pointer-events: none; }
.carte-ville > header > * { pointer-events: auto; }
.carte-ville > header h1 { margin: 2px 0 0; font: 400 25px/1 var(--sign); text-shadow: 0 3px 0 var(--pink); }
/* Les croix (celle de la carte, celle de la fiche) : grandes, sur un fond plein, lisibles sans lunettes. */
.carte-ville .fermer { flex: none; width: 56px; height: 56px; border-radius: 28px; background: var(--text); border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(0,0,0,.55); display: grid; place-items: center; color: #1A0B1F; }
.carte-ville .fermer svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 3.4; fill: none; stroke-linecap: round; }
.carte-ville .aide { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; margin: 0; padding: 30px 0 calc(env(safe-area-inset-bottom, 0px) + 18px); text-align: center; font: 700 12px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--text); background: linear-gradient(0deg, rgba(11,11,26,.9), rgba(11,11,26,0)); pointer-events: none; }
/* Un repère : l'ancre porte la place (et sa transformation) ; le lien dedans est ce qu'on touche. */
.pin { position: absolute; transform: translate(-24px, -50%); }
.pin.g { transform: translate(calc(-100% + 24px), -50%); }
.pin > a { display: flex; align-items: center; gap: 8px; min-height: 48px; color: var(--text); text-decoration: none; touch-action: manipulation; }
.pin.g > a { flex-direction: row-reverse; }
.pin i { flex: none; width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; font: 400 19px/1 var(--num); font-style: normal; background: rgba(22,20,46,.94); border: 2px solid var(--line2); color: var(--muted); }
.pin i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pin a > span { padding: 7px 11px 6px; border-radius: 12px; background: rgba(11,11,26,.9); border: 1px solid var(--line2); }
.pin a > span b { display: block; font: 400 14px/1.05 var(--sign); white-space: nowrap; }
.pin a > span small { display: block; margin-top: 3px; font: 700 10px/1 var(--body); letter-spacing: .1em; color: var(--muted); white-space: nowrap; text-transform: uppercase; }
.pin.ouvert i, .pin.gagne i { color: var(--text); border-color: var(--gold); }
.pin.gagne i { background: var(--gold); color: #1A0B1F; } .pin.gagne i svg { stroke-width: 3.2; }
.pin.gagne a > span small { color: var(--gold); }
.pin.ici i { width: 56px; height: 56px; border-radius: 28px; background: var(--sunset); border: 3px solid #fff; color: #1A0B1F; font-size: 25px; box-shadow: 0 0 0 8px rgba(255,209,102,.3), 0 0 26px rgba(255,61,154,.95); }
.pin.ici { transform: translate(-28px, -50%); } .pin.ici.g { transform: translate(calc(-100% + 28px), -50%); }
.pin.ici a > span { border-color: var(--gold); background: rgba(11,11,26,.94); }
.pin.ici a > span b { font-size: 18px; text-shadow: 0 2px 0 var(--pink); }
.pin.ici a > span small { color: var(--gold); font-size: 11px; }
.pin.choisi i { border-color: var(--pink); color: var(--text); box-shadow: 0 0 0 6px rgba(255,61,154,.3), 0 0 18px var(--pink); }
.pin.choisi a > span { border-color: var(--pink); }
.pin.d { transform: translate(-24px, -50%); } .pin.ici.d { transform: translate(-28px, -50%); }
/* Un nom qui ne tient d'aucun côté du rond : sur deux lignes, dans la place qui reste (app/carte.js, ajusterCarte). */
.pin.serre a > span { max-width: var(--place, 160px); }
.pin.serre a > span b, .pin.serre a > span small { white-space: normal; }
@media (max-width: 370px), (max-height: 700px) { .pin a > span b { font-size: 12px; } .pin.ici a > span b { font-size: 15px; } .pin a > span small, .pin.ici a > span small { font-size: 9px; letter-spacing: .06em; } .pin a > span { padding: 6px 8px 5px; } }

/* La fiche d'un quartier touché : elle monte du bas, par-dessus la carte. Sa croix est DANS la fiche, en haut à
   droite ; toucher la carte au-dessus (le voile) la referme aussi. */
.carte-ville.ouverte .aide { visibility: hidden; }
.carte-ville .voile { position: absolute; z-index: 3; inset: 0; background: rgba(11,11,26,.45); }
.fiche-carte { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; max-height: 80%; display: flex; flex-direction: column; border-radius: 26px 26px 0 0; background: var(--panel); border-top: 2px solid var(--pink); box-shadow: 0 -12px 40px rgba(0,0,0,.7); overflow: hidden; }
.fiche-carte > .fermer { position: absolute; z-index: 3; right: 12px; top: 12px; }
.fiche-carte .vue-lieu { position: relative; flex: 0 1 150px; min-height: 96px; overflow: hidden; }
.fiche-carte .vue-lieu img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fiche-carte .vue-lieu::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,20,46,0) 30%, rgba(22,20,46,1)); }
.fiche-carte .vue-lieu div { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 4px; }
.fiche-carte h1 { margin: 3px 0 0; font: 400 27px/1.02 var(--sign); text-shadow: 0 3px 0 var(--pink); }
.fiche-carte footer { flex: none; padding: 8px 18px calc(env(safe-area-inset-bottom, 0px) + 20px); display: flex; flex-direction: column; gap: 12px; }
.fiche-carte .dit { margin: 0; font: 600 15px/1.35 var(--body); }
.fiche-carte .dit b { display: block; font: 700 10px/1 var(--body); letter-spacing: .18em; color: var(--pink); margin-bottom: 4px; }
.fiche-carte .etat { margin: 0; display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; padding: 0 12px; border-radius: 20px; border: 1.5px dashed rgba(255,255,255,.4); font: 400 17px/1.15 var(--sign); text-align: center; }
.fiche-carte .etat svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fiche-carte .jalon { margin: 0; font: 400 40px/1 var(--num); text-transform: uppercase; color: var(--text); text-shadow: 0 3px 0 var(--pink); }
.fiche-carte .cta { min-height: 62px; }
.fiche-carte button.cta b { font-size: 21px; }
.fiche-carte button.cta.note { background: var(--teal); box-shadow: 0 6px 0 #0c6e66; color: #06221f; border: 0; }
.fiche-carte .second { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 18px; border: 1.5px solid var(--teal); background: transparent; color: var(--teal); }
.fiche-carte .second b { font: 400 15px/1 var(--sign); }
@media (prefers-reduced-motion: no-preference) {
  .vie .fiche-carte { animation: carte-monte .3s cubic-bezier(.2,.9,.3,1) both; }
  .vie #vue.vie-arrive .carte-ville .pin > a { animation: vie-pop .34s cubic-bezier(.3,1.5,.5,1) both; }
  .vie #vue.vie-arrive .carte-ville .pin:nth-of-type(2) > a { animation-delay: .06s; } .vie #vue.vie-arrive .carte-ville .pin:nth-of-type(3) > a { animation-delay: .12s; }
  .vie #vue.vie-arrive .carte-ville .pin:nth-of-type(4) > a { animation-delay: .18s; } .vie #vue.vie-arrive .carte-ville .pin:nth-of-type(5) > a { animation-delay: .24s; }
}
@keyframes carte-monte { from { transform: translateY(60%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* « Ça m'intéresse » est ici le bouton principal de la fiche : il en prend la forme. */
/* LES BASES (0.75) : la section de « refaire le premier round », à part de l'histoire. Un filet et de l'air au-dessus,
   puis le titre des onglets Défis et Entraînements (.porte, app/ville.css) ; son petit mot est en 14 points ici. */
.les-bases { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.les-bases .porte { margin: 0; }
.les-bases .porte span { font-size: 14px; letter-spacing: .1em; opacity: .8; }
/* Refaire le premier round : dans sa section, sous la carte de la ville (app/app.js, vueRefaireRound). Lisible à bout
   de bras : un titre de 17 points, une ligne de 14, toute la carte se touche. */
.refaire-round { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 14px; border-radius: 20px; background: var(--panel); border: 1.5px solid var(--gold); color: var(--text); text-decoration: none; }
.refaire-round img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 2px solid var(--pink); }
.refaire-round > div { flex: 1; min-width: 0; }
.refaire-round h3 { margin: 0; font: 400 17px/1.15 var(--sign); color: var(--gold); }
.refaire-round p { margin: 4px 0 0; font: 500 14px/1.35 var(--body); color: var(--soft); }
.refaire-round svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.refaire-round:active { transform: scale(.98); }
/* 0.89 : la salle du club est sur l'onglet S'entraîner, sous les entraînements : une grande carte illustrée, comme eux,
   Alloy à la porte du club (img/entree-club.jpg), le titre en bas à gauche, la flèche à droite. */
.refaire-round { position: relative; overflow: hidden; min-height: 190px; align-items: flex-end; padding: 16px; border-color: var(--pink); background: #160F2C; box-shadow: 0 0 18px rgba(255,61,154,.25); }
.refaire-round .cadre-fond { position: absolute; inset: 0; }
.refaire-round .fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; border: 0; border-radius: 0; opacity: .85; }
.refaire-round::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,26,.92) 0, rgba(11,11,26,.55) 55%, rgba(11,11,26,.1) 100%); }
.refaire-round > :not(.cadre-fond) { position: relative; z-index: 1; }
.refaire-round .kicker { color: var(--gold); font-size: 11px; letter-spacing: .14em; }
.refaire-round h3 { margin-top: 4px; font-size: 20px; color: var(--text); text-shadow: 0 2px 0 var(--pink); max-width: 230px; }
.refaire-round p:not(.kicker) { max-width: 230px; }
.refaire-round > svg { align-self: center; width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--sunset); stroke: #1A0B1F; box-shadow: 0 3px 0 #8A1457; }

/* ── Le récap d'un quartier, dans sa fiche (28 novembre ; app/recap.js) ─────────────────────────────────────────────
   Aurélien : « quand j'appuie sur un niveau, je ne peux pas le sélectionner » ; « un petit récap visuel des performances,
   des étoiles et tout ». En haut, les étoiles du quartier sur le maximum, le boss, les étapes faites ; les trois niveaux,
   qu'on touche ; puis chaque étape, une ligne de 56 points qu'on touche pour la jouer. La fiche défile si elle est plus
   haute que l'écran ; le bouton de l'histoire reste en bas. */
.fiche-carte.avec-recap { max-height: 88%; }
.fiche-carte.avec-recap .vue-lieu { flex: 0 0 112px; min-height: 112px; }
.fiche-carte.avec-recap footer { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; gap: 10px; padding-top: 4px; }
.fiche-carte.sans-montee { animation: none !important; }
.recap { display: flex; flex-direction: column; gap: 10px; }
.recap svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bilan-quartier { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bilan-quartier p { margin: 0; }
.bilan-quartier .total { display: flex; align-items: baseline; gap: 3px; color: var(--gold); }
.bilan-quartier .total svg { align-self: center; width: 26px; height: 26px; fill: var(--gold); stroke: none; filter: drop-shadow(0 0 8px rgba(255,209,102,.7)); }
.bilan-quartier .total b { font: 400 34px/1 var(--num); text-shadow: 0 2px 0 #8A1457; }
.bilan-quartier .total span { font: 400 18px/1 var(--num); color: var(--muted); }
.bilan-quartier .boss-etat { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 15px; border: 1.5px solid var(--line2); font: 700 12px/1 var(--body); letter-spacing: .1em; color: var(--muted); }
.bilan-quartier .boss-etat.battu { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 12px rgba(46,230,214,.35); }
.bilan-quartier .boss-etat svg { width: 15px; height: 15px; stroke-width: 3; }
.bilan-quartier .faites { margin-left: auto; font: 700 12px/1 var(--body); letter-spacing: .12em; color: var(--soft); }
.niveaux-recap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.niveaux-recap .niv { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 6px 4px; border-radius: 14px; border: 1.5px solid var(--line2); background: rgba(11,11,26,.6); color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation; }
.niveaux-recap .niv b { font: 400 13px/1 var(--sign); letter-spacing: .02em; }
.niveaux-recap .niv small { display: flex; align-items: center; gap: 3px; font: 700 12px/1 var(--body); color: var(--muted); }
.niveaux-recap .niv small svg { width: 12px; height: 12px; fill: var(--gold); stroke: none; }
.niveaux-recap .niv.fait { border-color: var(--teal); }
.niveaux-recap .niv.choisi { border: 2px solid var(--gold); background: rgba(255,209,102,.14); box-shadow: 0 0 0 3px rgba(255,209,102,.18), 0 0 16px rgba(255,61,154,.45); }
.niveaux-recap .niv.choisi b { color: var(--gold); }
.niveaux-recap .niv.ferme { cursor: default; opacity: .62; border-style: dashed; }
.niveaux-recap .niv.ferme small svg { fill: none; stroke: var(--gold); stroke-width: 2.4; }
.niveaux-recap .niv .ok { position: absolute; top: -7px; right: -5px; width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; background: var(--teal); color: #06221f; }
.niveaux-recap .niv .ok svg { width: 13px; height: 13px; stroke-width: 3.4; }
.etapes-recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.etape-recap { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 8px 6px 6px; border-radius: 16px; background: rgba(11,11,26,.55); border: 1.5px solid var(--line); color: var(--text); text-decoration: none; touch-action: manipulation; }
a.etape-recap { cursor: pointer; }
.etape-recap .rond { position: relative; flex: none; width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; background: rgba(22,20,46,.95); border: 2px solid var(--line2); font: 400 18px/1 var(--num); color: var(--muted); }
.etape-recap .rond svg { width: 18px; height: 18px; }
.etape-recap .rond img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.etape-recap .rond .ok { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(46,230,214,.55); color: #06221f; }
.etape-recap.faite .rond { background: var(--gold); border-color: var(--gold); color: #1A0B1F; }
.etape-recap.faite .rond svg { stroke-width: 3.4; }
.etape-recap.ici { border: 2px solid var(--gold); background: linear-gradient(90deg, rgba(255,209,102,.16), rgba(255,61,154,.1)); box-shadow: 0 0 18px rgba(255,61,154,.35); }
.etape-recap.ici .rond { background: var(--sunset); border: 2px solid #fff; color: #1A0B1F; }
.etape-recap.boss .rond { border-color: var(--pink); }
.etape-recap.fermee { opacity: .55; border-style: dashed; }
.etape-recap.fermee .rond svg { stroke: var(--gold); }
.etape-recap .nom { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.etape-recap .nom small { font: 700 11px/1.3 var(--body); letter-spacing: .12em; color: var(--pink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etape-recap.ici .nom small { color: var(--gold); }
.etape-recap .nom b { font: 400 15px/1.1 var(--sign); overflow-wrap: anywhere; }
.etape-recap .perf { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.etape-recap .perf .etoiles { gap: 2px; }
.etape-recap .perf .etoiles i { width: 15px; height: 15px; }
.etape-recap .perf em { font: 400 13px/1 var(--num); font-style: normal; letter-spacing: .03em; color: var(--soft); white-space: nowrap; }
.etape-recap .perf em.ferme { font: 700 11px/1 var(--body); letter-spacing: .12em; color: var(--muted); }
.etape-recap .fl { flex: none; width: 18px; color: var(--gold); display: grid; place-items: center; }
.etape-recap .fl svg { width: 18px; height: 18px; }
@media (max-width: 370px) { .etape-recap .nom b { font-size: 13px; } .etape-recap .perf .etoiles i { width: 13px; height: 13px; } .bilan-quartier .total b { font-size: 28px; } .niveaux-recap .niv b { font-size: 11px; } }
/* Le repère d'un quartier où l'on entre dit ses étoiles, sous son état. */
.pin a > span .etoiles-pin { display: flex; align-items: center; gap: 3px; margin-top: 3px; font: 400 12px/1 var(--num); font-style: normal; color: var(--gold); white-space: nowrap; }
.pin a > span .etoiles-pin svg { width: 11px; height: 11px; fill: var(--gold); stroke: none; }
