/* Oratorio — onglets « Frise », « Carte de Rome » et « Galaxie » (js/philippe*.js).
   Styles repris du site de l'Oratoire d'Angoulême, redessinés avec les tokens de l'app.
   Tout est rangé sous .ph-page (classe posée par js/philippe.js sur #frise-root, #rome-root
   et #galaxie-root), sauf la vignette de la frise, ajoutée à <body>. */

/* ---------- couleurs propres au module (thèmes clair et sombre) ---------- */
:root{
  /* Les trois fils de la frise */
  --ph-phil:var(--red); --ph-eglise:var(--gold); --ph-univ:#56607A;
  /* Catégories de la galaxie */
  --cat-oratoriens:#2B3F6B; --cat-femmes:var(--red); --cat-contemporains:var(--gold);
  --cat-papes:#5C3A7A; --cat-laics:#2F6F5E; --cat-artistes:#3F7CAC;
  --ph-shadow:0 10px 28px -18px rgba(40,20,40,.55);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ph-univ:#9AA6C4;
    --cat-oratoriens:#8FA6D6; --cat-papes:#B79AD6; --cat-laics:#7CC2AE; --cat-artistes:#86B7DD;
    --ph-shadow:0 10px 28px -14px rgba(0,0,0,.8);
  }
}
:root[data-theme="dark"]{
  --ph-univ:#9AA6C4;
  --cat-oratoriens:#8FA6D6; --cat-papes:#B79AD6; --cat-laics:#7CC2AE; --cat-artistes:#86B7DD;
  --ph-shadow:0 10px 28px -14px rgba(0,0,0,.8);
}
body.ph-lock,body.ph-modal-open{overflow:hidden}

/* ---------- mise en page des pages ---------- */
.ph-page{min-width:0}
.ph-page button{font-family:inherit}
.ph-page .ph-head{gap:10px}
.ph-page .ph-eyebrow{font-family:var(--sc);font-weight:700;letter-spacing:.14em;font-size:13px;color:var(--gold);margin:0 0 -8px}
.ph-page .ph-hint{font-size:15px;color:var(--muted)}
.ph-page .ph-error{margin:0;text-align:center;color:var(--muted)}
.ph-page :focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* ---------- éléments communs : recherche, légende, boutons ronds ---------- */
.ph-page .timeline-frise-search{position:relative;max-width:420px;width:100%}
.ph-page .timeline-frise-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted);pointer-events:none}
.ph-page .timeline-frise-search input{width:100%;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:9px 14px 9px 38px;font:inherit;font-size:15.5px;color:var(--ink);outline:none;-webkit-appearance:none;appearance:none}
.ph-page .timeline-frise-search input:focus{border-color:var(--gold)}
.ph-page .timeline-frise-search-results{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:40;max-height:280px;overflow-y:auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);box-shadow:var(--ph-shadow);padding:6px}
.ph-page .timeline-frise-search-item{display:block;width:100%;text-align:left;padding:8px 10px;border:none;background:none;border-radius:var(--r-sm);font:inherit;font-size:15px;line-height:1.35;color:var(--ink);cursor:pointer}
.ph-page .timeline-frise-search-item:hover{background:var(--soft)}
.ph-page .timeline-frise-search-empty{padding:8px 10px;font-size:15px;color:var(--muted);margin:0}

.ph-page .timeline-frise-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ph-page .timeline-frise-legend button{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border-radius:999px;border:1px solid var(--line);background:var(--paper);font-size:14px;color:var(--ink);cursor:pointer;transition:opacity .2s ease,border-color .2s ease}
.ph-page .timeline-frise-legend button .dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.ph-page #timelineFrisePanel .timeline-frise-legend button[data-cat="philippine"] .dot{background:var(--ph-phil)}
.ph-page #timelineFrisePanel .timeline-frise-legend button[data-cat="eglise"] .dot{background:var(--ph-eglise)}
.ph-page #timelineFrisePanel .timeline-frise-legend button[data-cat="universelle"] .dot{background:var(--ph-univ)}
.ph-page #timelineFrisePanel .timeline-frise-legend button[data-cat]:not(.active){opacity:.5}
.ph-page #timelineFrisePanel .timeline-frise-legend button[data-cat]:not(.active) .dot{background:var(--line)!important}

.ph-page .map-fullscreen-btn,
.ph-page .timeline-frise-zoom button{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:50%;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-family:var(--display);font-size:20px;line-height:1;cursor:pointer}
.ph-page .map-fullscreen-btn:hover,
.ph-page .timeline-frise-zoom button:hover{border-color:var(--red);color:var(--red)}
.ph-page .timeline-frise-zoom button:disabled{opacity:.35;cursor:not-allowed}
.ph-page .map-fullscreen-btn svg,
.ph-page .timeline-frise-zoom svg{width:17px;height:17px;display:block}

