/* ═══════════════════════════════════════════════════════════════════════
   KLYX CARD v3 — « Dual Persona » (chargé APRÈS style.css)
   Profil digital en hub Bento (plus de carte virtuelle), dégradés libres,
   blocs réorganisables, interrupteur Pro / Casual.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────── PROFIL : fond dégradé + grain ───────── */
.profile { --ink: #EDEDED; --ink-2: rgba(237,237,237,.66); --ink-3: rgba(237,237,237,.42); --tile: rgba(255,255,255,.06); --tile-2: rgba(255,255,255,.1); --tile-line: rgba(255,255,255,.09); color: var(--ink); }
.profile[data-tone="light"] { --ink: #0b0b0d; --ink-2: rgba(11,11,13,.68); --ink-3: rgba(11,11,13,.46); --tile: rgba(255,255,255,.38); --tile-2: rgba(255,255,255,.55); --tile-line: rgba(0,0,0,.08); }
.p-grad { position: absolute; inset: 0; background: linear-gradient(160deg, #2b2e34, #07080a); transition: background .35s ease; }
.p-grain { position: absolute; inset: 0; background: var(--noise); opacity: .9; mix-blend-mode: normal; pointer-events: none; }
.profile .p-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 55% at 50% -8%, rgba(255,255,255,.08), transparent 70%); pointer-events: none; }
.profile[data-tone="light"] .p-live { display: none; }
.profile[data-tone="light"] .p-watermark-in span { color: rgba(0,0,0,.08); }
.profile .p-scroll { padding: 58px 16px 26px; }
.profile--full .p-scroll { max-width: 460px; padding: 64px 18px 56px; }
.profile .p-banner span.pill { background: rgba(0,0,0,.32); color: rgba(237,237,237,.74); }
.profile .p-foot { color: var(--ink-3); }

/* ───────── BLOCS ───────── */
.p-blocks { display: flex; flex-direction: column; gap: 10px; }
.pb { min-width: 0; }
.tile {
  position: relative; display: block; min-width: 0; text-decoration: none; color: inherit;
  border-radius: 20px; background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-line), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .5s var(--ease), background-color .2s ease;
  touch-action: manipulation;
}
a.tile:active, .p-save:active { transform: scale(.975); transition-duration: .12s; }
@media (hover: hover) and (pointer: fine) { a.tile:hover { background: var(--tile-2); } }

/* En-tête */
.pb-header { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 4px 10px; }
.profile .p-avatar { width: 96px; height: 96px; margin: 0 0 16px; font-size: 30px; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 0 0 6px rgba(255,255,255,.04), 0 24px 44px -18px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.12); }
.profile .p-avatar span { color: #EDEDED; }
.profile .p-name { color: var(--ink); font-size: 26px; margin: 0; }
.profile .p-role { color: var(--ink-2); margin-top: 6px; }
.profile .p-company { color: var(--ink-3); }
.p-handle { margin-top: 10px; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 6px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line); font: 500 13px/1 var(--font-text); color: var(--ink-2); }
.profile .is-ph { color: var(--ink-3) !important; opacity: .7; }

/* Bio */
.pb-bio { padding: 16px 18px; }
.pb-bio p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.profile[data-facet="pro"] .pb-bio { text-align: center; background: transparent; box-shadow: none; padding: 0 12px 6px; }
.profile[data-facet="casual"] .pb-bio p { font-size: 15.5px; color: var(--ink); }

