:root {
    --fyshare-signal-dim: #cbd5e1;
    --fyshare-signal-lit: #0f172a;
    --fyshare-arrow-dim: #cbd5e1;
    --fyshare-arrow-lit: #0f172a;
}
[data-theme="dark"] {
    --fyshare-signal-dim: #475569;
    --fyshare-signal-lit: #ffffff;
    --fyshare-arrow-dim: #475569;
    --fyshare-arrow-lit: #ffffff;
}
/* ==========================================================================
   FY SHARE — STYLES OFFICIELS HAUTE VITESSE & PUR BLANC
   Fond blanc (#ffffff), Boutons noirs (#0f172a), Icônes grises (#64748b)
   ========================================================================== */

/* ─── 0. BOUTON PARTAGE HEADER MOBILE (STYLE BLANC IPHONE VERRE DÉPOLI & ICÔNE NOIRE) ─── */
.mobile-top-fyshare-btn {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(25px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
}

.mobile-top-fyshare-btn:active {
    transform: scale(0.92) !important;
    background: rgba(230, 230, 235, 0.95) !important;
}

.mobile-top-fyshare-btn i {
    color: #000000 !important;
    font-size: 0.95rem !important;
}

[data-theme="dark"] .mobile-top-fyshare-btn {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: #000000 !important;
}

[data-theme="dark"] .mobile-top-fyshare-btn i {
    color: #000000 !important;
}

/* ─── 1. MODAL PLEIN ÉCRAN FY SHARE ─────────────────────────────────────── */
.fyshare-fullscreen-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    color: #0f172a !important;
    z-index: 20000000 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    box-sizing: border-box !important;
    padding-top: max(var(--sat, 40px), env(safe-area-inset-top, 40px), 36px) !important;
    padding-bottom: max(var(--sab, 16px), env(safe-area-inset-bottom, 16px), 16px) !important;
}

.fyshare-fullscreen-modal.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* ─── 2. EN-TÊTE FY SHARE (ERGONOMIE & RESPONSIVE HAUTE DÉFINITION) ───────── */
.fyshare-header-container {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
    padding-top: 4px;
    padding-bottom: 12px;
    gap: 8px;
}

.fyshare-header-top {
    height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Compatibilité rétroactif pour .fyshare-header */
.fyshare-header {
    min-height: 56px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
}

.fyshare-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fyshare-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    flex-shrink: 0;
}

.fyshare-logo-badge svg {
    color: #ffffff;
    fill: #ffffff;
}

.fyshare-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.fyshare-brand-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}

.fyshare-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Switcher Segmenté : Envoyer / Recevoir centré sans débordement */
.fyshare-segment-wrap {
    padding: 0 16px;
    display: flex;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.fyshare-segment-switch {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 24px;
    gap: 4px;
    width: 100%;
    max-width: 360px;
    box-sizing: border-box;
}

.fyshare-segment-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #64748b;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.fyshare-segment-btn.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.fyshare-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.fyshare-close-btn:active {
    background: #e2e8f0;
    color: #0f172a;
}

/* ─── 3. CORPS DE VUE DÉFILABLE ─────────────────────────────────────────── */
.fyshare-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    background: #ffffff;
}

/* ─── 4. CARTE DES FICHIERS EN FILE D'ATTENTE (SENDER) ──────────────────── */
.fyshare-queue-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.fyshare-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.fyshare-queue-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
}

.fyshare-queue-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 115px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 4px 2px;
}

.fyshare-queue-list::-webkit-scrollbar {
    width: 4px;
}
.fyshare-queue-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.fyshare-file-chip,
.fyshare-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 8px 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    max-width: 220px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    flex-shrink: 0;
    box-sizing: border-box;
}

.fyshare-file-chip i:first-child,
.fyshare-file-pill i:first-child {
    font-size: 0.85rem;
    color: #64748b;
    flex-shrink: 0;
}

.fyshare-file-chip-title,
.fyshare-pill-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

.fyshare-file-chip-size {
    font-size: 0.70rem;
    color: #64748b;
    font-weight: normal;
    white-space: nowrap;
}

