/* ========================================
   FLOATING BRANDS PORTFOLIO
   Section portfolio originale avec marques flottantes
======================================== */

/* Fix logo - supprimer tout filet vertical */
.navbar-brand {
    border: none !important;
    outline: none !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    background: none !important;
}

.navbar-brand::after,
.navbar-brand::before {
    display: none !important;
    content: none !important;
}

.navbar-brand img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-right: none !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    display: block;
    background: transparent !important;
}

.main-nav .navbar-brand,
.main-nav .navbar-brand img {
    border: 0 !important;
    box-shadow: none !important;
}

/* ========================================
   FLOATING PORTFOLIO SECTION
======================================== */
.floating-portfolio {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg-secondary);
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.floating-portfolio .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* Container des marques flottantes */
.brands-universe {
    position: relative;
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1600px;
    padding: 2rem;
}

/* Effet de glow ambiant */
.brands-universe::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Chaque marque flottante */
.floating-brand {
    position: absolute;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    z-index: 1;
}

.floating-brand .brand-name {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

/* Tailles variées */
.floating-brand.size-lg .brand-name {
    font-size: 1.15rem;
    padding: 0.8rem 1.8rem;
}

.floating-brand.size-sm .brand-name {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    opacity: 0.7;
}

/* Catégories avec couleurs */
.floating-brand[data-cat="dev"] .brand-name {
    border-color: rgba(139, 92, 246, 0.3);
}

.floating-brand[data-cat="seo"] .brand-name {
    border-color: rgba(34, 211, 238, 0.3);
}

.floating-brand[data-cat="ads"] .brand-name {
    border-color: rgba(236, 72, 153, 0.3);
}

/* Hover state */
.floating-brand:hover .brand-name,
.floating-brand.active .brand-name {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.08);
}

.floating-brand[data-cat="dev"]:hover .brand-name,
.floating-brand[data-cat="dev"].active .brand-name {
    border-color: var(--accent-violet);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
}

.floating-brand[data-cat="seo"]:hover .brand-name,
.floating-brand[data-cat="seo"].active .brand-name {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(34, 211, 238, 0.4);
}

.floating-brand[data-cat="ads"]:hover .brand-name,
.floating-brand[data-cat="ads"].active .brand-name {
    border-color: var(--accent-pink);
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.4);
}

/* Animation de flottement */
@keyframes float-1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(12px, -18px); }
    50% { transform: translate(-8px, -28px); }
    75% { transform: translate(-18px, -12px); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-18px, 12px); }
    50% { transform: translate(12px, 22px); }
    75% { transform: translate(22px, 8px); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(18px, -22px); }
    66% { transform: translate(-12px, 18px); }
}

.floating-brand.float-1 { animation: float-1 18s ease-in-out infinite; }
.floating-brand.float-2 { animation: float-2 22s ease-in-out infinite; }
.floating-brand.float-3 { animation: float-3 16s ease-in-out infinite; }

/* Pause animation on hover */
.floating-brand:hover,
.floating-brand.active {
    animation-play-state: paused;
}

/* ========================================
   PREVIEW CARD
======================================== */
.brand-preview {
    position: fixed;
    z-index: 1000;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-preview.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.brand-preview-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: var(--bg-secondary);
}

.brand-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.brand-preview.visible .brand-preview-image img {
    transform: scale(1.02);
}

.brand-preview-content {
    padding: 1.25rem;
}

.brand-preview-tags {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.brand-preview-tag {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

.brand-preview-tag.dev {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-violet);
}

.brand-preview-tag.seo {
    background: rgba(34, 211, 238, 0.2);
    color: var(--accent-cyan);
}

.brand-preview-tag.ads {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
}

.brand-preview-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.brand-preview-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.brand-preview-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-violet);
    text-decoration: none;
    transition: gap 0.3s ease;
    pointer-events: auto;
}

.brand-preview-link:hover {
    gap: 0.75rem;
    color: var(--accent-pink);
}

.brand-preview-link i {
    width: 14px;
    height: 14px;
}

/* ========================================
   COMPTEUR DE PROJETS
======================================== */
.projects-counter {
    text-align: center;
    padding: 3rem 0 2rem;
    position: relative;
    z-index: 10;
}

.counter-number {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.counter-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ========================================
   MOBILE ADAPTATION
======================================== */
@media (max-width: 991px) {
    .brands-universe {
        height: auto;
        min-height: auto;
        max-height: none;
        padding: 1rem;
    }
    
    /* Sur mobile, grille au lieu de flottement */
    .floating-brand {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        animation: none !important;
        display: inline-block;
        margin: 0.3rem;
    }
    
    .brands-mobile-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .floating-brand .brand-name {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .floating-brand.size-lg .brand-name,
    .floating-brand.size-sm .brand-name {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        opacity: 1;
    }
    
    /* Preview card mobile - slide up */
    .brand-preview {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .brand-preview.visible {
        transform: translateY(0);
    }
    
    .brand-preview-image {
        height: 200px;
    }
    
    /* Overlay pour fermer */
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.visible {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 576px) {
    .floating-portfolio {
        padding-top: 5rem;
    }
    
    .floating-filters {
        gap: 0.5rem;
    }
    
    .filter-pill {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    .floating-brand .brand-name {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}