/* Contact + vCard */
.profile .p-quick { margin: 0 0 10px; gap: 8px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.profile .p-q { height: 58px; border-radius: 18px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.profile .p-quick[data-n="3"] .p-q { flex-direction: column; gap: 5px; height: 66px; font-size: 12.5px; }
.profile .p-q[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.profile .p-save { margin-top: 0; height: 54px; border-radius: 18px; }
.profile[data-tone="light"] .p-save { background: #0b0b0d; color: #F3F3F3; box-shadow: 0 12px 24px -14px rgba(0,0,0,.6); }

/* Réseaux : grille Bento */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bento[data-n="1"] > .tile, .bento[data-n="3"] > .tile:first-child, .bento[data-n="5"] > .tile:first-child { grid-column: 1 / -1; }
.tile-social { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px; padding: 14px; }
.bento[data-n="1"] .tile-social, .bento[data-n="3"] .tile-social:first-child, .bento[data-n="5"] .tile-social:first-child { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 70px; gap: 14px; }
.tile-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: #EDEDED; }
.profile[data-tone="light"] .tile-ic { background: rgba(0,0,0,.82); }
.tile-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-t b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.tile-t small { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile[data-facet="pro"] .tile-social { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px; border-radius: 16px; }
.profile[data-facet="pro"] .tile-social .tile-ic { width: 34px; height: 34px; border-radius: 10px; }

/* Musique */
.tile-music { padding: 12px; overflow: hidden; }
.music-row { display: flex; align-items: center; gap: 12px; }
.music-row .tile-t { flex: 1; }
.tile-music .tile-ic { background: #1ed760; color: #06140b; box-shadow: none; }
.tile-music:not([data-service="Spotify"]) .tile-ic { background: rgba(0,0,0,.35); color: #EDEDED; }
.music-play { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #EDEDED; color: #060607; transition: transform .45s var(--ease); touch-action: manipulation; }
.music-play .ico { width: 16px; height: 16px; fill: currentColor; stroke: none; margin-left: 2px; }
.music-play:active { transform: scale(.92); transition-duration: .12s; }
.music-open { flex: none; height: 32px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 500; text-decoration: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--tile-line); }
.tile-music.is-playing .music-play { display: none; }
.music-embed { display: block; width: 100%; margin-top: 12px; border: 0; border-radius: 12px; background: rgba(0,0,0,.3); }

/* Liens personnalisés */
.profile .p-links { list-style: none; display: grid; gap: 8px; }
.profile .p-link { display: grid; grid-template-columns: 18px auto minmax(0, 1fr) 14px; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: 18px; color: var(--ink); background: var(--tile); box-shadow: inset 0 0 0 1px var(--tile-line); }
.profile .p-link-v { color: var(--ink-3); }
.profile .p-link .chev { opacity: .45; }

.profile .p-create { margin-top: 22px; }
.profile[data-tone="light"] .p-create { color: #0b0b0d; background: rgba(255,255,255,.4); border-color: rgba(0,0,0,.1); }

/* Casual : typographie plus expressive, tuiles plus rondes */
.profile[data-facet="casual"] .p-name { font-size: 30px; letter-spacing: -.035em; }
.profile[data-facet="casual"] .tile, .profile[data-facet="casual"] .p-q, .profile[data-facet="casual"] .p-link, .profile[data-facet="casual"] .p-save { border-radius: 22px; }

/* Entrée échelonnée du profil public (une seule fois, sans bloquer le toucher) */
.profile.is-enter .pb { animation: pIn .8s var(--ease) backwards; }
.profile.is-enter .pb:nth-child(2) { animation-delay: .05s; }
.profile.is-enter .pb:nth-child(3) { animation-delay: .1s; }
.profile.is-enter .pb:nth-child(4) { animation-delay: .15s; }
.profile.is-enter .pb:nth-child(n+5) { animation-delay: .2s; }

/* Mini-téléphone de l'accueil : pas de fond animé */
.profile[data-mode="demo"] .p-live { display: none; }

/* ───────── STUDIO : interrupteur d'identité ───────── */
.modebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin: -8px 0 28px; }
.modebar-edit { flex: 1 1 360px; max-width: 460px; min-width: 0; }
.modebar-l { display: block; margin-bottom: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.seg--mode button { height: 48px; font-size: 14.5px; }
.seg--mode .seg-ind { top: 4px; bottom: 4px; }
.studio[data-edit="casual"] .seg--mode .seg-ind { background: linear-gradient(135deg, rgba(120,80,190,.32), rgba(255,255,255,.08)); }
.scan-pick { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--line); }
.scan-pick button { position: relative; height: 34px; padding: 0 14px 0 26px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .2s ease, background-color .25s ease; touch-action: manipulation; }
.scan-pick button::before { content: ""; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--dim); transition: background-color .2s ease, box-shadow .2s ease; }
.scan-pick button[aria-checked="true"] { color: var(--text); background: rgba(255,255,255,.09); }
.scan-pick button[aria-checked="true"]::before { background: #EDEDED; box-shadow: 0 0 0 3px rgba(237,237,237,.14); }
.facet-intro { margin: 0 0 22px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* Champs propres à une identité */
.studio-config [data-edit="pro"] .only-casual, .studio-config [data-edit="casual"] .only-pro { display: none !important; }
.legend-opt { margin-left: 10px; font: 400 12px/1 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--dim); }
.inp-at { position: absolute; left: 15px; top: 50%; transform: translateY(-52%); font-size: 15px; color: var(--dim); pointer-events: none; }
.inp-ico .inp-at + .inp { padding-left: 34px; }
.fset legend { display: flex; align-items: baseline; width: 100%; }

/* Liens personnalisés (édition) */
.links-edit { list-style: none; display: grid; gap: 10px; }
.link-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) 44px; gap: 8px; align-items: center; }
.link-del { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--dim); transition: color .2s ease, background-color .2s ease; }
@media (hover: hover) { .link-del:hover { color: #F0B8AA; background: rgba(229,140,120,.1); } }
.links-add { margin-top: 12px; }
.links-edit:empty + .links-add { margin-top: 0; }

/* ───────── STUDIO : générateur de dégradé ───────── */
.grad-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grad-preset { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 6px 6px 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.022); text-align: left; transition: border-color .25s ease, background-color .25s ease, transform .5s var(--ease); touch-action: manipulation; }
.grad-preset:active { transform: scale(.97); transition-duration: .12s; }
.grad-preset[aria-pressed="true"] { border-color: rgba(237,237,237,.55); background: rgba(255,255,255,.05); }
@media (hover: hover) { .grad-preset:hover { border-color: var(--line-2); } }
.grad-preset-vis { display: block; aspect-ratio: 4 / 3; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.grad-preset-l { padding: 0 4px; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; }
.grad-preset .swatch-check { top: 12px; right: 12px; }
.grad-preset[aria-pressed="true"] .swatch-check { opacity: 1; transform: none; }

.grad-live { position: relative; height: 120px; margin-bottom: 18px; border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.grad-live > i { position: absolute; inset: 0; transition: background .2s ease; }
.grad-live::after { content: ""; position: absolute; inset: 0; background: var(--noise); pointer-events: none; }
.grad-dial { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); transition: transform .25s var(--ease); }
.grad-dial i { position: absolute; left: 50%; top: 5px; width: 2px; height: 13px; margin-left: -1px; border-radius: 1px; background: #fff; }
.grad-live[data-tone="light"] .grad-dial { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.55); }
.grad-live[data-tone="light"] .grad-dial i { background: #000; }
.grad-colors { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 10px; align-items: end; }
.grad-pick { display: flex; gap: 8px; align-items: center; }
.grad-pick input[type="color"] { flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.grad-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.grad-pick input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-2); border-radius: 12px; }
.grad-pick input[type="color"]::-moz-color-swatch { border: 1px solid var(--line-2); border-radius: 12px; }
.inp-hex { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.grad-swap { width: 44px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s ease, background-color .2s ease, transform .45s var(--ease); }
.grad-swap:active { transform: scale(.92); }
@media (hover: hover) { .grad-swap:hover { color: var(--text); background: rgba(255,255,255,.05); } }
.grad-angle { margin-top: 18px; }
.grad-angle input[type="range"] { width: 100%; height: 30px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.grad-angle input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
.grad-angle input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #EDEDED; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.grad-angle input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }
.grad-angle input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #EDEDED; }
.grad-dirs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.grad-dirs button { width: 40px; height: 36px; border-radius: 10px; font-size: 15px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s ease, background-color .2s ease; touch-action: manipulation; }
.grad-dirs button[aria-pressed="true"] { color: var(--text); background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ───────── STUDIO : blocs réorganisables ───────── */
.blocks-list { list-style: none; display: grid; gap: 8px; }
.block-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 8px 8px 4px; border-radius: 16px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s ease, background-color .2s ease; }
.blocks-list.is-sorting .block-row:not(.is-drag) { transition: box-shadow .2s ease; }
.block-row.is-drag { z-index: 2; background: #17171b; box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 36px -14px rgba(0,0,0,.9); }
.block-grip { width: 36px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--dim); cursor: grab; touch-action: none; }
.block-grip .ico { stroke-width: 2.6; }
.block-row.is-drag .block-grip { cursor: grabbing; color: var(--text); }
.block-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.block-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.block-t b { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.block-t small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-empty { flex: none; font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 5px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.block-btns { display: flex; gap: 2px; flex: none; }
.block-mv { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: color .2s ease, background-color .2s ease; touch-action: manipulation; }
.block-mv[disabled] { opacity: .25; pointer-events: none; }
@media (hover: hover) { .block-mv:hover { color: var(--text); background: rgba(255,255,255,.06); } }
.blocks-reset { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-size: 13px; }

/* Miniatures dégradé (Mes cartes, suppression, commande) */
.cards-mini { width: 40px; flex: none; aspect-ratio: 1.586; border-radius: 6px; background: linear-gradient(160deg, #2b2e34, #07080a); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 6px 12px -6px rgba(0,0,0,.9); }
.order-recap .recap-sw { width: 56px; }

/* Espace client : bascule Pro / Casual par carte */
.acct-item { flex-wrap: wrap; }
.acct-mode { display: flex; align-items: center; gap: 4px; flex-basis: 100%; margin: -2px 0 6px 10px; }
.acct-mode-l { margin-right: 6px; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.acct-mode button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s ease, background-color .2s ease, opacity .2s ease; touch-action: manipulation; }
.acct-mode button[aria-checked="true"] { color: #060607; background: #EDEDED; box-shadow: none; }
.acct-mode.is-busy button { opacity: .5; pointer-events: none; }

/* ───────── ONBOARDING ───────── */
dialog.dlg--onboard { max-width: 500px; }
.dlg--onboard .dlg-title { margin-top: 14px; }
.onboard-picks { display: grid; gap: 10px; margin-top: 22px; }
.onboard-pick { display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 14px; border-radius: 18px; text-align: left; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .2s ease, box-shadow .2s ease, transform .45s var(--ease); touch-action: manipulation; }
.onboard-pick:active { transform: scale(.985); transition-duration: .12s; }
@media (hover: hover) { .onboard-pick:hover { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line-2); } }
.onboard-vis { width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center; color: #EDEDED; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.onboard-vis--pro { background: linear-gradient(160deg, #2b2e34, #07080a); }
.onboard-vis--casual { background: linear-gradient(150deg, #3b1670, #07060d); }
.onboard-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.onboard-t b { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.onboard-t small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.onboard-pick .chev { color: var(--dim); }

/* ───────── RESPONSIVE ───────── */
@media (max-width: 1040px) and (min-width: 961px) { .grad-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .modebar { margin: -4px 0 20px; }
  .modebar-edit { flex-basis: 100%; max-width: none; }
  .grad-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .link-row .inp:first-child { grid-column: 1 / -1; }
  .link-row .inp[data-lk="url"] { grid-column: 1; }
  .block-t small { display: none; }
  .fset legend { flex-wrap: wrap; row-gap: 6px; }
}
/* Écrans tactiles : dans le studio, le profil s'affiche en entier (c'est la page qui défile) */
@media (hover: none), (pointer: coarse) {
  .studio-preview .profile, .admin-preview .profile { min-height: 600px; }
}
@media (prefers-reduced-motion: reduce) { .profile.is-enter .pb { animation: none; } }

/* Profil public plein écran : ni barre ni pied de page du site */
body[data-view="public"] .site-footer { display: none; }
.profile--full .p-scroll { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.profile .p-avatar img { color: transparent; font-size: 0; }

/* ═══════════════════════════════════════════════════════════════════════
   v3.1 — Fonds vivants · Verre dépoli · Carte muette · Bento glisser-déposer
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────── FOND VIVANT : 3 orbes radiaux tirés de --c1 / --c2, transform seul (GPU) ───────── */
.profile { --o1: rgba(35,38,45,.65); --o2: rgba(15,17,22,.55); --o3: rgba(45,48,58,.45); }
.profile .p-live, .profile[data-mode="demo"] .p-live { display: block !important; }
.profile .p-bg {
  contain: strict;
  transform: translateZ(0);
  will-change: transform;
}
.device-screen {
  transform: translateZ(0);
  contain: paint layout style;
}
.profile .p-live i {
  position: absolute; display: block; border-radius: 50%;
  will-change: transform;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  animation-iteration-count: infinite; animation-direction: alternate;
}
.profile .p-live i:nth-child(1) {
  left: -20%; top: -15%; width: 110%; height: 75%;
  background: radial-gradient(circle at 40% 40%, var(--o1) 0%, rgba(0,0,0,0) 72%);
  animation-name: orbA; animation-duration: 9s;
}
.profile .p-live i:nth-child(2) {
  right: -25%; top: 32%; width: 110%; height: 80%;
  background: radial-gradient(circle at 60% 50%, var(--o2) 0%, rgba(0,0,0,0) 72%);
  animation-name: orbB; animation-duration: 12s;
}
.profile .p-live i:nth-child(3) {
  left: -15%; bottom: -20%; width: 115%; height: 75%;
  background: radial-gradient(circle at 50% 50%, var(--o3) 0%, rgba(0,0,0,0) 70%);
  animation-name: orbC; animation-duration: 8.5s;
}
@keyframes orbA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(24%, 20%, 0) scale(1.22); }
  100% { transform: translate3d(8%, 38%, 0) scale(0.92); }
}
@keyframes orbB {
  0% { transform: translate3d(0, 0, 0) scale(1.12); }
  50% { transform: translate3d(-28%, -15%, 0) scale(0.88); }
  100% { transform: translate3d(-10%, 25%, 0) scale(1.2); }
}
@keyframes orbC {
  0% { transform: translate3d(0, 0, 0) scale(0.92); }
  50% { transform: translate3d(18%, -28%, 0) scale(1.28); }
  100% { transform: translate3d(-16%, -10%, 0) scale(1.05); }
}
.profile.is-idle .p-live i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .profile .p-live i { animation: none !important; will-change: auto; } }

/* ───────── VERRE DÉPOLI (profil) ───────── */
.profile {
  --glass: rgba(18, 20, 28, 0.42);
  --glass-hi: rgba(28, 32, 45, 0.58);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-top: rgba(255, 255, 255, 0.26);
  --glass-drop: 0 20px 42px -12px rgba(0, 0, 0, 0.65);
}
.profile[data-tone="light"] {
  --glass: rgba(255, 255, 255, 0.38);
  --glass-hi: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(255, 255, 255, 0.6);
  --glass-top: rgba(255, 255, 255, 0.85);
  --glass-drop: 0 18px 40px -14px rgba(0, 0, 0, 0.22);
}
.profile .tile, .profile .p-q, .profile .p-link, .profile .p-handle, .profile .pb-bio, .profile .music-embed {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top), inset 0 -1px 0 rgba(0, 0, 0, 0.15), var(--glass-drop);
  border-radius: 20px;
}
.profile .p-grain { opacity: 0.24 !important; }
.profile .p-bg::after {
  background: radial-gradient(90% 55% at 50% 0%, rgba(255,255,255,.08), rgba(0,0,0,0) 70%), linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.35) 100%) !important;
}
.profile .pb-bio { padding: 14px 18px; }
.profile[data-facet="pro"] .pb-bio {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-top), var(--glass-drop);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
}
.profile .p-handle { box-shadow: inset 0 1px 0 var(--glass-top); }
@media (hover: hover) and (pointer: fine) { .profile a.tile:hover, .profile a.p-q:hover { background: var(--glass-hi); } }
.profile .tile-ic { box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.12); }
.profile .music-embed { background: rgba(0,0,0,.25); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .profile { --glass: rgba(20,21,26,.84); --glass-hi: rgba(30,31,38,.9); }
  .profile[data-tone="light"] { --glass: rgba(255,255,255,.72); --glass-hi: rgba(255,255,255,.82); }
}
/* Entrée du profil public : transform seul (l'opacité casserait le flou du verre pendant l'animation) */
@keyframes pRise { from { transform: translate3d(0, 16px, 0) scale(.985); } to { transform: none; } }
.profile.is-enter .pb { animation-name: pRise; }

/* ───────── VERRE DÉPOLI (panneaux du site) ───────── */
.glass {
  background: rgba(20,21,26,.55);
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 36px -10px rgba(0,0,0,.6);
}
@media (hover: hover) and (pointer: fine) {
  .glass { -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%); }
}

/* ───────── GRILLE BENTO DU PROFIL (2 colonnes, pleine ou demi-largeur) ───────── */
.p-blocks { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.p-blocks > * { grid-column: 1 / -1; min-width: 0; }
.p-blocks > .pb.is-half { grid-column: auto; }
.pb-social > .tile-social, .pb.is-half > .tile { height: 100%; }
.profile .pb-social .tile-social { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 70px; gap: 14px; padding: 14px; border-radius: 20px; }
.profile .pb-social.is-half .tile-social { flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 108px; gap: 18px; }
.profile[data-facet="pro"] .pb-social .tile-social { min-height: 60px; gap: 12px; padding: 12px; border-radius: 16px; }
.profile[data-facet="pro"] .pb-social.is-half .tile-social { min-height: 92px; gap: 14px; }
.profile[data-facet="casual"] .pb-social .tile-social { border-radius: 22px; }
.pb-social.is-half .tile-t { width: 100%; }
/* Contact en demi-largeur : boutons empilés */
.profile .pb-contact.is-half .p-quick { grid-auto-flow: row; grid-auto-columns: auto; }
.profile .pb-contact.is-half .p-q { height: 46px; flex-direction: row; font-size: 13px; }
.profile .pb-contact.is-half .p-save { height: 46px; font-size: 13px; }
/* Liens en demi-largeur : libellé seul */
.profile .pb-links.is-half .p-link { grid-template-columns: 16px minmax(0, 1fr) 12px; gap: 10px; padding: 0 12px; }
.profile .pb-links.is-half .p-link-v { display: none; }
.pb-bio.is-half { display: flex; align-items: center; }

/* ───────── GLISSER-DÉPOSER ───────── */
.is-arrangeable .p-blocks > .pb { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.is-arrangeable .p-blocks.is-sorting, .bento-board.is-sorting { cursor: grabbing; }
.dnd-ghost { position: absolute !important; left: 0; top: 0; z-index: 30; margin: 0 !important; pointer-events: none; will-change: transform; grid-column: auto !important; }
.dnd-ghost > * { transition: transform .3s var(--ease), box-shadow .3s ease; }
.dnd-ghost.is-lifted > * { transform: scale(1.035) rotate(-.8deg); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 30px 50px -16px rgba(0,0,0,.75); }
.bento-cell.dnd-ghost { transition: box-shadow .3s ease; }
.bento-cell.dnd-ghost.is-lifted { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 30px 50px -16px rgba(0,0,0,.85); background: #1a1b21; }
.bento-cell.dnd-ghost.is-lifted > * { transform: none; box-shadow: none; }
.dnd-placeholder { position: relative; }
.dnd-placeholder > * { visibility: hidden; }
.dnd-placeholder::after { content: ""; position: absolute; inset: 0; border-radius: 20px; border: 1.5px dashed rgba(255,255,255,.42); background: rgba(255,255,255,.06); animation: dropPulse 1.4s ease-in-out infinite alternate; pointer-events: none; }
.profile[data-tone="light"] .dnd-placeholder::after { border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.25); }
@keyframes dropPulse { from { opacity: .65; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dnd-placeholder::after { animation: none; } .dnd-ghost > * { transition: none; } }

/* ───────── STUDIO : tableau Bento ───────── */
.bento-board { list-style: none; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bento-cell {
  position: relative; grid-column: 1 / -1; min-width: 0;
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 8px 8px 4px;
  border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: background-color .2s ease, border-color .2s ease;
}
.bento-cell.is-half { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 124px; padding: 6px 8px 14px 12px; }
.bento-cell-top { display: contents; }
.bento-cell.is-half .bento-cell-top { display: flex; align-items: center; justify-content: space-between; width: calc(100% + 8px); margin-left: -8px; }
.bento-cell .block-grip { order: 0; }
.bento-cell .block-ic { order: 1; }
.bento-cell .block-t { order: 2; flex: 1; }
.bento-cell .block-size { order: 3; }
.bento-cell.is-half .block-t { flex: none; width: 100%; }
.bento-cell.is-empty .block-ic, .bento-cell.is-empty .block-t { opacity: .5; }
@media (hover: hover) and (pointer: fine) { .bento-cell:hover { background: rgba(255,255,255,.055); border-color: var(--line-2); } }
.block-size { flex: none; height: 36px; padding: 0 11px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--font-text); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); transition: color .2s ease, background-color .2s ease, transform .45s var(--ease); touch-action: manipulation; }
.block-size[aria-pressed="true"] { color: var(--text); background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px var(--line-2); }
.block-size:active { transform: scale(.94); transition-duration: .12s; }
@media (hover: hover) { .block-size:hover { color: var(--text); } }
.bento-cell.dnd-placeholder::after { border-radius: 18px; }
.bento-cell .block-grip:focus-visible, .block-size:focus-visible { outline: 2px solid #EDEDED; outline-offset: 2px; }
.only-fine { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 961px) { .only-fine { display: inline; } }
@media (max-width: 600px) {
  .bento-cell.is-half { min-height: 118px; }
  .bento-cell.is-half .block-t small { display: block; }
}

/* ───────── CARTE PHYSIQUE : lingot noir mat, 100 % muet ───────── */
.kstealth, #card3d .kstealth {
  background: var(--noise), radial-gradient(135% 115% at 22% -12%, #17171b 0%, #0d0d10 52%, #09090b 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(0,0,0,.75);
}
/* Reflet de chanfrein : un liseré de lumière très fin qui court sur la tranche */
.kstealth::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(128deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.05) 20%, rgba(255,255,255,0) 42%, rgba(255,255,255,0) 72%, rgba(255,255,255,.07) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.kstealth .kface-sheen { background: linear-gradient(115deg, rgba(255,255,255,0) 32%, rgba(255,255,255,.035) 48%, rgba(255,255,255,0) 62%); }

/* ───────── CARTE PHYSIQUE 100% STEALTH FULL BLACK ───────── */
.kface.kmatte.kstealth {
  background: radial-gradient(130% 110% at 20% 15%, #151619 0%, #0c0c0e 45%, #040405 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(0,0,0,0.8), 0 35px 70px -25px rgba(0, 0, 0, 0.95) !important;
}
.kface.kmatte.kstealth .kface-sheen {
  background: linear-gradient(135deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 45%) !important;
}

/* ───────── CONTRÔLES DIRECTS DE BLOCS DANS L'APERÇU ───────── */
.is-arrangeable .p-blocks > .pb {
  position: relative;
  transition: transform .25s var(--ease), box-shadow .25s ease, outline .2s ease;
  touch-action: pan-y;
}
.is-arrangeable .p-blocks > .pb:hover {
  outline: 1.5px dashed rgba(255, 255, 255, 0.38);
  outline-offset: 3px;
}
.is-arrangeable .pb-ctl {
  position: absolute; right: 8px; top: 8px; z-index: 25;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 6px; border-radius: 8px;
  background: rgba(10, 11, 15, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.is-arrangeable .p-blocks > .pb:hover .pb-ctl,
.is-arrangeable .p-blocks > .pb:focus-within .pb-ctl {
  opacity: 1; transform: translateY(0);
}
.pb-ctl button {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  color: #ededed; font: 600 11px/1 var(--font);
  background: rgba(255, 255, 255, 0.08);
  transition: background-color .15s ease;
}
.pb-ctl button:hover { background: rgba(255, 255, 255, 0.2); }
.pb-ctl .pb-drag-handle {
  width: 22px; height: 22px; display: grid; place-items: center;
  color: var(--muted); cursor: grab;
}

/* ───────── OPTIMISATION DU STUDIO (FLUIDITÉ MAXIMALE) ───────── */
.studio-config.glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(18, 19, 24, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ───────── SUPPRESSION DU TIRET HORIZONTAL DES KICKERS ───────── */
.kicker::before {
  display: none !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   v3.2 — FLUIDITÉ (60 FPS)
   Cause mesurée : des orbes animés (orbA/B/C) sous une dizaine de surfaces en
   backdrop-filter obligeaient le GPU à re-flouter l'arrière-plan à CHAQUE image
   (Studio inactif : 28 FPS, accueil au défilement : 12 FPS ; sans backdrop-filter : 60 / 40 FPS).
   Correctif : verre simulé (dégradé translucide + reflet), aucun backdrop-filter,
   et orbes animés uniquement sur le profil public réellement affiché.
   ═══════════════════════════════════════════════════════════════════════ */

/* 1. Verre des profils : opacité et dégradé à la place du flou d'arrière-plan */
.profile .tile, .profile .p-q, .profile .p-link, .profile .p-handle, .profile .pb-bio, .profile .music-embed,
.profile[data-facet="pro"] .pb-bio {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.02)), var(--glass);
}
.profile[data-tone="light"] .tile, .profile[data-tone="light"] .p-q, .profile[data-tone="light"] .p-link,
.profile[data-tone="light"] .p-handle, .profile[data-tone="light"] .pb-bio {
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.1)), var(--glass);
}
.profile .music-embed { background: rgba(0,0,0,.25); }
.profile .tile, .profile .p-q, .profile .p-link { transform: none; isolation: auto; }

/* 2. Panneaux du site et barre du haut : plus de flou d'arrière-plan */
.glass, .topbar, .cookie, dialog.dlg::backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.glass { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)), rgba(14,15,19,.9); }
.topbar { background: rgba(5,5,7,.9); }
@media (hover: hover) and (pointer: fine) { .topbar { background: rgba(5,5,7,.9); } }

/* 3. Orbes : figés partout, animés uniquement sur le profil public à l'écran */
.profile .p-live i { animation: none !important; will-change: auto; }
.profile[data-mode="public"]:not(.is-idle) .p-live i { will-change: transform; }
.profile[data-mode="public"]:not(.is-idle) .p-live i:nth-child(1) { animation: orbA 9s cubic-bezier(.42,0,.58,1) infinite alternate !important; }
.profile[data-mode="public"]:not(.is-idle) .p-live i:nth-child(2) { animation: orbB 12s cubic-bezier(.42,0,.58,1) infinite alternate !important; }
.profile[data-mode="public"]:not(.is-idle) .p-live i:nth-child(3) { animation: orbC 8.5s cubic-bezier(.42,0,.58,1) infinite alternate !important; }
/* Les bandeaux « Aperçu » du studio n'ont pas besoin de calque dédié */
.profile[data-mode="studio"] .p-bg, .profile[data-mode="demo"] .p-bg, .profile[data-mode="preview"] .p-bg { will-change: auto; }
/* Grain : image fixe, jamais recomposée */
.profile .p-grain { will-change: auto; mix-blend-mode: normal; }

/* 4. Ombres allégées : les grandes ombres floues (42 px) sur chaque bloc coûtent cher à peindre */
.profile { --glass-drop: 0 6px 14px -8px rgba(0, 0, 0, 0.55); }
.profile[data-tone="light"] { --glass-drop: 0 6px 14px -8px rgba(0, 0, 0, 0.2); }
.glass { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 22px -12px rgba(0,0,0,.6); }

/* 5. Fond vivant du studio : décoratif, jamais animé */
.living-bg i { animation: none !important; will-change: auto; }


/* ───────── Activation du profil Casual + état du scan ───────── */
.modebar-casual { flex: 1 1 100%; }
.casual-toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; max-width: 560px; }
.casual-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.casual-sw { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .25s ease; }
.casual-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #EDEDED; transition: transform .25s ease; }
.casual-toggle input:checked + .casual-sw { background: rgba(237,237,237,.30); }
.casual-toggle input:checked + .casual-sw::after { transform: translateX(18px); }
.casual-toggle input:focus-visible + .casual-sw { outline: 2px solid #EDEDED; outline-offset: 2px; }
.casual-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.casual-t b { font-weight: 500; font-size: 14px; color: var(--text); }
.casual-t small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.modebar-note { flex: 1 1 100%; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.modebar-edit[hidden], .modebar-scan[hidden] { display: none; }

/* ───────── Profil public : bouton propriétaire discret ───────── */
.pub-owner { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; height: 36px; padding: 0 16px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--text); background: rgba(20,20,22,.78); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); opacity: .85; touch-action: manipulation; }
.pub-owner:hover, .pub-owner:focus-visible { opacity: 1; }
.pub-owner[disabled] { opacity: .5; }

/* ───────── PAGE D'ACCUEIL · TEXTES REPLIÉS (le titre ouvre le texte) ───────── */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease), border-color .2s ease; }
.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.fold > summary:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }
.fold[open] > summary ~ * { animation: fold-in .4s var(--ease); }
@keyframes fold-in { from { opacity: 0; transform: translate3d(0, -4px, 0); } }
.chapter.fold > summary { justify-content: center; }
.faq-item.fold > summary { align-items: flex-start; }
.faq-item.fold > summary::after { margin-top: 5px; }
.faq-item.fold[open] > summary::after { margin-top: 10px; }
.fold-h > summary { justify-content: flex-start; gap: 20px; }
.fold-h > summary::after { width: 12px; height: 12px; border-width: 2px; }
.fold-h > .lede { margin-bottom: 4px; }
.frame-fold > p { margin-top: 8px; color: var(--muted); line-height: 1.6; max-width: 34em; }
@media (hover: hover) and (pointer: fine) { .fold > summary:hover::after { border-color: var(--text); } }
@media (prefers-reduced-motion: reduce) { .fold[open] > summary ~ * { animation: none; } .fold > summary::after { transition: none; } }

/* ───────── BARRE DU HAUT · menu centré sur la page (et non entre le logo et les boutons) ───────── */
@media (min-width: 721px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .topbar > .brand { justify-self: start; }
  .topbar > .top-actions { justify-self: end; }
}
