/* Padelcourt, Nos réalisations : bascule Grille / Carte + carte des références.
   Destination : thème enfant, assets/css/realisations-carte.css, chargé sur la page 24734 seulement.
   Jetons : ceux de .pc-home (page), repli sur ceux du thème. */
.pc-rview {
  --rv-bg: var(--bg, var(--pc-bg, #050B1A));
  --rv-card: var(--bg-card, var(--pc-bg-card, #10193A));
  --rv-y: var(--yellow, var(--pc-yellow, #FFEB00));
  --rv-c: var(--cyan, var(--pc-cyan, #3DB4FF));
  --rv-text: var(--text, var(--pc-text, #E2E8F0));
  --rv-muted: var(--muted, var(--pc-muted, #94A3B8));
  --rv-line: var(--border, rgba(255,255,255,0.1));
  --rv-display: var(--display, "Barlow Condensed", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

/* ---------- Bascule ---------- */
.pc-rview-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin:-20px 0 28px; }
.pc-rview-switch { display:inline-flex; padding:4px; gap:4px; background:rgba(255,255,255,0.04); border:1px solid var(--rv-line); border-radius:6px; }
.pc-rview-switch button {
  -webkit-appearance:none; appearance:none; display:inline-flex; align-items:center; gap:9px;
  padding:10px 18px; border:0; border-radius:4px; background:transparent; cursor:pointer;
  font:600 0.92rem/1 "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing:0.01em;
  color:var(--rv-text); transition:background .2s ease, color .2s ease;
}
.pc-rview-switch button svg { width:17px; height:17px; flex-shrink:0; }
.pc-rview-switch button:hover { color:#fff; background:rgba(255,255,255,0.06); }
.pc-rview-switch button[aria-selected="true"] { background:var(--rv-y); color:var(--rv-bg); }
.pc-rview-switch button:focus-visible { outline:2px solid var(--rv-c); outline-offset:2px; }
.pc-rview-hint { font-size:0.9rem; color:var(--rv-muted); }
.pc-rview [role="tabpanel"][hidden] { display:none !important; }

/* ---------- Carte ---------- */
.pc-rmap { display:grid; grid-template-columns:minmax(0,1fr) 360px; border:1px solid var(--rv-line); background:#060D20; }
.pc-rmap-stage { position:relative; min-width:0; background:radial-gradient(120% 90% at 55% 40%, #0B1633 0%, #060D20 70%); overflow:hidden; }
.pc-rmap-svg { display:block; width:100%; height:auto; aspect-ratio:1000 / 964; max-height:min(78vh, 780px); touch-action:pan-y; user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent; }
/* Glisser la carte : souris seulement. Au doigt, un doigt fait toujours défiler la page,
   deux doigts déplacent et zooment (le navigateur nous laisse le pincement avec pan-y). */
@media (hover:hover) and (pointer:fine) {
  .pc-rmap.is-zoomed .pc-rmap-svg { touch-action:none; cursor:grab; }
  .pc-rmap.is-dragging .pc-rmap-svg { cursor:grabbing; }
}
.pc-rmap-dep { fill:#17264F; stroke:rgba(255,255,255,0.16); stroke-linejoin:round; vector-effect:non-scaling-stroke; stroke-width:0.8; }
.pc-rmap-dep.is-active { fill:#213A74; stroke:rgba(255,255,255,0.22); }
.pc-rmap-inset-frame { fill:rgba(255,255,255,0.02); stroke:rgba(255,255,255,0.28); stroke-dasharray:4 4; vector-effect:non-scaling-stroke; stroke-width:1; }
.pc-rmap-inset-land { fill:#213A74; stroke:rgba(255,255,255,0.22); vector-effect:non-scaling-stroke; stroke-width:0.8; }
.pc-rmap-inset-label { fill:var(--rv-muted); font-family:var(--rv-display); font-weight:600; letter-spacing:0.08em; text-transform:uppercase; }

.pc-rmap-pt { cursor:pointer; outline:none; }
.pc-rmap-pt circle.dot { fill:var(--rv-y); stroke:#050B1A; vector-effect:non-scaling-stroke; stroke-width:1.5; transition:fill .15s ease; }
.pc-rmap-pt.is-encours circle.dot { fill:var(--rv-c); }
.pc-rmap-pt.is-reno circle.dot { fill:#fff; }
.pc-rmap-pt circle.halo { fill:var(--rv-y); opacity:0.16; }
.pc-rmap-pt.is-encours circle.halo { fill:var(--rv-c); }
.pc-rmap-pt.is-cluster circle.dot { fill:rgba(255,235,0,0.92); stroke:rgba(255,235,0,0.35); stroke-width:5; }
.pc-rmap-pt text { fill:#050B1A; font-family:var(--rv-display); font-weight:700; text-anchor:middle; dominant-baseline:central; pointer-events:none; }
.pc-rmap-pt:hover circle.ring, .pc-rmap-pt:focus-visible circle.ring, .pc-rmap-pt.is-selected circle.ring { stroke:#fff; }
.pc-rmap-pt.is-selected circle.halo { opacity:0.35; }
.pc-rmap-pt circle.hit { fill:transparent; stroke:none; }
.pc-rmap-pt circle.ring { fill:none; stroke:transparent; vector-effect:non-scaling-stroke; stroke-width:2; }

.pc-rmap-canvas { position:relative; }
.pc-rmap-tools { position:absolute; top:14px; left:14px; z-index:2; }
.pc-rmap-filter { display:inline-flex; gap:4px; padding:3px; background:rgba(5,11,26,0.82); border:1px solid var(--rv-line); border-radius:6px; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }

.pc-rmap-filter button, .pc-rmap-zoom button, .pc-rmap-back, .pc-rmap-reg, .pc-rmap-row {
  -webkit-appearance:none; appearance:none; border:0; cursor:pointer; font-family:"Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pc-rmap-filter button { white-space:nowrap; padding:7px 12px; border-radius:4px; background:transparent; color:var(--rv-text); font-size:0.82rem; font-weight:600; }
.pc-rmap-filter button[aria-pressed="true"] { background:rgba(255,255,255,0.12); color:#fff; }
.pc-rmap-filter button:focus-visible, .pc-rmap-zoom button:focus-visible, .pc-rmap-back:focus-visible, .pc-rmap-reg:focus-visible, .pc-rmap-row:focus-visible { outline:2px solid var(--rv-c); outline-offset:2px; }
.pc-rmap-zoom { position:absolute; top:14px; right:14px; z-index:2; display:flex; flex-direction:column; gap:4px; }
.pc-rmap-zoom button { width:38px; height:38px; display:grid; place-items:center; border-radius:4px; background:rgba(5,11,26,0.82); border:1px solid var(--rv-line); color:#fff; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.pc-rmap-zoom button svg { width:17px; height:17px; }
.pc-rmap-zoom button:hover { border-color:var(--rv-y); color:var(--rv-y); }
.pc-rmap-zoom button:disabled { opacity:0.35; cursor:default; border-color:var(--rv-line); color:#fff; }

.pc-rmap-legend { position:absolute; left:14px; bottom:12px; z-index:2; display:flex; flex-wrap:wrap; gap:6px 14px; padding:8px 12px; background:rgba(5,11,26,0.82); border:1px solid var(--rv-line); border-radius:6px; font-size:0.78rem; color:var(--rv-text); pointer-events:none; }
.pc-rmap-legend span { display:inline-flex; align-items:center; gap:7px; }
.pc-rmap-legend i { width:10px; height:10px; border-radius:50%; background:var(--rv-y); display:inline-block; }
.pc-rmap-legend i.c { background:var(--rv-c); }
.pc-rmap-legend i.w { background:#fff; }
.pc-rmap-tip { position:absolute; z-index:3; pointer-events:none; padding:7px 10px; background:#fff; color:#050B1A; border-radius:4px; font-size:0.82rem; font-weight:600; line-height:1.25; white-space:nowrap; transform:translate(-50%, calc(-100% - 12px)); box-shadow:0 8px 24px rgba(0,0,0,0.4); }
.pc-rmap-tip small { display:block; font-weight:500; color:#334155; }
.pc-rmap-tip.is-below { transform:translate(-50%, 12px); }
.pc-rmap-tip[hidden] { display:none; }
.pc-rmap-hint { position:absolute; left:50%; bottom:14px; z-index:3; transform:translateX(-50%); padding:8px 14px; border-radius:999px; background:rgba(5,11,26,0.9); border:1px solid var(--rv-line); color:#fff; font-size:0.82rem; font-weight:600; white-space:nowrap; pointer-events:none; }
.pc-rmap-hint[hidden] { display:none; }
.pc-rmap-loading { position:absolute; inset:0; display:grid; place-items:center; color:var(--rv-muted); font-size:0.95rem; }

/* ---------- Panneau ---------- */
/* En bureau, le panneau prend la hauteur de la carte et défile à l'intérieur */
.pc-rmap-panel { position:relative; border-left:1px solid var(--rv-line); background:var(--rv-bg); min-width:0; }
.pc-rmap-panel-in { position:absolute; inset:0; overflow-y:auto; overscroll-behavior:contain; padding:26px 24px 24px; }
.pc-rmap-panel h3 { font-family:var(--rv-display); color:#fff; font-size:1.7rem; line-height:1.05; margin:0; }
.pc-rmap-kicker { font-family:var(--rv-display); font-size:0.72rem; letter-spacing:0.18em; text-transform:uppercase; font-weight:700; color:var(--rv-y); margin:0 0 10px; }
.pc-rmap-sub { color:var(--rv-muted); font-size:0.92rem; margin:8px 0 0; }
.pc-rmap-intro { color:var(--rv-text); font-size:0.95rem; line-height:1.55; margin:14px 0 22px; }
.pc-rmap-regs { list-style:none; margin:0; padding:0; border-top:1px solid var(--rv-line); }
.pc-rmap-regs li { border-bottom:1px solid var(--rv-line); }
.pc-rmap-reg, .pc-rmap-row { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 2px; background:transparent; color:var(--rv-text); font-size:0.97rem; text-align:left; }
.pc-rmap-reg:hover, .pc-rmap-row:hover { color:#fff; }
.pc-rmap-reg b, .pc-rmap-row b { font-family:var(--rv-display); font-size:1.05rem; color:var(--rv-y); font-weight:700; white-space:nowrap; }
.pc-rmap-reg .chev, .pc-rmap-row .chev { width:16px; height:16px; color:var(--rv-muted); flex-shrink:0; }
.pc-rmap-row { align-items:flex-start; }
.pc-rmap-row span.t { display:flex; flex-direction:column; gap:3px; min-width:0; }
.pc-rmap-row span.t small { color:var(--rv-muted); font-size:0.84rem; }
.pc-rmap-row.is-private { cursor:default; }
.pc-rmap-back { display:inline-flex; align-items:center; gap:8px; margin:0 0 18px; padding:6px 0; background:transparent; color:var(--rv-muted); font-size:0.88rem; font-weight:600; }
.pc-rmap-back:hover { color:#fff; }
.pc-rmap-back svg { width:15px; height:15px; }
.pc-rmap-sites { list-style:none; margin:20px 0 0; padding:0; display:flex; flex-direction:column; gap:14px; }
.pc-rmap-site { border:1px solid var(--rv-line); background:var(--rv-card); }
.pc-rmap-site-img { display:block; aspect-ratio:16/9; background-size:cover; background-position:center; }
.pc-rmap-site-body { padding:16px 16px 14px; }
.pc-rmap-site-cat { font-size:0.72rem; letter-spacing:0.14em; text-transform:uppercase; color:var(--rv-y); font-weight:700; font-family:var(--rv-display); }
.pc-rmap-site-name { display:block; font-family:var(--rv-display); font-size:1.3rem; color:#fff; font-weight:700; line-height:1.1; margin-top:5px; }
.pc-rmap-ops { list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:7px; }
.pc-rmap-ops li { font-size:0.9rem; line-height:1.4; color:var(--rv-text); display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.pc-rmap-badge { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; font-size:0.72rem; font-weight:700; letter-spacing:0.04em; }
.pc-rmap-badge.is-livre { background:rgba(255,235,0,0.12); color:var(--rv-y); }
.pc-rmap-badge.is-encours { background:rgba(61,180,255,0.14); color:var(--rv-c); }
.pc-rmap-site-link { display:inline-flex; align-items:center; gap:8px; margin-top:12px; color:var(--rv-y) !important; font-weight:700; font-size:0.9rem; }
.pc-rmap-site-link svg { width:16px; height:16px; transition:transform .2s ease; }
.pc-rmap-site-link:hover svg { transform:translateX(3px); }
.pc-rmap-cta { margin-top:22px; padding-top:18px; border-top:1px solid var(--rv-line); font-size:0.92rem; color:var(--rv-text); }
.pc-rmap-cta a { color:var(--rv-y) !important; font-weight:700; }

/* Le thème colore les <button> au survol, au focus et au toucher (fond bleu) : on garde nos fonds */
.pc-rview .pc-rmap-reg, .pc-rview .pc-rmap-row, .pc-rview .pc-rmap-back,
.pc-rview .pc-rmap-reg:hover, .pc-rview .pc-rmap-row:hover, .pc-rview .pc-rmap-back:hover,
.pc-rview .pc-rmap-reg:focus, .pc-rview .pc-rmap-row:focus, .pc-rview .pc-rmap-back:focus,
.pc-rview .pc-rmap-reg:active, .pc-rview .pc-rmap-row:active, .pc-rview .pc-rmap-back:active { background:transparent; box-shadow:none; }
.pc-rview .pc-rmap-filter button:not([aria-pressed="true"]):hover, .pc-rview .pc-rmap-filter button:not([aria-pressed="true"]):focus { background:rgba(255,255,255,0.06); box-shadow:none; }
.pc-rview .pc-rmap-filter button[aria-pressed="true"], .pc-rview .pc-rmap-filter button[aria-pressed="true"]:hover, .pc-rview .pc-rmap-filter button[aria-pressed="true"]:focus { background:rgba(255,255,255,0.12); box-shadow:none; }
.pc-rview .pc-rmap-zoom button:hover, .pc-rview .pc-rmap-zoom button:focus, .pc-rview .pc-rmap-zoom button:active { background:rgba(5,11,26,0.82); box-shadow:none; }
.pc-rview .pc-rview-switch button:not([aria-selected="true"]):hover, .pc-rview .pc-rview-switch button:not([aria-selected="true"]):focus { background:rgba(255,255,255,0.06); box-shadow:none; }
.pc-rview .pc-rview-switch button[aria-selected="true"], .pc-rview .pc-rview-switch button[aria-selected="true"]:hover, .pc-rview .pc-rview-switch button[aria-selected="true"]:focus { background:var(--rv-y); color:var(--rv-bg); box-shadow:none; }
.pc-rview .pc-rlist-wrap > summary:hover { background:transparent; }

/* ---------- Liste en texte (moteurs, IA, sans JavaScript) ---------- */
.pc-rlist-wrap { margin-top:22px; border:1px solid var(--rv-line); background:var(--rv-bg); }
.pc-rlist-wrap > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 22px; font-weight:600; color:#fff; }
.pc-rlist-wrap > summary::-webkit-details-marker { display:none; }
.pc-rlist-wrap > summary svg { width:18px; height:18px; transition:transform .2s ease; color:var(--rv-y); flex-shrink:0; }
.pc-rlist-wrap[open] > summary svg { transform:rotate(180deg); }
.pc-rlist-wrap > summary:focus-visible { outline:2px solid var(--rv-c); outline-offset:-2px; }
.pc-rlist { padding:4px 22px 22px; columns:2 380px; column-gap:40px; }
.pc-rlist-reg { break-inside:avoid-column; margin:0 0 22px; }
.pc-rlist-reg h3 { font-family:var(--rv-display); font-size:1.15rem; color:#fff; margin:0 0 8px; padding-bottom:8px; border-bottom:1px solid var(--rv-line); display:flex; justify-content:space-between; gap:10px; }
.pc-rlist-reg h3 span { color:var(--rv-muted); font-weight:600; font-size:0.9rem; font-family:"Barlow", sans-serif; }
.pc-rlist ul { list-style:none; margin:0; padding:0; }
.pc-rlist li { padding:7px 0; font-size:0.88rem; line-height:1.4; color:var(--rv-muted); break-inside:avoid; }
.pc-rlist li strong { color:var(--rv-text); font-weight:600; }
.pc-rlist li a { color:var(--rv-y); text-decoration:underline; text-underline-offset:3px; }
.pc-rlist-where::before { content:" · "; }
.pc-rlist-ops { display:block; }

@media (max-width:1100px) and (min-width:820px) {
  .pc-rmap { grid-template-columns:minmax(0,1fr) 300px; }
  .pc-rmap-panel-in { padding:20px 18px; }
  .pc-rmap-panel h3 { font-size:1.45rem; }
}
/* Empilé : le panneau suit la carte et s'allonge avec la page, jamais de défilement dans le défilement */
@media (max-width:819px) {
  .pc-rmap { grid-template-columns:1fr; }
  .pc-rmap-panel { border-left:0; border-top:1px solid var(--rv-line); }
  .pc-rmap-panel-in { position:static; max-height:none; overflow:visible; }
}
@media (max-width:640px) {
  .pc-rview-bar { margin:-24px 0 20px; }
  .pc-rview-switch { width:100%; }
  .pc-rview-switch button { flex:1; justify-content:center; padding:11px 10px; }
  .pc-rview-hint { display:none; }
  /* Petit écran : filtres et zoom au-dessus de la carte, légende en dessous, rien ne la recouvre */
  .pc-rmap-stage { display:flex; flex-direction:column; }
  .pc-rmap-tools { position:static; padding:10px; border-bottom:1px solid var(--rv-line); }
  .pc-rmap-filter { display:flex; width:100%; }
  .pc-rmap-filter button { flex:1; padding:9px 6px; font-size:0.82rem; }
  .pc-rmap-zoom { top:10px; right:10px; }
  .pc-rmap-zoom button { width:36px; height:36px; }
  .pc-rmap-legend { position:static; margin:0; border:0; border-top:1px solid var(--rv-line); border-radius:0; background:transparent; font-size:0.76rem; gap:4px 12px; padding:10px 12px; }
  .pc-rmap-panel-in { padding:22px 16px 20px; }
  .pc-rlist { padding:4px 16px 18px; }
  .pc-rlist-wrap > summary { padding:16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-rview *, .pc-rview *::before, .pc-rview *::after { transition:none !important; }
}