/* ---------- frise chronologique ---------- */
.ph-page .timeline-frise-panel{display:flex;flex-direction:column;gap:10px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:14px clamp(10px,3vw,18px);min-width:0}
.ph-page .timeline-frise-zoom{display:inline-flex;gap:4px;margin-left:auto}
.ph-page .timeline-frise-keys-row{display:flex;align-items:center;margin:-2px 0 -4px}
.ph-page .timeline-frise-range{font-family:var(--display);font-size:17px;color:var(--red);font-variant-numeric:lining-nums tabular-nums;white-space:nowrap}

.ph-page .timeline-frise-wrap{position:relative;display:flex;align-items:stretch;gap:6px;min-width:0}
.ph-page .timeline-frise-nav{flex:0 0 auto;width:30px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--ground);color:var(--red);font-family:var(--display);font-size:22px;line-height:1;cursor:pointer;padding:0}
.ph-page .timeline-frise-nav:hover{border-color:var(--red)}
@media (max-width:480px){.ph-page .timeline-frise-nav{display:none}}
.ph-page .timeline-frise{flex:1 1 auto;min-width:0;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;background:var(--ground);border:1px solid var(--line);border-radius:var(--r-sm);max-height:calc(100vh - 150px);min-height:340px}
.ph-page .timeline-frise-track{position:relative;padding:16px 32px 20px;font-family:var(--body)}
.ph-page .timeline-frise-axis{position:relative;height:22px;margin-bottom:10px;border-bottom:1px solid var(--line)}
.ph-page .timeline-frise-tick{position:absolute;bottom:5px;transform:translateX(-50%);font-family:var(--display);font-size:14px;color:var(--muted);white-space:nowrap;font-variant-numeric:lining-nums}
.ph-page .timeline-frise-tick::after{content:"";position:absolute;left:50%;bottom:-5px;width:1px;height:5px;background:var(--line)}
.ph-page .timeline-frise-gridline{position:absolute;top:32px;bottom:0;width:1px;background:var(--line);opacity:.55;pointer-events:none}

/* Un groupe par fil, avec son liseré ; chaque piste réserve --lane-pad pour son étiquette */
.ph-page .timeline-frise-group{position:relative;z-index:1;border-left:3px solid;border-radius:0 4px 4px 0;padding:2px 0;margin-bottom:6px}
.ph-page .timeline-frise-group-universelle{border-color:var(--ph-univ);background:color-mix(in srgb,var(--ph-univ) 5%,transparent)}
.ph-page .timeline-frise-group-eglise{border-color:var(--ph-eglise);background:color-mix(in srgb,var(--ph-eglise) 6%,transparent)}
.ph-page .timeline-frise-group-philippine{border-color:var(--ph-phil);background:color-mix(in srgb,var(--ph-phil) 5%,transparent)}
.ph-page .timeline-frise-lane{position:relative;--lane-pad:18px;margin-bottom:2px}
.ph-page .timeline-frise-lane-florence,.ph-page .timeline-frise-lane-france,.ph-page .timeline-frise-lane-empire{height:44px}
.ph-page .timeline-frise-lane-papes{height:46px}
.ph-page .timeline-frise-lane-periodes,.ph-page .timeline-frise-lane-periodes-universelle,.ph-page .timeline-frise-lane-periodes-eglise{height:70px}
.ph-page .timeline-frise-lane-title{position:sticky;left:10px;top:0;z-index:5;display:inline-flex;align-items:center;height:16px;margin:1px 0 0 10px;padding:0 8px;border-radius:999px;font-family:var(--sc);font-weight:700;font-size:11.5px;letter-spacing:.08em;white-space:nowrap;background:var(--paper);border:1px solid var(--line)}
.ph-page .timeline-frise-group-universelle .timeline-frise-lane-title{color:var(--ph-univ)}
.ph-page .timeline-frise-group-eglise .timeline-frise-lane-title{color:var(--ph-eglise)}
.ph-page .timeline-frise-group-philippine .timeline-frise-lane-title{color:var(--ph-phil)}

/* Libellé des barres longues : reste visible tant que la barre traverse l'écran */
.ph-page .timeline-frise-pope-bar>span,.ph-page .timeline-frise-florence-bar>span,.ph-page .timeline-frise-france-bar>span,.ph-page .timeline-frise-empire-bar>span,.ph-page .timeline-frise-period-bar>span{position:sticky;left:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:100%}