.fyshare-file-chip-del {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 2px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.fyshare-file-chip-del:active {
    color: #ef4444;
    background: #fee2e2;
}

/* ─── 5. RADAR RÉALISTE DE DÉCOUVERTE ───────────────────────────────────── */
.fyshare-radar-box {
    position: relative;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 8px 0;
}

.fyshare-radar-wave {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.22);
    pointer-events: none;
    animation: fysharePulse 2.8s cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

.fyshare-radar-wave:nth-child(2) {
    animation-delay: 0.9s;
}

.fyshare-radar-wave:nth-child(3) {
    animation-delay: 1.8s;
}

@keyframes fysharePulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(4.2);
        opacity: 0;
    }
}

.fyshare-radar-center {
    position: relative;
    z-index: 5;
    width: 76px;
    height: 76px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fyshare-radar-svg {
    display: block;
    width: 72px;
    height: 72px;
    overflow: visible;
    filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.22));
}

/* Onde émise depuis le cercle */
.fyshare-anim-pulse-wave {
    fill: none;
    stroke: #0f172a;
    stroke-width: 2.5;
    transform-origin: 50px 50px;
    animation: fyshareAnimWave 4s infinite ease-out;
}

/* Cercle englobant tracé du haut vers la droite puis la gauche */
.fyshare-anim-circle {
    fill: none;
    stroke: #0f172a;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-dasharray: 240;
    transform-origin: 50px 50px;
    transform: rotate(-90deg);
    animation: fyshareAnimCircle 4s infinite ease-in-out;
}

/* Flèche supérieure : orientée vers la droite (gauche -> droite) */
.fyshare-anim-arrow-top path {
    fill: none;
    stroke: #0f172a;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 70;
    animation: fyshareAnimArrowTop 4s infinite ease-in-out;
}

/* Flèche inférieure : orientée vers la gauche (droite -> gauche) */
.fyshare-anim-arrow-bottom path {
    fill: none;
    stroke: #0f172a;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 70;
    animation: fyshareAnimArrowBottom 4s infinite ease-in-out;
}

/* Keyframes de la flèche supérieure (gauche vers droite) */
@keyframes fyshareAnimArrowTop {
    0% {
        stroke-dashoffset: 70;
        opacity: 0;
    }
    4% {
        opacity: 1;
    }
    22% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    64% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    80% {
        stroke-dashoffset: -70;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: -70;
        opacity: 0;
    }
}

/* Keyframes de la flèche inférieure (droite vers gauche) */
@keyframes fyshareAnimArrowBottom {
    0% {
        stroke-dashoffset: 70;
        opacity: 0;
    }
    4% {
        opacity: 1;
    }
    22% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    64% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    80% {
        stroke-dashoffset: -70;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: -70;
        opacity: 0;
    }
}

/* Keyframes du cercle (du haut vers droite/gauche, puis effacement) */
@keyframes fyshareAnimCircle {
    0%, 22% {
        stroke-dashoffset: 240;
        opacity: 0;
    }
    24% {
        opacity: 1;
    }
    48% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    80% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    94% {
        stroke-dashoffset: -240;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: -240;
        opacity: 0;
    }
}

/* Keyframes de l'onde pulsante émise depuis le cercle */
@keyframes fyshareAnimWave {
    0%, 48% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 0.85;
        stroke-width: 2.5;
    }
    66% {
        transform: scale(1.45);
        opacity: 0;
        stroke-width: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.fyshare-radar-status-text {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-top: -6px;
    margin-bottom: 6px;
}

/* Liste des appareils découverts */
.fyshare-devices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.fyshare-device-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.fyshare-device-card:active {
    transform: scale(0.98);
    border-color: #0f172a;
}

.fyshare-device-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fyshare-device-info {
    flex: 1;
    min-width: 0;
}

.fyshare-device-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fyshare-device-ip {
    font-size: 0.75rem;
    color: #64748b;
}

.fyshare-btn-send-device {
    border: none;
    background: #0f172a;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.fyshare-empty-radar {
    text-align: center;
    padding: 24px 16px;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.45;
}

/* ─── 6. MODE RÉCEPTEUR : QR CODE & STOCKAGE ────────────────────────────── */
.fyshare-receive-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    width: 100%;
}

.fyshare-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
}

.fyshare-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: fyshareDotPulse 1.6s infinite;
}

