/* ============================================================
   BetterCallHealth — Biotech FX global
   Effets décoratifs : mots scientifiques flottants + particules
   Tous éléments sont aria-hidden + pointer-events:none → SEO safe
   ============================================================ */

/* ── Overlay global fixe ── */
#bch-biotech-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* ── Garantir que les embeds (Tally, iframes) restent au-dessus de l'overlay ── */
.tally-embed-container,
iframe[data-tally-src] {
    position: relative;
    z-index: 1;
}

/* ── Mots scientifiques flottants ── */
.mol-bg-global {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.mol-bg-global span {
    position: absolute;
    font-family: 'Courier New', 'SF Mono', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    user-select: none;
}
.mol-bg-global .m-anti { color: rgba(14, 165, 233, 0.22); }
.mol-bg-global .m-pro  { color: rgba(239, 68, 68, 0.18); }
.mol-bg-global .m-bio  { color: rgba(139, 92, 246, 0.18); }

/* ── Particules flottantes ── */
.bch-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.bch-particle-blue   { background: rgba(14, 165, 233, 0.25); box-shadow: 0 0 10px rgba(14,165,233,0.4); }
.bch-particle-violet { background: rgba(139, 92, 246, 0.22); box-shadow: 0 0 10px rgba(139,92,246,0.4); }
.bch-particle-green  { background: rgba(16, 185, 129, 0.22); box-shadow: 0 0 10px rgba(16,185,129,0.4); }

/* ── 6 trajectoires de dérive ── */
@keyframes mol-drift-1 {
    0%   { transform: translate(0, 0) rotate(-2deg); }
    50%  { transform: translate(40px, -30px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(-2deg); }
}
@keyframes mol-drift-2 {
    0%   { transform: translate(0, 0) rotate(1deg); }
    50%  { transform: translate(-35px, 25px) rotate(-1.5deg); }
    100% { transform: translate(0, 0) rotate(1deg); }
}
@keyframes mol-drift-3 {
    0%   { transform: translate(0, 0) rotate(0.5deg); }
    33%  { transform: translate(25px, 20px) rotate(-1deg); }
    66%  { transform: translate(-15px, -10px) rotate(1.5deg); }
    100% { transform: translate(0, 0) rotate(0.5deg); }
}
@keyframes mol-drift-4 {
    0%   { transform: translate(0, 0) rotate(-1deg); }
    50%  { transform: translate(-30px, -20px) rotate(2deg); }
    100% { transform: translate(0, 0) rotate(-1deg); }
}
@keyframes mol-drift-5 {
    0%   { transform: translate(0, 0) rotate(1.5deg); }
    50%  { transform: translate(20px, 35px) rotate(-0.5deg); }
    100% { transform: translate(0, 0) rotate(1.5deg); }
}
@keyframes mol-drift-6 {
    0%   { transform: translate(0, 0) rotate(-0.5deg); }
    40%  { transform: translate(-20px, 15px) rotate(1deg); }
    80%  { transform: translate(30px, -25px) rotate(-1.5deg); }
    100% { transform: translate(0, 0) rotate(-0.5deg); }
}

.md1 { animation: mol-drift-1 25s ease-in-out infinite; }
.md2 { animation: mol-drift-2 30s ease-in-out infinite; }
.md3 { animation: mol-drift-3 35s ease-in-out infinite; }
.md4 { animation: mol-drift-4 28s ease-in-out infinite; }
.md5 { animation: mol-drift-5 32s ease-in-out infinite; }
.md6 { animation: mol-drift-6 22s ease-in-out infinite; }

/* ============================================================
   Per-section biotech decorations (.mol-bg, .hex-grid, etc.)
   Used inside individual page sections
   ============================================================ */

/* ── Molecule background (per-section) ── */
.mol-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.mol-bg span {
    position: absolute;
    font-family: 'Courier New', 'SF Mono', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    user-select: none;
}
.mol-bg .m-anti { color: rgba(14, 165, 233, 0.35); }
.mol-bg .m-pro  { color: rgba(239, 68, 68, 0.28); }
.mol-bg .m-bio  { color: rgba(139, 92, 246, 0.28); }

/* ── Hexagonal grid pattern (nid d'abeille) ── */
.hex-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%230EA5E9' stroke-width='1'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%238B5CF6' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 56px 100px;
}

/* ── DNA strands ── */
.dna-strand {
    position: absolute;
    width: 30px;
    height: 100%;
    top: 0;
    pointer-events: none;
    z-index: 0;
}
.dna-strand-left  { left: 20px; }
.dna-strand-right { right: 20px; }
.dna-node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    left: 50%;
    margin-left: -3px;
}
.dna-node-a {
    background: rgba(14, 165, 233, 0.3);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
    animation: dna-wave-a 4s ease-in-out infinite;
}
.dna-node-b {
    background: rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
    animation: dna-wave-b 4s ease-in-out infinite;
}
.dna-bridge {
    position: absolute;
    height: 1px;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.2), rgba(139, 92, 246, 0.15), rgba(239, 68, 68, 0.2));
}
@keyframes dna-wave-a { 0%,100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
@keyframes dna-wave-b { 0%,100% { transform: translateX(10px); } 50% { transform: translateX(-10px); } }

/* ── Circuit lines ── */
.circuit-line {
    height: 2px;
    position: relative;
    background: linear-gradient(90deg, transparent 5%, rgba(14, 165, 233, 0.15) 20%, rgba(139, 92, 246, 0.15) 80%, transparent 95%);
}
.circuit-line::before, .circuit-line::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: -3px;
}
.circuit-line::before {
    left: 20%;
    background: #0EA5E9;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
    animation: circuit-pulse 3s ease-in-out infinite;
}
.circuit-line::after {
    right: 20%;
    background: #8B5CF6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
    animation: circuit-pulse 3s ease-in-out infinite 1.5s;
}
@keyframes circuit-pulse { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.5); opacity: 1; } }

/* ── Mesh background ── */
.mesh-bg {
    position: relative;
    overflow: hidden;
}
.mesh-bg::before, .mesh-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.mesh-bg::before { width: 400px; height: 400px; background: rgba(14, 165, 233, 0.08); top: -100px; right: -80px; }
.mesh-bg::after  { width: 350px; height: 350px; background: rgba(139, 92, 246, 0.07); bottom: -80px; left: -60px; }
.mesh-bg > *:not(.mol-bg) { position: relative; z-index: 1; }

/* ── Biotech section wrapper ── */
.biotech-section { position: relative; }
.biotech-section > *:not(.mol-bg) { position: relative; z-index: 1; }

/* ── Accessibilité ── */
@media (prefers-reduced-motion: reduce) {
    #bch-biotech-overlay { display: none !important; }
    .mol-bg span, .dna-node, .circuit-line::before, .circuit-line::after { animation: none !important; }
}