/* Événements ponctuels */
.ph-page .timeline-frise-point{position:absolute;top:var(--lane-pad);transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;background:none;border:none;cursor:pointer;padding:0 4px;color:inherit}
.ph-page .timeline-frise-point-body{display:flex;flex-direction:column;align-items:center;gap:1px;padding-top:3px}
.ph-page .timeline-frise-point-dot{width:13px;height:13px;border-radius:50%;border:2px solid var(--paper);box-shadow:0 0 0 1.5px var(--line);transition:transform .15s ease}
.ph-page .timeline-frise-philippine .timeline-frise-point-dot{background:var(--ph-phil)}
.ph-page .timeline-frise-eglise .timeline-frise-point-dot{background:var(--ph-eglise)}
.ph-page .timeline-frise-universelle .timeline-frise-point-dot{background:var(--ph-univ)}
.ph-page .timeline-frise-point-year{font-family:var(--display);font-size:14px;color:var(--ink);white-space:nowrap;font-variant-numeric:lining-nums}
.ph-page .timeline-frise-point-label{width:124px;max-width:124px;font-size:12.5px;line-height:1.25;color:var(--muted);text-align:center;white-space:normal}
.ph-page .timeline-frise-point:hover .timeline-frise-point-dot,.ph-page .timeline-frise-point:focus-visible .timeline-frise-point-dot{transform:scale(1.3)}
.ph-page .timeline-frise-point:hover .timeline-frise-point-label{color:var(--ink)}

/* Barres : papes (or), règnes (fil universel), périodes */
.ph-page .timeline-frise-pope-bar,.ph-page .timeline-frise-florence-bar,.ph-page .timeline-frise-france-bar,.ph-page .timeline-frise-empire-bar,.ph-page .timeline-frise-period-bar{position:absolute;top:var(--lane-pad);display:flex;align-items:center;padding:0 10px;border-radius:var(--r-sm);border:none;cursor:pointer;font-family:var(--body);font-weight:500;font-size:13px;transition:background .15s ease}
.ph-page .timeline-frise-pope-bar{height:30px;background:color-mix(in srgb,var(--ph-eglise) 20%,transparent);color:var(--ink)}
.ph-page .timeline-frise-pope-bar:hover,.ph-page .timeline-frise-pope-bar:focus-visible{background:color-mix(in srgb,var(--ph-eglise) 36%,transparent)}
.ph-page .timeline-frise-florence-bar,.ph-page .timeline-frise-france-bar,.ph-page .timeline-frise-empire-bar{height:28px;color:var(--ink)}
.ph-page .timeline-frise-florence-bar{background:color-mix(in srgb,var(--ph-univ) 18%,transparent)}
/* Rois de France cerclés, empereurs en pointillés : même teinte, trois traitements */
.ph-page .timeline-frise-france-bar{background:var(--paper);border:1.5px solid color-mix(in srgb,var(--ph-univ) 55%,transparent)}
.ph-page .timeline-frise-empire-bar{background:color-mix(in srgb,var(--ph-univ) 6%,transparent);border:1.5px dashed color-mix(in srgb,var(--ph-univ) 55%,transparent)}
.ph-page .timeline-frise-florence-bar:hover,.ph-page .timeline-frise-france-bar:hover,.ph-page .timeline-frise-empire-bar:hover,
.ph-page .timeline-frise-florence-bar:focus-visible,.ph-page .timeline-frise-france-bar:focus-visible,.ph-page .timeline-frise-empire-bar:focus-visible{background:color-mix(in srgb,var(--ph-univ) 28%,transparent)}
.ph-page .timeline-frise-period-bar{height:24px;background:color-mix(in srgb,var(--ph-phil) 14%,transparent);color:var(--ink)}
.ph-page .timeline-frise-period-bar:hover,.ph-page .timeline-frise-period-bar:focus-visible{background:color-mix(in srgb,var(--ph-phil) 26%,transparent)}
.ph-page .timeline-frise-period-universelle{background:color-mix(in srgb,var(--ph-univ) 16%,transparent)}
.ph-page .timeline-frise-period-universelle:hover,.ph-page .timeline-frise-period-universelle:focus-visible{background:color-mix(in srgb,var(--ph-univ) 28%,transparent)}
.ph-page .timeline-frise-period-eglise{background:color-mix(in srgb,var(--ph-eglise) 18%,transparent)}

/* Vue d'ensemble (« minimap ») : cadre de la portion visible, à cliquer ou faire glisser */
.ph-page .timeline-frise-minimap{position:relative;height:24px;padding:0 34px;display:flex;align-items:center;touch-action:none}
.ph-page .timeline-frise-minimap::before{content:"";position:absolute;left:30px;right:30px;top:50%;transform:translateY(-50%);height:8px;border-radius:var(--r-sm);background:var(--ground);border:1px solid var(--line)}
.ph-page .timeline-frise-minimap-start,.ph-page .timeline-frise-minimap-end{position:absolute;font-family:var(--display);font-size:13px;color:var(--muted);font-variant-numeric:lining-nums}
.ph-page .timeline-frise-minimap-start{left:0}
.ph-page .timeline-frise-minimap-end{right:0}
.ph-page .timeline-frise-minimap-viewport{position:absolute;top:50%;height:16px;min-width:14px;transform:translateY(-50%);border-radius:var(--r-sm);background:var(--gold);opacity:.75;cursor:grab}
.ph-page .timeline-frise-minimap-viewport:active{opacity:.95;cursor:grabbing}