@keyframes fyshareDotPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.fyshare-qr-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    height: 250px;
    justify-content: center;
    box-sizing: border-box;
}

.fyshare-qr-card svg,
.fyshare-qr-card img {
    width: 210px;
    height: 210px;
    display: block;
}

.fyshare-qr-hint {
    font-size: 0.82rem;
    color: #64748b;
    max-width: 300px;
    line-height: 1.4;
}

/* Carte de sélection du dossier de sauvegarde */
.fyshare-storage-card {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    box-sizing: border-box;
}

.fyshare-storage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
}

.fyshare-storage-header i {
    color: #64748b;
    font-size: 1.1rem;
}

.fyshare-storage-path-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #334155;
    word-break: break-all;
}

.fyshare-btn-black {
    width: 100%;
    height: 46px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.fyshare-btn-black:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.fyshare-btn-black i {
    color: #94a3b8;
}

.fyshare-btn-outline {
    width: 100%;
    height: 44px;
    background: transparent;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.fyshare-btn-outline:active {
    background: #f1f5f9;
}

.fyshare-btn-outline i {
    color: #64748b;
}

/* ─── 7. CARTE DE TRANSFERT EN TEMPS RÉEL ───────────────────────────────── */
.fyshare-transfer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.fyshare-transfer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fyshare-transfer-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
}

.fyshare-transfer-speed-badge {
    background: #f1f5f9;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
}

.fyshare-transfer-filename {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fyshare-transfer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.fyshare-progress-track {
    width: 100%;
    height: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.fyshare-progress-fill {
    height: 100%;
    width: 0%;
    background: #0f172a;
    border-radius: 10px;
    transition: width 0.15s ease-out;
}

/* ─── 8. CARTE TRANSFERT TERMINÉ ────────────────────────────────────────── */
.fyshare-complete-card {
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.08);
}

.fyshare-complete-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.fyshare-complete-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.fyshare-complete-sub {
    font-size: 0.85rem;
    color: #64748b;
}

/* Carte d'attente du Point d'accès en mode Récepteur */
.fyshare-hotspot-wait-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    background: transparent;
    border: none;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.fyshare-hotspot-wait-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.fyshare-hotspot-wait-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 4px;
}

.fyshare-hotspot-wait-desc {
    font-size: 0.74rem;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.35;
    max-width: 210px;
}

/* ─── 9. BOTTOM SHEET DE CHOIX DE PARTAGE (FRYNZY VS ANDROID) ───────────── */
.fyshare-choice-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    z-index: 20000500 !important;
    display: none;
    align-items: flex-end;
    opacity: 0;
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    transition: opacity 0.2s ease-out;
}

.fyshare-choice-sheet-backdrop.active {
    opacity: 1;
}

.fyshare-choice-sheet-content {
    width: 100%;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 20px 18px calc(24px + var(--sab, 48px)) 18px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translate3d(0, 100%, 0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
}

.fyshare-choice-sheet-backdrop.active .fyshare-choice-sheet-content {
    transform: translate3d(0, 0, 0);
}

.fyshare-sheet-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 0 auto -4px auto;
}

.fyshare-sheet-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fyshare-sheet-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.fyshare-sheet-subtitle {
    font-size: 0.78rem;
    color: #64748b;
}

.fyshare-choice-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.fyshare-choice-option:active {
    transform: scale(0.98);
    background: #f8fafc;
}

.fyshare-choice-option.featured {
    border: 2px solid #0f172a;
    background: #f8fafc;
}

.fyshare-option-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fyshare-option-icon-box svg {
    color: #ffffff;
    fill: #ffffff;
}

.fyshare-option-meta {
    flex: 1;
}

.fyshare-option-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fyshare-option-tag {
    font-size: 0.65rem;
    background: #0f172a;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
}

.fyshare-option-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

/* Grille des 5 Applications de partage avec Fy Share */
.fyshare-apps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 6px 4px 4px;
}

.fyshare-app-btn {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.15s ease;
}

.fyshare-app-btn:active {
    transform: scale(0.92);
}

.fyshare-app-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.fyshare-app-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ─── 10. MODAL SÉLECTEUR DE DOSSIER DE SAUVEGARDE ──────────────────────── */
.fyshare-folder-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 20001500 !important;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.fyshare-folder-modal-backdrop.active {
    display: flex !important;
    opacity: 1 !important;
}

