/* ========================================================================= */
/* FAMILYSAVE — ADAPTATION MULTI-SUPPORTS (SMARTPHONE, TABLETTE, PC, TV 4K)  */
/* Fichier : responsive-multi-devices.css (chargé après style.css)           */
/* ========================================================================= */

/* --- 1. PAGE DE GARDE : STRUCTURE ADAPTATIVE & BOUTON SON HORS DU LOGO --- */
.fs-cover-page {
 padding: clamp(12px, 3vh, 36px) clamp(12px, 3vw, 40px);
 padding-top: max(clamp(12px, 3vh, 36px), env(safe-area-inset-top, 0px));
 padding-bottom: max(clamp(12px, 3vh, 36px), env(safe-area-inset-bottom, 0px));
}

.fs-cover-inner {
 width: 100%;
 max-width: 960px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: clamp(14px, 2.6vh, 28px);
 margin: auto;
}

.fs-cover-brand-col {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 10px;
 flex-shrink: 0;
}

.fs-cover-video-frame {
 width: clamp(152px, 38vw, 240px);
 height: clamp(152px, 38vw, 240px);
 aspect-ratio: 1 / 1;
 border-radius: 1.5rem;
 overflow: hidden;
 border: 1px solid rgba(255, 255, 255, 0.16);
 background: #000000;
 box-shadow: 0 0 56px var(--color-primary-glow);
 position: relative;
}

.fs-cover-video-frame video {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}

/* Barre de contrôle son STRICTEMENT SOUS le logo (zéro recouvrement) */
.fs-cover-sound-bar {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 100%;
}

.fs-cover-sound-btn {
 position: static !important;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 7px;
 padding: 6px 14px;
 border-radius: 9999px;
 background: rgba(15, 23, 42, 0.85);
 border: 1px solid rgba(255, 255, 255, 0.18);
 color: #f8fafc;
 font-size: 11px;
 font-weight: 700;
 cursor: pointer;
 transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.fs-cover-sound-btn:hover {
 background: rgba(30, 41, 59, 0.96);
 border-color: var(--color-primary);
}

#cover-login-card {
 width: 100%;
 max-width: 430px;
}

/* --- 2. SMARTPHONE PORTRAIT (<= 767px) --- */
@media (max-width: 767px) and (orientation: portrait) {
 .fs-cover-inner {
  gap: 12px;
 }
 .fs-cover-video-frame {
  width: clamp(132px, 36vw, 195px);
  height: clamp(132px, 36vw, 195px);
  border-radius: 1.25rem;
 }
 #cover-login-card {
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
 }
}

/* --- 3. SMARTPHONE PAYSAGE (hauteur réduite) --- */
@media (max-height: 540px) and (orientation: landscape) {
 .fs-cover-inner {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 760px;
 }
 .fs-cover-video-frame {
  width: clamp(128px, 34dvh, 195px);
  height: clamp(128px, 34dvh, 195px);
  border-radius: 1.1rem;
 }
 #cover-login-card {
  max-width: 390px;
  padding: 0.9rem 1.15rem;
 }
 #cover-login-card h1 {
  font-size: 1.05rem;
 }
 #cover-login-card .space-y-3\.5 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.55rem;
 }
}

/* --- 4. TABLETTE (768px à 1279px) --- */
@media (min-width: 768px) and (max-width: 1279px) {
 .fs-cover-inner {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 48px);
  max-width: 880px;
 }
 .fs-cover-video-frame {
  width: clamp(210px, 28vw, 290px);
  height: clamp(210px, 28vw, 290px);
 }
 #cover-login-card {
  flex: 1;
  max-width: 440px;
 }
}

/* --- 5. PC / DESKTOP (>= 1280px) --- */
@media (min-width: 1280px) {
 .fs-cover-inner {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 5vw, 72px);
  max-width: 1060px;
 }
 .fs-cover-video-frame {
  width: clamp(260px, 24vw, 340px);
  height: clamp(260px, 24vw, 340px);
  border-radius: 2rem;
 }
 #cover-login-card {
  max-width: 460px;
  padding: 1.85rem;
 }
}