/* Frise en plein écran */
.ph-page .timeline-frise-panel.is-fullscreen{position:fixed;inset:0;z-index:1000;width:auto;margin:0;border:none;border-radius:0;background:var(--ground);padding:calc(10px + env(safe-area-inset-top,0px)) 12px calc(8px + env(safe-area-inset-bottom,0px));overflow:auto}
.ph-page .timeline-frise-panel.is-fullscreen .timeline-frise-wrap{flex:1 1 auto;min-height:0}
.ph-page .timeline-frise-panel.is-fullscreen .timeline-frise{max-height:none;min-height:0;background:var(--paper)}

/* Vignette de détail (ajoutée à <body>, en position:fixed calculée par le JS) */
.timeline-frise-card{position:fixed;z-index:1100;width:260px;max-width:calc(100vw - 16px);max-height:calc(100vh - 24px);overflow-y:auto;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-sm);box-shadow:var(--ph-shadow);padding:16px;text-align:left;font-family:var(--body)}
.timeline-frise-card img{width:100%;aspect-ratio:1/1.2;object-fit:cover;object-position:top;border-radius:var(--r-sm);margin-bottom:12px;display:block}
.timeline-frise-card strong{display:block;font-family:var(--display);font-weight:400;font-size:20px;line-height:1.2;padding-right:24px}
.timeline-frise-card-dates{display:block;font-size:14px;line-height:1.4;color:var(--gold);margin:4px 0 8px}
.timeline-frise-card p{margin:0;font-size:15px;line-height:1.5;color:var(--ink)}
.timeline-frise-card p+p{margin-top:8px}
.timeline-frise-card.is-long{width:360px}
.timeline-frise-card-close{position:absolute;top:10px;right:10px;width:26px;height:26px;border-radius:50%;border:1px solid var(--line);background:var(--ground);color:var(--ink);font-size:12px;cursor:pointer;padding:0}
.timeline-frise-card-map-btn{display:block;width:100%;margin-top:12px;padding:7px 10px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--ink);font:inherit;font-size:14px;text-align:center;cursor:pointer}
.timeline-frise-card-map-btn:hover,.timeline-frise-card-close:hover{border-color:var(--red);color:var(--red)}

/* ---------- carte des lieux ---------- */
.ph-page #rome-map{height:440px;width:100%;border-radius:var(--r-sm);overflow:hidden;border:1px solid var(--line);background:var(--ground);isolation:isolate;position:relative;z-index:0;font-family:var(--body)}
@media (min-width:640px){.ph-page #rome-map{height:520px}}
.ph-page #rome-map.is-loading::after{content:"Chargement de la carte…";position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:15px}
.ph-page #rome-map.is-offline{display:grid;place-items:center;height:auto;min-height:160px;padding:24px 18px;background:var(--paper)}
.ph-page .rome-map-offline{margin:0;text-align:center;font-family:var(--display);font-size:19px;line-height:1.4}
.ph-page .rome-map-offline small{font-family:var(--body);font-size:14.5px;color:var(--muted)}
.ph-page .rome-map-offline .btn{margin-top:12px}
.ph-page .map-mini-link{margin:0;font-size:14px;color:var(--muted)}

.ph-page .oratoire-dot{background:none;border:none}
.ph-page .oratoire-dot span{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;background:var(--red);color:var(--red-ink);font-family:var(--body);font-size:11px;font-weight:500;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35)}
.ph-page .oratoire-cluster{background:none;border:none}
.ph-page .oratoire-cluster span{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;background:var(--ink);color:var(--paper);font-family:var(--body);font-weight:500;font-size:13px;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.4);cursor:pointer}
.ph-page .oratoire-cluster:hover span{background:var(--red);color:var(--red-ink)}
.ph-page .leaflet-tooltip.oratoire-label{background:var(--paper);color:var(--ink);border:1px solid var(--line);font-family:var(--body);font-size:12.5px;padding:1px 7px;border-radius:var(--r-sm);box-shadow:0 1px 4px rgba(0,0,0,.18);white-space:nowrap}
.ph-page .leaflet-tooltip-top.oratoire-label::before{border-top-color:var(--line)}
.ph-page .leaflet-popup-content-wrapper,.ph-page .leaflet-popup-tip{background:var(--paper);color:var(--ink);box-shadow:var(--ph-shadow)}
.ph-page .leaflet-popup-content-wrapper{border-radius:var(--r-sm);border:1px solid var(--line)}
.ph-page .leaflet-popup-content{margin:12px 14px;font-family:var(--body);font-size:14.5px;line-height:1.45}
.ph-page .leaflet-container a.leaflet-popup-close-button{color:var(--muted)}
.ph-page .oratoire-popup h4{font-family:var(--display);font-weight:400;font-size:18px;line-height:1.2;margin:0 0 2px;color:var(--ink);padding-right:12px}
.ph-page .oratoire-popup p{margin:0 0 6px;color:var(--ink)}
.ph-page .oratoire-popup-italian{font-size:13.5px;color:var(--muted)!important}
.ph-page .rome-popup-frise-btn{display:block;width:100%;margin-top:10px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);background:transparent;color:var(--ink);font:inherit;font-size:14px;text-align:center;cursor:pointer}
.ph-page .rome-popup-frise-btn:hover{border-color:var(--red);color:var(--red)}
.ph-page .map-scroll-hint{position:absolute;left:50%;bottom:16px;transform:translate(-50%,6px);background:var(--ink);color:var(--paper);font-size:14px;padding:6px 14px;border-radius:999px;pointer-events:none;opacity:0;transition:opacity .2s ease,transform .2s ease;z-index:500;white-space:nowrap}
.ph-page .map-scroll-hint.is-visible{opacity:1;transform:translate(-50%,0)}
.ph-page .leaflet-control-attribution{background:color-mix(in srgb,var(--paper) 85%,transparent);color:var(--muted)}
.ph-page .leaflet-control-attribution a{color:var(--muted)}