.fyshare-folder-dialog {
    width: 90%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 24px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
}

.fyshare-folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
}

.fyshare-folder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f172a;
    transition: background 0.12s ease;
}

.fyshare-folder-item:active {
    background: #e2e8f0;
}

.fyshare-folder-item i {
    color: #64748b;
    font-size: 1.1rem;
}

/* ─── 11. BOUTONS D'ACTION EN-TÊTE & LIENS DISCRETS ───────────────────────── */
.fyshare-icon-header-btn {
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.fyshare-icon-header-btn:active {
    background: #e2e8f0;
    transform: scale(0.94);
}

.fyshare-link-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.12s ease;
}

.fyshare-link-btn:active {
    color: #0f172a;
    background: #f1f5f9;
}

.fyshare-radar-dot-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: fysharePulseDot 1.6s infinite ease-in-out;
}

/* ─── 12. BADGES & AFFICHAGE APPAREILS BLUETOOTH DÉTECTÉS ─────────────────── */
.fyshare-badge-bt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
}

.fyshare-signal-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    margin-left: 6px;
}

.fyshare-signal-bar {
    width: 2.5px;
    background: #cbd5e1;
    border-radius: 1px;
}

.fyshare-signal-bar.active {
    background: #0f172a;
}

/* ─── 13. MODAL DE CONFIRMATION DE RÉCEPTION ENTRANTE (STYLE QUICK SHARE) ─── */
.fyshare-confirm-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 20002800 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.fyshare-confirm-overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.fyshare-confirm-dialog {
    width: 90%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 26px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    transform: scale(0.92);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.fyshare-confirm-overlay.active .fyshare-confirm-dialog {
    transform: scale(1);
}

.fyshare-confirm-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fyshare-confirm-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.fyshare-confirm-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.4;
}

/* Badge Code PIN de Sécurité (Quick Share) */
.fyshare-pin-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    padding: 12px 18px;
    margin: 4px 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.fyshare-pin-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
}

.fyshare-pin-code {
    font-size: 2.1rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.2;
}

.fyshare-pin-sub {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 4px;
}

.fyshare-confirm-meta-box {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    text-align: left;
}

.fyshare-confirm-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
}

.fyshare-confirm-label {
    color: #64748b;
    font-weight: 500;
}

.fyshare-confirm-value {
    color: #0f172a;
    font-weight: 700;
}

.fyshare-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
}

.fyshare-confirm-btn-decline {
    height: 48px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.fyshare-confirm-btn-decline:active {
    background: #e2e8f0;
}

.fyshare-confirm-btn-accept {
    height: 48px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.fyshare-confirm-btn-accept:active {
    transform: scale(0.97);
    opacity: 0.92;
}

/* ─── 14. ÉTAT D'ATTENTE D'APPROBATION SUR L'ÉMETTEUR ─────────────────────── */
.fyshare-waiting-approval-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 100%;
    padding: 6px 0;
}

.fyshare-waiting-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #0f172a;
    border-radius: 50%;
    animation: fyshareSpin 0.8s linear infinite;
}

@keyframes fyshareSpin {
    to { transform: rotate(360deg); }
}

/* ─── 15. SCANNER QR CODE CAMÉRA INTÉGRÉ (FULLSCREEN) ─────────────────────── */
.fyshare-scanner-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #000000 !important;
    z-index: 20002800 !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.fyshare-scanner-header {
    height: auto;
    min-height: 58px;
    padding: max(16px, env(safe-area-inset-top, 24px)) 16px 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10;
    flex-shrink: 0;
}

.fyshare-scanner-close-btn {
    width: auto;
    height: 38px;
    padding: 0 14px;
    border-radius: 19px;
    border: none;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fyshare-scanner-torch-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fyshare-scanner-close-btn:active,
.fyshare-scanner-torch-btn:active {
    background: rgba(255, 255, 255, 0.35);
}

.fyshare-scanner-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
}

.fyshare-scanner-camera-viewport {
    flex: 1 !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000000 !important;
}

#fyshareQrReader {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
}