/* --- 6. TÉLÉVISION FULL HD (1920px+) & 4K UHD (2560px+) --- */
@media (min-width: 1920px) {
 /* Zone de sécurité TV (overscan) & confort de lecture à distance */
 html {
  font-size: 18px;
 }

 .fs-cover-page {
  padding: 4vh 5vw;
 }

 .fs-cover-inner {
  max-width: 1320px;
  gap: 80px;
 }

 .fs-cover-video-frame {
  width: clamp(340px, 22vw, 440px);
  height: clamp(340px, 22vw, 440px);
  border-radius: 2.25rem;
 }

 .fs-cover-sound-btn {
  padding: 9px 20px;
  font-size: 14px;
 }

 #cover-login-card {
  max-width: 540px;
  padding: 2.25rem;
  border-radius: 2rem;
 }

 #sidebar {
  width: 290px;
 }

 #main-view {
  padding: 28px 36px;
 }

 /* Anneaux de focus haute visibilité pour télécommande TV / clavier */
 button:focus-visible,
 input:focus-visible,
 select:focus-visible,
 textarea:focus-visible,
 [tabindex]:focus-visible {
  outline: 3px solid #fbbf24 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.28) !important;
 }
}

@media (min-width: 2560px) {
 html {
  font-size: 21px;
 }

 .fs-cover-inner {
  max-width: 1580px;
  gap: 100px;
 }

 .fs-cover-video-frame {
  width: 480px;
  height: 480px;
 }

 #cover-login-card {
  max-width: 620px;
 }
}

/* --- 7. ANIMATIONS INTERACTIVES MON AVATAR 3D --- */
#av3d-stage-card[data-reaction="idle"] .av3d-rig {
 animation: avBreath 3.6s ease-in-out infinite;
}
#av3d-stage-card[data-reaction="smile"] .av3d-rig {
 animation: avBounce 0.8s ease-in-out infinite alternate;
}
#av3d-stage-card[data-reaction="talk"] .av3d-rig {
 animation: avTalk 0.42s ease-in-out infinite alternate;
}
#av3d-stage-card[data-reaction="surprised"] .av3d-rig {
 animation: avJump 0.55s ease-out 2;
}
#av3d-stage-card[data-reaction="vibe"] .av3d-rig {
 animation: avVibe 0.65s ease-in-out infinite alternate;
}
.av3d-wave-hand {
 transform-origin: 238px 190px;
 animation: avWave 0.45s ease-in-out infinite alternate;
}
@keyframes avBreath {
 0%, 100% { transform: translateY(0) scale(1); }
 50% { transform: translateY(-4px) scale(1.015); }
}
@keyframes avBounce {
 0% { transform: translateY(0) scale(1); }
 100% { transform: translateY(-7px) scale(1.03); }
}
@keyframes avTalk {
 0% { transform: rotate(-1.5deg) scale(1); }
 100% { transform: rotate(1.5deg) scale(1.02); }
}
@keyframes avJump {
 0%, 100% { transform: translateY(0) scale(1); }
 45% { transform: translateY(-14px) scale(1.06); }
}
@keyframes avVibe {
 0% { transform: rotate(-5deg) translateY(0); }
 100% { transform: rotate(5deg) translateY(-6px); }
}
@keyframes avWave {
 0% { transform: translate(238px, 190px) rotate(-14deg); }
 100% { transform: translate(238px, 190px) rotate(18deg); }
}

/* ========================================================================= */
/* V7.1 — CORRECTIF CONNEXION SUR TÉLÉPHONE (100dvh, TOUCH, SCROLL FLUIDE)   */
/* ========================================================================= */
.fs-cover-page {
 min-height: 100dvh;
 height: 100dvh;
 overflow-y: auto !important;
 -webkit-overflow-scrolling: touch;
 align-items: flex-start !important;
 justify-content: flex-start !important;
 padding-top: max(16px, env(safe-area-inset-top, 16px)) !important;
 padding-bottom: max(28px, env(safe-area-inset-bottom, 28px)) !important;
}
.fs-cover-page .fs-cover-inner {
 margin-top: auto;
 margin-bottom: auto;
}
.fs-cover-page button,
.fs-cover-page input {
 touch-action: manipulation;
}
@media (max-width: 767px) {
 .fs-cover-page {
  padding-left: 12px !important;
  padding-right: 12px !important;
 }
 .fs-cover-video-frame {
  width: 124px !important;
  height: 124px !important;
 }
 #cover-login-card {
  max-width: 100% !important;
 }
}