/* Liste numérotée des lieux, sous la carte */
.ph-page .rome-places{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.ph-page .rome-places button{display:flex;align-items:center;gap:12px;width:100%;height:100%;text-align:left;padding:10px 12px 10px 10px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;font:inherit}
.ph-page .rome-places button:hover{border-color:var(--red)}
.ph-page .rome-places li.is-highlight button{border-color:var(--gold);box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 30%,transparent)}
.ph-page .rome-places-num{flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:var(--red);color:var(--red-ink);display:inline-flex;align-items:center;justify-content:center;font-family:var(--display);font-size:15px;font-variant-numeric:lining-nums}
.ph-page .rome-places-body{display:flex;flex-direction:column;min-width:0}
.ph-page .rome-places-body strong{font-weight:500;font-size:15.5px;line-height:1.25}
.ph-page .rome-places-body span{font-size:14px;color:var(--muted);margin-top:2px}

/* ---------- autres personnalités ---------- */
.ph-page .oratory-figures-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.ph-page .oratory-figure-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--r-sm);padding:20px clamp(18px,5vw,28px);display:flex;flex-direction:column;gap:8px;transition:box-shadow .3s ease,border-color .3s ease}
.ph-page .oratory-figure-card h3{margin:0;font-family:var(--display);font-weight:400;font-size:22px;line-height:1.2}
.ph-page .oratory-figure-card p{margin:0;max-width:62ch}
.ph-page .oratory-figure-years{color:var(--muted);font-size:15px;font-variant-numeric:lining-nums}
.ph-page .oratory-figure-relation{color:var(--gold);font-size:15.5px}
.ph-page .oratory-figure-source{font-size:14px;color:var(--muted);font-style:italic}
.ph-page .oratory-figure-card.is-search-highlight{border-color:var(--gold);box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 30%,transparent)}

/* ---------- galaxie (js/philippe-galaxie.js) ----------
   Écran large : constellation — Philippe au centre, six familles en blocs tout autour, reliées
   par un rayon ; fiche à droite (≥ 1200 px) ou en feuille (en dessous).
   Téléphone (< 900 px) : familles l'une après l'autre, en cartes. */