#fyshareQrReader video,
#fyshareQrReader canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

#fyshareQrReader #qr-shaded-region,
#fyshareQrReader img {
    display: none !important;
}

/* Viseur carré strictement centré au milieu du viewport sans décalage */
.fyshare-scanner-viewfinder {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 250px !important;
    height: 250px !important;
    max-width: 72vw !important;
    max-height: 72vw !important;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.65) !important;
    border-radius: 20px !important;
    pointer-events: none !important;
    z-index: 15 !important;
    overflow: hidden !important;
}

.fyshare-scan-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #3b82f6;
    border-style: solid;
}

.fyshare-scan-corner.top-left {
    top: 0;
    left: 0;
    border-width: 4px 0 0 4px;
    border-top-left-radius: 14px;
}

.fyshare-scan-corner.top-right {
    top: 0;
    right: 0;
    border-width: 4px 4px 0 0;
    border-top-right-radius: 14px;
}

.fyshare-scan-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-width: 0 0 4px 4px;
    border-bottom-left-radius: 14px;
}

.fyshare-scan-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-width: 0 4px 4px 0;
    border-bottom-right-radius: 14px;
}

.fyshare-scan-laser {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #60a5fa, #3b82f6, transparent);
    box-shadow: 0 0 10px #3b82f6;
    animation: fyshareLaserScan 2s ease-in-out infinite alternate;
}

@keyframes fyshareLaserScan {
    0% { top: 6px; }
    100% { top: 242px; }
}

.fyshare-scanner-footer {
    height: auto;
    min-height: 76px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px max(18px, env(safe-area-inset-bottom, 16px)) 20px;
    text-align: center;
    z-index: 10;
    flex-shrink: 0;
}

.fyshare-scanner-hint {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 500;
}

.fyshare-scanner-bottom-quit-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 22px;
    padding: 9px 26px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
    transition: transform 0.15s ease, background 0.15s ease;
}

.fyshare-scanner-bottom-quit-btn:active {
    transform: scale(0.96);
    background: #dc2626;
}

/* ─── 16. MODAL MODIFICATION DU NOM D'APPAREIL ────────────────────────────── */
.fyshare-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 20002100 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    animation: fyshareFadeIn 0.2s ease-out;
}

.fyshare-modal-backdrop.active {
    display: flex !important;
}

.fyshare-dialog-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.fyshare-dialog-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.fyshare-dialog-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.fyshare-dialog-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
}

.fyshare-dialog-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

.fyshare-input-wrap {
    width: 100%;
    box-sizing: border-box;
}

.fyshare-input-text {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.fyshare-input-text:focus {
    border-color: #2563eb;
    background: #ffffff;
}

.fyshare-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.fyshare-btn-secondary {
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.fyshare-btn-primary {
    border: none;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 22px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    transition: background 0.15s ease;
}

.fyshare-btn-primary:active {
    transform: scale(0.97);
}

/* ─── 17. DIALOGUE DE PRÉPARATION & ACTIVATION (READINESS DIALOG) ──────────── */
.fyshare-readiness-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 20002150 !important;
    display: none !important;
    align-items: flex-end !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    animation: fyshareFadeIn 0.2s ease-out;
}

.fyshare-readiness-backdrop.active {
    display: flex !important;
}

.fyshare-readiness-sheet {
    background: #ffffff;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 14px 20px max(24px, env(safe-area-inset-bottom, 20px)) 20px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    animation: fyshareSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fyshare-readiness-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
}

.fyshare-readiness-glow-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.fyshare-readiness-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.fyshare-readiness-desc {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.35;
}

.fyshare-readiness-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 2px 0;
}