/* ========================================================================= */
/* SAVESPHERE PROPOSITION 3 — CARROUSEL 3D DE SPHÈRES & CONNEXION COMPACTE   */
/* ========================================================================= */
.fs-cover-inner {
 max-width: 1040px;
}

.ss-hero-stage {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 14px;
 width: 100%;
 max-width: 470px;
 user-select: none;
}

.ss-master-brand {
 display: inline-flex;
 align-items: center;
 gap: 12px;
 padding: 8px 16px 8px 10px;
 border-radius: 9999px;
 background: rgba(15, 23, 42, 0.72);
 border: 1px solid rgba(255, 255, 255, 0.14);
 -webkit-backdrop-filter: blur(12px);
 backdrop-filter: blur(12px);
 box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.ss-master-logo-orb {
 position: relative;
 width: 48px;
 height: 48px;
 border-radius: 9999px;
 overflow: hidden;
 display: flex;
 align-items: center;
 justify-content: center;
 background: radial-gradient(circle, rgba(217,164,65,0.22), rgba(15,23,42,0.9));
 border: 1px solid rgba(255, 255, 255, 0.2);
 flex-shrink: 0;
}

.ss-master-logo-img {
 position: relative;
 z-index: 2;
 width: 42px;
 height: 42px;
 object-fit: contain;
 animation: ssSlowSpin 28s linear infinite;
}

.ss-master-bg-video {
 position: absolute;
 inset: 0;
 width: 100%;
 height: 100%;
 object-fit: cover;
 opacity: 0.28;
 z-index: 1;
 pointer-events: none;
}

@keyframes ssSlowSpin {
 0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

/* Scène du Carrousel 3D */
.ss-carousel-wrapper {
 position: relative;
 width: 100%;
 height: 245px;
 display: flex;
 align-items: center;
 justify-content: center;
 perspective: 1100px;
}

.ss-carousel-3d {
 position: relative;
 width: 100%;
 height: 100%;
 transform-style: preserve-3d;
}

.ss-sphere-node {
 position: absolute;
 top: 50%;
 left: 50%;
 width: 148px;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 8px;
 background: transparent;
 border: none;
 cursor: pointer;
 transition:
  transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
  opacity 0.45s ease,
  filter 0.45s ease;
}

.ss-sphere-node[data-slot="center"] {
 z-index: 20;
 opacity: 1;
 filter: brightness(1.06);
 transform: translate(-50%, -54%) translateZ(70px) scale(1.12);
}

.ss-sphere-node[data-slot="left"] {
 z-index: 10;
 opacity: 0.84;
 filter: brightness(0.88);
 transform: translate(-148%, -48%) translateZ(-40px) rotateY(22deg) scale(0.84);
}

.ss-sphere-node[data-slot="right"] {
 z-index: 10;
 opacity: 0.84;
 filter: brightness(0.88);
 transform: translate(48%, -48%) translateZ(-40px) rotateY(-22deg) scale(0.84);
}

.ss-sphere-node:hover {
 opacity: 1;
 filter: brightness(1.12);
}

.ss-sphere-orb {
 position: relative;
 z-index: 2;
 width: 112px;
 height: 112px;
 border-radius: 9999px;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: transform 0.35s ease;
}

.ss-sphere-node[data-slot="center"] .ss-sphere-orb {
 animation: ssFloatSphere 4.2s ease-in-out infinite;
}

.ss-sphere-orb img {
 width: 100%;
 height: 100%;
 object-fit: contain;
 filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
}

@keyframes ssFloatSphere {
 0%, 100% { transform: translateY(0px); }
 50% { transform: translateY(-7px); }
}

.ss-sphere-halo {
 position: absolute;
 top: 6px;
 width: 104px;
 height: 104px;
 border-radius: 9999px;
 filter: blur(22px);
 opacity: 0.25;
 z-index: 1;
 transition: opacity 0.4s ease, transform 0.4s ease;
 pointer-events: none;
}

.ss-sphere-node[data-slot="center"] .ss-sphere-halo {
 opacity: 0.72;
 transform: scale(1.22);
}

.ss-sphere-family .ss-sphere-halo { background: #e13b84; }
.ss-sphere-friends .ss-sphere-halo { background: #10b981; }
.ss-sphere-work .ss-sphere-halo { background: #2563eb; }

.ss-sphere-caption {
 display: flex;
 flex-direction: column;
 align-items: center;
 text-align: center;
 line-height: 1.2;
}

.ss-sphere-name {
 font-size: 13px;
 font-weight: 800;
 color: #f8fafc;
 letter-spacing: -0.01em;
}

.ss-sphere-desc {
 font-size: 10px;
 font-weight: 600;
 color: #94a3b8;
}

.ss-sphere-node[data-slot="center"] .ss-sphere-desc {
 color: #e2e8f0;
}

.ss-carousel-arrow {
 position: absolute;
 top: 44%;
 transform: translateY(-50%);
 z-index: 30;
 width: 32px;
 height: 32px;
 border-radius: 9999px;
 background: rgba(15, 23, 42, 0.82);
 border: 1px solid rgba(255, 255, 255, 0.16);
 color: #e2e8f0;
 font-size: 11px;
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: all 0.2s ease;
}

.ss-carousel-arrow:hover {
 background: var(--color-primary);
 color: #ffffff;
 border-color: transparent;
}

.ss-carousel-pedestal {
 position: absolute;
 bottom: 6px;
 width: 78%;
 height: 28px;
 border-radius: 9999px;
 background: radial-gradient(ellipse at center, rgba(148, 163, 184, 0.22) 0%, rgba(15, 23, 42, 0) 72%);
 border-bottom: 1px solid rgba(255, 255, 255, 0.1);
 pointer-events: none;
}

.ss-explore-pill {
 display: inline-flex;
 align-items: center;
 gap: 7px;
 padding: 6px 15px;
 border-radius: 9999px;
 background: rgba(255, 255, 255, 0.06);
 border: 1px solid rgba(255, 255, 255, 0.14);
 color: #e2e8f0;
 font-size: 11px;
 font-weight: 700;
 letter-spacing: 0.01em;
}

#cover-login-card {
 max-width: 390px;
}

@media (max-width: 767px) {
 .ss-carousel-wrapper {
  height: 205px;
 }
 .ss-sphere-orb {
  width: 88px;
  height: 88px;
 }
 .ss-sphere-node[data-slot="left"] {
  transform: translate(-124%, -48%) translateZ(-40px) rotateY(20deg) scale(0.8);
 }
 .ss-sphere-node[data-slot="right"] {
  transform: translate(24%, -48%) translateZ(-40px) rotateY(-20deg) scale(0.8);
 }
}

.fs-cover-page {
 background:
  radial-gradient(circle at 30% 45%, var(--ss-active-glow, rgba(225, 59, 132, 0.24)) 0%, transparent 52%),
  radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.14) 0%, transparent 48%),
  #020617 !important;
 transition: background 0.5s ease, opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ss-sphere-ring {
 position: absolute;
 top: -4px;
 width: 120px;
 height: 120px;
 border-radius: 9999px;
 border: 2px solid transparent;
 opacity: 0;
 transform: scale(0.88);
 transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
 pointer-events: none;
}

.ss-sphere-node[data-slot="center"] .ss-sphere-ring {
 opacity: 0.85;
 transform: scale(1.06);
}
.ss-sphere-family[data-slot="center"] .ss-sphere-ring { border-color: rgba(244, 114, 182, 0.65); }
.ss-sphere-friends[data-slot="center"] .ss-sphere-ring { border-color: rgba(52, 211, 153, 0.65); }
.ss-sphere-work[data-slot="center"] .ss-sphere-ring { border-color: rgba(96, 165, 250, 0.65); }

@media (hover: hover) and (pointer: fine) {
 .ss-sphere-node[data-slot="left"]:hover {
  transform: translate(-144%, -52%) translateZ(0px) rotateY(10deg) scale(0.95);
 }
 .ss-sphere-node[data-slot="right"]:hover {
  transform: translate(44%, -52%) translateZ(0px) rotateY(-10deg) scale(0.95);
 }
}

.ss-sphere-node.is-pulsing .ss-sphere-orb {
 animation: ssSelectPulse 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ssSelectPulse {
 0% { transform: scale(0.9); }
 50% { transform: scale(1.12) rotate(12deg); }
 100% { transform: scale(1); }
}

.ss-card-pop {
 animation: ssCardPop 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ssCardPop {
 0% { transform: scale(0.985); }
 50% { transform: scale(1.012); }
 100% { transform: scale(1); }
}

.ss-sphere-node[data-slot="back"] {
 z-index: 5;
 opacity: 0.56;
 filter: brightness(0.76);
 transform: translate(-50%, -86%) translateZ(-120px) scale(0.64);
}
.ss-sphere-node[data-slot="back"]:hover {
 opacity: 0.92;
 filter: brightness(1.02);
 transform: translate(-50%, -84%) translateZ(-70px) scale(0.74);
}
.ss-sphere-association .ss-sphere-halo { background: #d97706; }
.ss-sphere-association[data-slot="center"] .ss-sphere-ring { border-color: rgba(251, 191, 36, 0.72); }


/* ========================================================================= */
/* V24 — LOGO ANIMÉ ALTERNÉ, APERÇU GRISÉ & FINITION MOBILE ANTI-CHEVAUCHEMENT */
/* ========================================================================= */
.ss-anim-main-logo {
 animation: ssAlternatingSpin 8s ease-in-out infinite;
 will-change: transform;
}

@keyframes ssAlternatingSpin {
 0%   { transform: rotate(-14deg) scale(0.98); }
 50%  { transform: rotate(16deg) scale(1.03); }
 100% { transform: rotate(-14deg) scale(0.98); }
}

.ss-sphere-locked-blur {
 filter: grayscale(1) opacity(0.42) !important;
 pointer-events: none !important;
 user-select: none !important;
 transition: filter 0.35s ease;
}

/* Anti-superposition Carrousel 3D à 4 Sphères sur mobiles & petits écrans */
@media (max-width: 767px) {
 .ss-hero-stage {
  gap: 10px;
  padding-top: 4px;
 }
 .ss-carousel-wrapper {
  height: 220px;
  margin-top: 8px;
 }
 .ss-sphere-node {
  width: 118px;
 }
 .ss-sphere-orb {
  width: 78px;
  height: 78px;
 }
 .ss-sphere-node[data-slot="center"] {
  transform: translate(-50%, -44%) translateZ(60px) scale(1.08);
 }
 .ss-sphere-node[data-slot="left"] {
  transform: translate(-116%, -42%) translateZ(-35px) rotateY(18deg) scale(0.76);
 }
 .ss-sphere-node[data-slot="right"] {
  transform: translate(16%, -42%) translateZ(-35px) rotateY(-18deg) scale(0.76);
 }
 .ss-sphere-node[data-slot="back"] {
  transform: translate(-50%, -94%) translateZ(-120px) scale(0.52);
  opacity: 0.45;
 }
 .ss-carousel-arrow {
  top: 50%;
  width: 28px;
  height: 28px;
 }
}


/* ========================================================================= */
/* V25 — BANDEAUX ULTRA-COMPACTS, CORRECTIFS MOBILE & ARBRE IMMERSIF 1+3     */
/* ========================================================================= */
.ss-slim-header {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 padding: 8px 12px;
 border-radius: 14px;
 background: rgba(15, 23, 42, 0.72);
 border: 1px solid rgba(255, 255, 255, 0.10);
 -webkit-backdrop-filter: blur(12px);
 backdrop-filter: blur(12px);
 min-height: 44px;
}

.ss-slim-title {
 display: inline-flex;
 align-items: center;
 gap: 8px;
 font-family: var(--fs-font-heading, 'Outfit', sans-serif);
 font-weight: 800;
 font-size: 15px;
 line-height: 1.15;
 color: #ffffff;
 white-space: nowrap;
}

.ss-slim-pills {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 2px;
 border-radius: 10px;
 background: rgba(2, 6, 23, 0.55);
 border: 1px solid rgba(255, 255, 255, 0.10);
}

.ss-slim-pill {
 padding: 4px 10px;
 border-radius: 8px;
 font-size: 11px;
 font-weight: 700;
 color: #cbd5e1;
 transition: all 0.16s ease;
 white-space: nowrap;
}
.ss-slim-pill:hover {
 color: #ffffff;
 background: rgba(255, 255, 255, 0.08);
}
.ss-slim-pill.is-active {
 background: var(--color-primary, #0ea5e9);
 color: #ffffff;
 box-shadow: 0 0 12px var(--color-primary-glow, rgba(14,165,233,0.4));
}

/* Mobile Carousel Ring & Safe-Area Polish (Android & iPhone) */
@media (max-width: 767px) {
 .ss-carousel-wrapper {
  height: 196px !important;
  margin-top: 4px !important;
 }
 .ss-sphere-node {
  width: 108px !important;
 }
 .ss-sphere-orb {
  width: 72px !important;
  height: 72px !important;
 }
 .ss-sphere-ring {
  top: -4px !important;
  width: 80px !important;
  height: 80px !important;
 }
 .ss-sphere-halo {
  width: 70px !important;
  height: 70px !important;
 }
 .ss-sphere-node[data-slot="center"] {
  transform: translate(-50%, -44%) translateZ(50px) scale(1.06) !important;
 }
 .ss-sphere-node[data-slot="left"] {
  transform: translate(-114%, -42%) translateZ(-35px) rotateY(16deg) scale(0.75) !important;
 }
 .ss-sphere-node[data-slot="right"] {
  transform: translate(14%, -42%) translateZ(-35px) rotateY(-16deg) scale(0.75) !important;
 }
 .ss-sphere-node[data-slot="back"] {
  transform: translate(-50%, -92%) translateZ(-110px) scale(0.48) !important;
  opacity: 0.42 !important;
 }
 .ss-sphere-name {
  font-size: 11px !important;
 }
 .ss-sphere-desc {
  font-size: 9px !important;
 }
 .ss-explore-pill {
  display: none !important;
 }
 .ss-slim-header {
  padding: 7px 9px;
  gap: 6px;
 }
 #ss-locked-sphere-banner {
  top: 4px;
 }
 #main-view {
  overflow-x: hidden !important;
 }
}

/* ========================================================================= */
/* ARBRE GÉNÉALOGIQUE IMMERSIF V25 : TOILE INFINIE + MINIMAP + COULOIRS 3D   */
/* ========================================================================= */
.fs-tree3d-shell.is-fullscreen {
 position: fixed !important;
 inset: 0 !important;
 z-index: 280 !important;
 border-radius: 0 !important;
 max-height: 100dvh !important;
 height: 100dvh !important;
}

.fs-tree3d-viewport.is-panning {
 cursor: grabbing !important;
 user-select: none !important;
}

.fs-tree3d-viewport {
 cursor: grab;
 touch-action: pan-x pan-y;
}

/* Quick creation buttons on Tree Cards (+Parent / +Conjoint / +Enfant) */
.fs-tree-card-shell {
 position: relative;
 display: flex;
 flex-direction: column;
 align-items: center;
}

.fs-tree-quick-actions {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 4px;
 margin-top: 4px;
 opacity: 0.85;
 transition: opacity 0.2s ease;
}
.fs-tree-card-shell:hover .fs-tree-quick-actions {
 opacity: 1;
}
.fs-tree-qbtn {
 padding: 2px 6px;
 border-radius: 999px;
 font-size: 9px;
 font-weight: 800;
 background: rgba(15, 23, 42, 0.9);
 border: 1px solid rgba(255, 255, 255, 0.18);
 color: #e2e8f0;
 cursor: pointer;
 transition: all 0.15s ease;
}
.fs-tree-qbtn:hover {
 background: var(--color-primary, #0ea5e9);
 color: #ffffff;
 border-color: transparent;
}

/* Lineage Highlighting */
.fs-tree3d-card.is-lineage-focus {
 border-color: #fbbf24 !important;
 box-shadow: 0 0 26px rgba(251, 191, 36, 0.55) !important;
 transform: translateY(-2px) scale(1.03);
}
.fs-tree3d-card.is-lineage-dim {
 opacity: 0.35;
 filter: saturate(0.4);
}

/* Minimap Radar (Toile Infinie) */
.fs-tree-minimap {
 position: absolute;
 right: 12px;
 bottom: 12px;
 z-index: 35;
 width: 176px;
 padding: 8px;
 border-radius: 14px;
 background: rgba(2, 6, 23, 0.88);
 border: 1px solid rgba(56, 189, 248, 0.35);
 -webkit-backdrop-filter: blur(10px);
 backdrop-filter: blur(10px);
 box-shadow: 0 12px 30px rgba(0,0,0,0.65);
}
@media (max-width: 640px) {
 .fs-tree-minimap {
  width: 136px;
  right: 8px;
  bottom: 8px;
  padding: 6px;
 }
}

/* Mode 2 : Couloirs Générationnels 3D */
.fs-tree-corridors-wrap {
 display: flex;
 flex-direction: column;
 gap: 18px;
 width: 100%;
 max-width: 1120px;
 margin: 0 auto;
 padding: 12px 8px 40px;
}

.fs-tree-corridor-lane {
 position: relative;
 border-radius: 20px;
 padding: 14px 16px;
 background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.55) 100%);
 border: 1px solid rgba(56, 189, 248, 0.25);
 box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48);
 transition: transform 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 768px) {
 .fs-tree-corridor-lane:hover {
  transform: translateZ(16px) translateY(-2px);
  border-color: var(--color-primary, #38bdf8);
 }
}

.fs-tree-epoch-rail {
 position: sticky;
 top: 8px;
 z-index: 25;
 display: flex;
 align-items: center;
 gap: 6px;
 overflow-x: auto;
 padding: 6px 10px;
 border-radius: 12px;
 background: rgba(2, 6, 23, 0.86);
 border: 1px solid rgba(255, 255, 255, 0.12);
 -webkit-backdrop-filter: blur(10px);
 backdrop-filter: blur(10px);
}


/* ========================================================================= */
/* V26 — ERGONOMIE APPLI PWA MOBILE / TABLETTE & STUDIO VIDÉO IA             */
/* ========================================================================= */
@media all and (display-mode: standalone) {
 #btn-cover-install-pwa,
 #btn-sidebar-install-pwa {
  display: none !important;
 }
}

@media (max-width: 1024px) {
 /* Cibles tactiles confortables sur smartphone & tablette (Apple HIG / Material) */
 .ss-slim-pill,
 .adm-nav-btn,
 .fs-mnav-btn {
  min-height: 36px;
 }
 .ss-slim-header {
  position: relative;
  z-index: 15;
 }
 /* Évite tout débordement horizontal sur les tableaux en mode mobile/tablette */
 table {
  max-width: 100%;
 }
 .adm-panel {
  max-width: 100%;
 }
}

@media (max-width: 767px) {
 /* Barre basse mobile plus lisible avec safe-area iPhone */
 #fs-mobile-bottom-nav {
  min-height: 58px;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
 }
 .fs-mnav-btn span {
  font-size: 10px;
  line-height: 1.1;
 }
 .ss-slim-pills {
  max-width: 100%;
  overflow-x: auto;
 }
}

.vs-preset-card {
 transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.vs-preset-card:hover {
 transform: translateY(-2px);
}