.ph-page .gx-panel{display:flex;flex-direction:column;gap:14px;min-width:0}
.ph-page .gx-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.ph-page .gx-search{flex:1 1 260px}
.ph-page .gx-status{margin:0;font-size:15px;color:var(--muted);flex:1 1 240px}
.ph-page .gx-status:empty{display:none}
.ph-page .gx-ext{background:none;border:0;padding:0;font:inherit;color:var(--red);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.ph-page .gx-dot{width:10px;height:10px;border-radius:50%;background:var(--c,var(--gold));flex-shrink:0}

/* légende = filtres */
.ph-page .gx-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.ph-page .gx-legend-title{font-size:14.5px;color:var(--muted);margin-right:2px}
.ph-page .gx-legend button{display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border-radius:999px;border:1px solid var(--line);background:var(--paper);font-size:14.5px;line-height:1.3;color:var(--ink);cursor:pointer;transition:background-color .15s ease,color .15s ease,border-color .15s ease}
.ph-page .gx-legend button:hover{border-color:var(--c,var(--ink))}
.ph-page .gx-legend button.is-focused{background:var(--c);border-color:var(--c);color:var(--paper)}
.ph-page .gx-legend button.is-focused .gx-dot{background:var(--paper)}
.ph-page .gx-legend button.is-focused .gx-legend-n{color:inherit}
.ph-page .gx-legend-n{font-size:13px;color:var(--muted);font-variant-numeric:lining-nums}
.ph-page .gx-legend .gx-legend-all{border-style:dashed;color:var(--red)}

/* vignettes */
.ph-page .gx-face{width:var(--s,48px);height:var(--s,48px);flex:none;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;border:2.5px solid var(--c,var(--ink));background:color-mix(in srgb,var(--c,var(--ink)) 13%,var(--paper));transition:transform .18s ease,box-shadow .18s ease}
.ph-page .gx-face img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.ph-page .gx-initials{font-family:var(--display);font-weight:600;color:var(--c,var(--ink));font-size:calc(var(--s,48px) * .36);line-height:1;font-variant-numeric:lining-nums}
.ph-page .gx-cloud{position:relative;display:block;width:100%;height:100%}
.ph-page .gx-cloud i{position:absolute;border-radius:50%;background:var(--c,var(--ink));opacity:.7}
.ph-page .gx-cloud i:nth-child(1){width:34%;height:34%;top:19%;left:17%}
.ph-page .gx-cloud i:nth-child(2){width:28%;height:28%;top:24%;right:15%}
.ph-page .gx-cloud i:nth-child(3){width:25%;height:25%;bottom:15%;left:37%}
.ph-page .gx-cell.is-group .gx-face{border-style:dashed}

.ph-page .gx-family{position:relative;min-width:0;background:var(--paper);border:1px solid var(--line);border-top:3px solid var(--c);border-radius:var(--r-sm);padding:10px;transition:opacity .25s ease,box-shadow .25s ease}
.ph-page .gx-family-head{margin:0 0 8px;font:inherit}
.ph-page .gx-family-btn{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;border-radius:8px;padding:3px 4px;font-family:var(--sc);font-weight:700;letter-spacing:.04em;font-size:15px;line-height:1.2;color:var(--c);text-align:left;cursor:pointer}
.ph-page .gx-family-btn:hover{background:color-mix(in srgb,var(--c) 9%,transparent)}
.ph-page .gx-count{margin-left:auto;min-width:24px;height:22px;padding:0 7px;border-radius:999px;background:var(--c);color:var(--paper);font-family:var(--body);font-size:13.5px;letter-spacing:0;display:inline-flex;align-items:center;justify-content:center;font-variant-numeric:lining-nums}
.ph-page .gx-family.is-focused{box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 35%,transparent),var(--ph-shadow)}
.ph-page .gx-people{list-style:none;margin:0;padding:0;display:grid}
.ph-page .gx-person{display:flex;width:100%;background:none;border:0;font:inherit;color:var(--ink);cursor:pointer;border-radius:10px;transition:background-color .15s ease,opacity .2s ease}
.ph-page .gx-text{display:flex;flex-direction:column;min-width:0}
.ph-page .gx-name{font-size:13.5px;line-height:1.2}
.ph-page .gx-years{font-size:13.5px;color:var(--muted);font-variant-numeric:lining-nums}
.ph-page .gx-rel{font-size:14px;line-height:1.35;color:var(--muted)}
.ph-page .gx-person:hover .gx-face,.ph-page .gx-person:focus-visible .gx-face,.ph-page .gx-person.is-active .gx-face{box-shadow:0 0 0 4px color-mix(in srgb,var(--c) 28%,transparent)}
.ph-page .gx-person:hover,.ph-page .gx-person.is-active{background:color-mix(in srgb,var(--c) 8%,transparent)}
.ph-page .gx-person.is-selected{background:color-mix(in srgb,var(--c) 14%,transparent)}
.ph-page .gx-person.is-selected .gx-name{font-weight:700}
.ph-page .gx-person:focus-visible{outline-offset:0}
.ph-page .is-searching .gx-cell.is-match .gx-face{box-shadow:0 0 0 4px color-mix(in srgb,var(--gold) 60%,transparent)}
.ph-page .is-searching .gx-cell.is-match .gx-name{font-weight:700}

/* Philippe */
.ph-page .gx-hub-btn{background:none;border:0;font:inherit;color:var(--ink);cursor:pointer;padding:4px}
.ph-page .gx-hub .gx-face{border:4px solid var(--gold);background:var(--paper);box-shadow:0 0 0 7px color-mix(in srgb,var(--gold) 16%,transparent),var(--ph-shadow)}
.ph-page .gx-hub-name{font-family:var(--display);font-size:19px;line-height:1.15}
.ph-page .gx-hub-years{font-size:14.5px;color:var(--muted);font-variant-numeric:lining-nums}
.ph-page .gx-hub-btn.is-selected .gx-hub-name{text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:3px}