.fyshare-readiness-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    gap: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.fyshare-readiness-item.is-ready {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.fyshare-readiness-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.fyshare-readiness-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.fyshare-readiness-item-icon.loc {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.fyshare-readiness-item-icon.wifi {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.fyshare-readiness-item-icon.bt {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.fyshare-readiness-item.is-ready .fyshare-readiness-item-icon {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
}

.fyshare-readiness-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
}

.fyshare-readiness-item-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.25;
}

.fyshare-ready-btn {
    border: none;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.12s ease;
    white-space: nowrap;
}

.fyshare-ready-btn:active {
    transform: scale(0.95);
}

.fyshare-ready-badge-ok {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #059669;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 5px 12px;
    border-radius: 12px;
    flex-shrink: 0;
}

.fyshare-readiness-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.fyshare-readiness-primary-btn {
    width: 100%;
    border: none;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 14px 20px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transition: transform 0.15s ease, background 0.2s ease;
}

.fyshare-readiness-primary-btn.ready-all {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
}

.fyshare-readiness-primary-btn:active {
    transform: scale(0.98);
}

.fyshare-readiness-text-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    text-align: center;
}



/* ==========================================================================
   FY SHARE — ULTRA PREMIUM IPHONE FROSTED GLASS & GOOGLE ANIMATION SUITE
   ========================================================================== */

/* ─── 1. ENCADREMENT IPHONE VERRE DÉPOLI (FROSTED GLASS CARD) ────────────── */
.fyshare-ios-glass-card {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
    padding: 22px 18px !important;
    margin: 8px 0 14px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease !important;
}

[data-theme="dark"] .fyshare-ios-glass-card {
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* ─── 2. ÉMETTEUR AVEC 2 SIGNAUX ANIMÉS EN SÉQUENCE D'1 SECONDE ─────────── */
.fyshare-transmitter-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.fyshare-transmitter-svg {
    width: 76px;
    height: 76px;
    display: block;
    overflow: visible;
}

/* Signal Wave 1 (Arc Inférieur) : devient noir à 0.4s */
.fyshare-signal-arc.inner {
    stroke: #cbd5e1;
    stroke-linecap: round;
    transition: stroke 0.25s ease, opacity 0.25s ease;
    animation: fyshareSignalBar1 2.4s ease-in-out infinite;
}

/* Signal Wave 2 (Arc Supérieur) : devient noir après 1 seconde (1.4s) */
.fyshare-signal-arc.outer {
    stroke: #cbd5e1;
    stroke-linecap: round;
    transition: stroke 0.25s ease, opacity 0.25s ease;
    animation: fyshareSignalBar2 2.4s ease-in-out infinite;
}

@keyframes fyshareSignalBar1 {
    0%, 15% {
        stroke: var(--fyshare-signal-dim);
        opacity: 0.35;
    }
    22%, 80% {
        stroke: var(--fyshare-signal-lit);
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(15, 23, 42, 0.45));
    }
    88%, 100% {
        stroke: var(--fyshare-signal-dim);
        opacity: 0.35;
    }
}

@keyframes fyshareSignalBar2 {
    0%, 52% {
        stroke: var(--fyshare-signal-dim);
        opacity: 0.35;
    }
    58%, 80% {
        stroke: var(--fyshare-signal-lit);
        opacity: 1;
        filter: drop-shadow(0 0 2px rgba(15, 23, 42, 0.45));
    }
    88%, 100% {
        stroke: var(--fyshare-signal-dim);
        opacity: 0.35;
    }
}

.fyshare-radar-title-text {
    font-size: 0.90rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

[data-theme="dark"] .fyshare-radar-title-text {
    color: #f8fafc;
}

.fyshare-radar-subtitle-text {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.35;
    max-width: 280px;
}

[data-theme="dark"] .fyshare-radar-subtitle-text {
    color: #94a3b8;
}

/* ─── 3. RANGÉE D'APPAREILS DÉTECTÉS (CERCLES HORIZONTAUX L'UN APRÈS L'AUTRE) ─ */
.fyshare-devices-horizontal-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 24px !important;
    width: 100% !important;
    overflow-x: auto !important;
    padding: 10px 8px 6px 8px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.fyshare-devices-horizontal-row::-webkit-scrollbar {
    height: 4px;
}
.fyshare-devices-horizontal-row::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 4px;
}

.fyshare-device-circle-node {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
    width: 86px !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fyshare-device-circle-node:active {
    transform: scale(0.94) !important;
}

/* Le conteneur du cercle de l'appareil */
.fyshare-circle-outer-frame {
    position: relative !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
}

[data-theme="dark"] .fyshare-circle-outer-frame {
    background: #1e293b !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* L'icône de téléphone à l'intérieur du cercle */
.fyshare-device-phone-icon {
    font-size: 1.65rem !important;
    color: #0f172a !important;
    transition: opacity 0.25s ease, transform 0.25s ease !important;
    position: relative !important;
    z-index: 4 !important;
}

[data-theme="dark"] .fyshare-device-phone-icon {
    color: #f8fafc !important;
}

/* Nom de l'appareil sous le cercle */
.fyshare-device-label-text {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-align: center !important;
    width: 86px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

[data-theme="dark"] .fyshare-device-label-text {
    color: #f1f5f9 !important;
}

/* Métriques dynamiques sous le cercle (Mo envoyés / restant) */
.fyshare-device-stats-subtext {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #059669 !important;
    text-align: center !important;
    margin-top: 5px !important;
    display: none;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
}

[data-theme="dark"] .fyshare-device-stats-subtext {
    color: #10b981 !important;
}

/* Conteneur actif de réception */
.fyshare-receiver-active-wrap {
    display: none;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 32px 10px !important;
    box-sizing: border-box !important;
}

/* ─── 4. SVG RING GOOGLE : 6 SEGMENTS FONDUS, ROTATION & PROGRESSION ─── */
.fyshare-google-ring-svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 72px !important;
    height: 72px !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 3 !important;
    transform: rotate(-90deg) !important;
    transform-origin: 36px 36px !important;
    display: none; /* AUCUN CERCLE NI POINT LORS DE LA DETECTION */
}

/* Le SVG n'est affiché QUE lorsqu'un état actif est enclenché */
.fyshare-circle-outer-frame.state-spinning .fyshare-google-ring-svg,
.fyshare-circle-outer-frame.state-accepted-intro .fyshare-google-ring-svg,
.fyshare-circle-outer-frame.state-transferring .fyshare-google-ring-svg,
.fyshare-circle-outer-frame.state-full-spin .fyshare-google-ring-svg {
    display: block !important;
}

/* Piste de fond SVG */
.fyshare-progress-svg-track {
    stroke: rgba(15, 23, 42, 0.08);
    stroke-width: 4;
    fill: none;
    display: none;
}

.fyshare-circle-outer-frame.state-spinning .fyshare-progress-svg-track,
.fyshare-circle-outer-frame.state-accepted-intro .fyshare-progress-svg-track,
.fyshare-circle-outer-frame.state-transferring .fyshare-progress-svg-track,
.fyshare-circle-outer-frame.state-full-spin .fyshare-progress-svg-track {
    display: block !important;
}

[data-theme="dark"] .fyshare-progress-svg-track {
    stroke: rgba(255, 255, 255, 0.1) !important;
}

/* Groupe des 6 segments */
.fyshare-google-segments-group {
    transform-origin: 36px 36px !important;
}

/* Segments de couleurs vives en dégradé fondu */
.fyshare-google-seg {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    opacity: 0 !important;
    transform-origin: 36px 36px !important;
    transition: opacity 0.2s ease, stroke-dasharray 0.16s ease-out;
}

.fyshare-circle-outer-frame.state-transferring .fyshare-google-seg,
.fyshare-circle-outer-frame.state-full-spin .fyshare-google-seg {
    opacity: 1 !important;
}

/* ─── ROTATION CONTINUE GOOGLE MATERIAL LORS DE L'ENVOI DE LA DEMANDE ─── */
.fyshare-google-material-spinner-wrap {
    transform-origin: 36px 36px !important;
    display: none;
}

.fyshare-circle-outer-frame.state-spinning .fyshare-google-material-spinner-wrap {
    display: block !important;
    animation: fyshareGoogleSpinLoop 1.8s linear infinite !important;
}

.fyshare-google-material-spinner-arc {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transform-origin: 36px 36px !important;
    filter: drop-shadow(0 0 4px rgba(66, 133, 244, 0.45));
}

.fyshare-circle-outer-frame.state-spinning .fyshare-google-material-spinner-arc {
    display: block !important;
    animation: fyshareGoogleArcLoop 1.4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite !important;
}

@keyframes fyshareGoogleSpinLoop {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fyshareGoogleArcLoop {
    0% {
        stroke-dasharray: 20 213.63;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 155 213.63;
        stroke-dashoffset: -25;
    }
    100% {
        stroke-dasharray: 20 213.63;
        stroke-dashoffset: -213.63;
    }
}

/* ─── ANIMATION D'INTRO GOOGLE MULTICOLORE À L'ACCEPTATION (2s) ─── */
.fyshare-google-intro-wrap {
    transform-origin: 36px 36px !important;
    display: none;
}

.fyshare-google-intro-arc {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transform-origin: 36px 36px !important;
    filter: drop-shadow(0 0 5px rgba(66, 133, 244, 0.5));
}

.fyshare-circle-outer-frame.state-accepted-intro .fyshare-google-intro-wrap {
    display: block !important;
    animation: fyshareGoogleIntroWrapSpin 2.2s cubic-bezier(0.2, 0, 0.2, 1) forwards !important;
}

.fyshare-circle-outer-frame.state-accepted-intro .fyshare-google-intro-arc {
    display: block !important;
    animation: fyshareGoogleIntroArcCollapse 2.2s cubic-bezier(0.2, 0, 0.2, 1) forwards !important;
}

@keyframes fyshareGoogleIntroWrapSpin {
    0% {
        transform: rotate(-90deg);
    }
    78% {
        transform: rotate(630deg); /* 2 tours complets : la tête arrive au sommet (12h) */
    }
    100% {
        transform: rotate(630deg); /* La tête reste immobile en haut pendant que le reste de la ligne la rejoint */
    }
}

@keyframes fyshareGoogleIntroArcCollapse {
    0% {
        stroke-dasharray: 60 213.63;
        stroke-dashoffset: 0;
        opacity: 1;
    }
    78% {
        stroke-dasharray: 60 213.63;
        stroke-dashoffset: 0;
        opacity: 1;
    }
    97% {
        stroke-dasharray: 0 213.63;
        stroke-dashoffset: -60;
        opacity: 1;
    }
    100% {
        stroke-dasharray: 0 213.63;
        stroke-dashoffset: -60;
        opacity: 0;
    }
}

/* ─── JAUGE & POURCENTAGE DANS LE CERCLE ─── */
.fyshare-circle-percent-badge {
    position: absolute !important;
    bottom: 8px !important;
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    color: #4285F4 !important;
    letter-spacing: -0.02em !important;
    z-index: 6 !important;
    display: none;
}

.fyshare-circle-outer-frame.state-transferring .fyshare-circle-percent-badge {
    display: block !important;
}

.fyshare-circle-outer-frame.state-transferring .fyshare-device-phone-icon {
    transform: translateY(-4px) scale(0.85) !important;
    transition: transform 0.25s ease !important;
}

/* Badge vérifié (coche verte 'V') */
.fyshare-verified-center-badge {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: scale(0.5) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    z-index: 8 !important;
    pointer-events: none !important;
}

.fyshare-verified-center-badge.show {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.fyshare-verified-center-badge svg {
    width: 32px !important;
    height: 32px !important;
    fill: none !important;
    stroke: #22c55e !important;
    stroke-width: 3.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* Badge refusé */
.fyshare-refused-center-badge {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    transform: scale(0.5) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    z-index: 8 !important;
    pointer-events: none !important;
}

.fyshare-circle-outer-frame.state-refused .fyshare-refused-center-badge {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.fyshare-refused-center-badge svg {
    width: 30px !important;
    height: 30px !important;
    fill: none !important;
    stroke: #ef4444 !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

/* ─── ROTATION DU CERCLE PLEIN COMPLET À 100% ─── */
.fyshare-circle-outer-frame.state-full-spin .fyshare-google-ring-svg {
    display: block !important;
    animation: fyshareFullCircleSpin 0.9s cubic-bezier(0.35, 0, 0.25, 1) forwards !important;
    transform-origin: 36px 36px !important;
}

@keyframes fyshareFullCircleSpin {
    0% { transform: rotate(-90deg); }
    100% { transform: rotate(270deg); }
}

/* ─── MASQUER SOUS-TEXTES, CARTES, BARRES VERTES, INFOS MO ─── */
.fyshare-device-stats-subtext,
#fyshare-receiver-stats,
#fyshareTransferCard,
.fyshare-transfer-card,
#fyshareCompleteCard,
.fyshare-complete-card {
    display: none !important;
}