/* fiche */
.ph-page .gx-details{--c:var(--gold);background:var(--paper);color:var(--ink);border:1px solid var(--line);border-top:4px solid var(--c);border-radius:var(--r-sm);padding:18px 18px 20px;min-width:0}
.ph-page .gx-details-close{position:absolute;top:10px;right:10px;width:40px;height:40px;display:none;align-items:center;justify-content:center;border-radius:50%;border:1px solid var(--line);background:var(--paper);color:var(--ink);font-size:15px;cursor:pointer}
.ph-page .gx-details-close:hover{background:var(--red);border-color:var(--red);color:var(--red-ink)}
.ph-page .gx-d-head{display:flex;align-items:center;gap:14px;margin:0 0 14px}
.ph-page .gx-d-head h3{font-family:var(--display);font-weight:600;font-size:22px;line-height:1.2;margin:0;text-wrap:balance}
.ph-page .gx-d-head .gx-face{border-width:3px}
.ph-page .gx-d-cat{display:flex;align-items:center;gap:6px;margin:0 0 3px;font-family:var(--sc);font-weight:700;letter-spacing:.06em;font-size:13.5px;line-height:1.2;color:var(--c)}
.ph-page .gx-d-cat.is-root{color:var(--gold)}
.ph-page .gx-d-years{margin:3px 0 0;color:var(--muted);font-size:15px;line-height:1.3;font-variant-numeric:lining-nums}
.ph-page .gx-d-rel{background:color-mix(in srgb,var(--c) 9%,var(--paper));border-left:3px solid var(--c);border-radius:8px;padding:10px 12px;margin:0 0 12px}
.ph-page .gx-d-label{margin:0;font-family:var(--sc);font-weight:700;letter-spacing:.08em;font-size:13px;color:var(--muted)}
.ph-page .gx-d-reltext{margin:2px 0 0;font-size:16.5px;line-height:1.4}
.ph-page .gx-d-via{margin:6px 0 0;font-size:15px;line-height:1.4}
.ph-page .gx-d-info{margin:0 0 10px;font-size:16px;line-height:1.5}
.ph-page .gx-d-source{margin:0 0 10px;font-size:14px;color:var(--muted);font-style:italic}
.ph-page .gx-d-sub{margin:16px 0 8px;font-family:var(--sc);font-weight:700;letter-spacing:.06em;font-size:14.5px;color:var(--gold)}
.ph-page .gx-d-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.ph-page .gx-d-links li{display:flex;flex-direction:column;align-items:flex-start;font-size:14.5px;line-height:1.35}
.ph-page .gx-d-links li span{color:var(--muted)}
.ph-page .gx-goto{background:none;border:0;padding:0;font:inherit;font-size:15.5px;color:var(--red);text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left}
.ph-page .gx-d-fams{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:5px}
.ph-page .gx-goto-fam{display:flex;align-items:center;gap:8px;width:100%;background:none;border:1px solid var(--line);border-radius:999px;padding:5px 12px;font:inherit;font-size:15px;line-height:1.3;color:var(--ink);cursor:pointer;text-align:left}
.ph-page .gx-goto-fam:hover{border-color:var(--c)}
.ph-page .gx-goto-fam .gx-legend-n{margin-left:auto}
.ph-page .gx-d-hint{margin:0;font-size:14.5px;color:var(--muted)}

/* ≥ 1200 px : fiche dans une colonne collante à droite */
@media (min-width:1200px){
  .ph-page .gx-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(280px,22vw,340px);gap:20px;align-items:start}
  .ph-page .gx-details{position:sticky;top:78px;max-height:calc(100vh - 94px);max-height:calc(100dvh - 94px);overflow-y:auto;box-shadow:var(--ph-shadow)}
}
/* < 1200 px : fiche en feuille qui monte du bas de l'écran */
@media (max-width:1199.98px){
  .ph-page .gx-details{position:fixed;left:0;right:0;bottom:0;z-index:1100;max-width:640px;margin:0 auto;max-height:min(84vh,720px);max-height:min(84dvh,720px);overflow-y:auto;border-radius:var(--r) var(--r) 0 0;border-bottom:0;padding:22px clamp(18px,5vw,28px) calc(24px + env(safe-area-inset-bottom,0px));box-shadow:0 -20px 50px -20px rgba(0,0,0,.45);transform:translateY(105%);visibility:hidden;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear .28s}
  .ph-page .gx-details.is-open{transform:none;visibility:visible;transition:transform .28s cubic-bezier(.2,.8,.2,1),visibility 0s linear 0s}
  .ph-page .gx-details-close{display:flex}
  .ph-page .gx-details .gx-d-head{padding-right:44px}
  .ph-page .gx-backdrop{position:fixed;inset:0;z-index:1090;background:rgba(20,14,28,.55)}
}

/* ≥ 900 px : la constellation */
@media (min-width:900px){
  .ph-page .gx-stage{position:relative;display:flex;flex-direction:column;gap:26px;padding:6px 0 10px;min-width:0}
  .ph-page .gx-rays,.ph-page .gx-link{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
  .ph-page .gx-rays{z-index:0}
  .ph-page .gx-link{z-index:3}
  .ph-page .gx-row{position:relative;display:flex;flex-wrap:wrap;justify-content:center;gap:16px}
  .ph-page .gx-row-top{align-items:flex-end}
  .ph-page .gx-row-mid{align-items:center}
  .ph-page .gx-row-bottom{align-items:flex-start}
  .ph-page .gx-family{width:calc(var(--cols,3) * var(--cell,88px) + (var(--cols,3) - 1) * 6px + 22px);max-width:100%}
  .ph-page .gx-people{grid-template-columns:repeat(var(--cols,3),minmax(0,var(--cell,88px)));gap:8px 6px}
  .ph-page .gx-cell.is-group{grid-column:span 2}
  .ph-page .gx-person{flex-direction:column;align-items:center;gap:4px;padding:3px 1px 5px;text-align:center}
  .ph-page .gx-person .gx-face{margin-top:calc(52px - var(--s,46px))}
  .ph-page .gx-person:hover .gx-face,.ph-page .gx-person.is-active .gx-face{transform:scale(1.06)}
  .ph-page .gx-name{overflow-wrap:break-word;hyphens:manual}
  .ph-page .gx-years,.ph-page .gx-rel{display:none}
  .ph-page .gx-hub{position:relative;z-index:4;flex:0 0 176px;width:176px;display:flex;justify-content:center}
  .ph-page .gx-hub-btn{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
  .ph-page .gx-hub-name{background:var(--red);color:var(--red-ink);padding:3px 13px;border-radius:999px;margin-top:6px}
  .ph-page .gx-ray{fill:none;stroke:var(--c);stroke-width:2;stroke-linecap:round;opacity:.42;transition:opacity .2s ease,stroke-width .2s ease}
  .ph-page .gx-ray-end{fill:var(--c);opacity:.7;transition:opacity .2s ease}
  .ph-page .gx-ray.is-active{opacity:.95;stroke-width:3}
  .ph-page .gx-ray.is-faded,.ph-page .gx-ray-end.is-faded{opacity:.08}
  .ph-page .gx-link-halo{fill:none;stroke:var(--paper);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
  .ph-page .gx-link-line{fill:none;stroke:var(--c);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:7 5}
  .ph-page .has-filter .gx-family.is-faded{opacity:.28}
  .ph-page .is-searching .gx-cell.is-miss{opacity:.25}
  .ph-page .is-searching .gx-family.is-empty{opacity:.4}
}

/* < 900 px : familles l'une après l'autre, en cartes */
@media (max-width:899.98px){
  .ph-page .gx-stage{display:flex;flex-direction:column;gap:14px;min-width:0}
  .ph-page .gx-rays,.ph-page .gx-link{display:none}
  .ph-page .gx-row{display:contents}
  .ph-page .gx-hub{order:-1}
  .ph-page .gx-hub-btn{display:grid;grid-template-columns:auto 1fr;column-gap:14px;align-items:center;width:100%;text-align:left;background:var(--paper);border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:var(--r-sm);padding:12px 14px}
  .ph-page .gx-hub .gx-face{grid-row:1 / span 2;width:72px;height:72px;box-shadow:0 0 0 5px color-mix(in srgb,var(--gold) 16%,transparent)}
  .ph-page .gx-hub-name{align-self:end;font-size:21px}
  .ph-page .gx-hub-years{align-self:start}
  .ph-page .gx-family{padding:12px}
  .ph-page .gx-people{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:8px}
  .ph-page .gx-person{flex-direction:row;align-items:center;gap:12px;padding:9px 10px;text-align:left;border:1px solid var(--line);background:var(--ground)}
  .ph-page .gx-person .gx-face{width:50px;height:50px}
  .ph-page .gx-person .gx-initials{font-size:17px}
  .ph-page .gx-name{font-size:16.5px;font-weight:700;line-height:1.25}
  .ph-page .gx-rel{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:2px}
  .ph-page .has-filter .gx-family.is-faded,
  .ph-page .is-searching .gx-cell.is-miss,
  .ph-page .is-searching .gx-family.is-empty{display:none}
}

@media (prefers-reduced-motion:reduce){
  .ph-page .gx-face,.ph-page .gx-family,.ph-page .gx-person,.ph-page .gx-ray,.ph-page .gx-ray-end,.ph-page .gx-details,.ph-page .gx-details.is-open,.ph-page .gx-legend button{transition:none}
  .ph-page .gx-person:hover .gx-face,.ph-page .gx-person.is-active .gx-face{transform:none}
}
.ph-page .is-searching .gx-hub.is-miss{opacity:.5}
.ph-page .is-searching .gx-hub.is-match .gx-face{box-shadow:0 0 0 7px color-mix(in srgb,var(--gold) 60%,transparent)}
@media (max-width:899.98px){
  .ph-page .gx-legend{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}
  .ph-page .gx-legend::-webkit-scrollbar{display:none}
  .ph-page .gx-legend > *{flex:none}
  .ph-page .gx-legend button{font-size:14px;padding:5px 11px}
}
