@tailwind base;
@tailwind components;
@tailwind utilities;

/* Configuration globale */
body {
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

canvas {
    width: 100% !important;
    outline: none;
}

/* Glassmorphism Premium */
.glass-panel {
    background: #ffffffcf;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .glass-panel {
    background: #111111cf;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.4);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark .glass-nav {
    background: rgba(22, 22, 23, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Nav Tabs Animation */
.nav-item {
    position: relative;
    color: #8c8c8c;
    transition: color 0.3s ease;
}

.dark .nav-item {
    color: #86868b;
}

.nav-item.active {
    color: #111;
}

.dark .nav-item.active {
    color: #fff;
}

.nav-indicator {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: #111;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .nav-indicator {
    background: #fff;
    box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.5);
}

/* Scroller custom */
.scroller {
    overflow-y: auto;
    height: 100%;
    padding-top: 30px;
    padding-bottom: 120px;
    /* Espace pour la nav du bas */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.text-glow {
    text-shadow: 0 0 30px rgba(41, 151, 255, 0.3);
}

.text-shadow-black {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Grid Background */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.poisson {
    box-shadow: #000 0 -7px 14px;
    overflow: unset;
}

/* ==========================================
   IPHONE 17 MOCKUP STYLES
   ========================================== */

.iphone-17 {
    position: relative;
    width: 320px;
    height: 650px;
    margin: auto;
    background: #111;
    border-radius: 50px;
    border: 8px solid #333;
    box-shadow:
        0 0 0 2px #555,
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.iphone-17:hover {
    transform: scale(1.02) rotate(-1deg);
}

.iphone-17 .dynamic-island {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: black;
    border-radius: 20px;
    z-index: 20;
    transition: width 0.3s ease;
}

.iphone-17:hover .dynamic-island {
    width: 120px;
}

.iphone-17 iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.iphone-17 .iframe-shadow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 -20px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.iphone-17 .maximize-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 30;
    transition: all 0.3s ease;
}

.iphone-17 .maximize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.fullscreen-demo {
    position: fixed;
    inset: 0;
    background: black;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.fullscreen-demo .demo-navbar {
    height: 70px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.fullscreen-demo .demo-content {
    flex: 1;
    position: relative;
}

.fullscreen-demo iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.demo-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    outline: none;
}

.nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.iphone-17 .side-button {
    position: absolute;
    left: -10px;
    top: 120px;
    width: 3px;
    height: 40px;
    background: #444;
    border-radius: 2px 0 0 2px;
}

.iphone-17 .side-button.volume-up {
    top: 180px;
    height: 50px;
}

.iphone-17 .side-button.volume-down {
    top: 240px;
    height: 50px;
}

.iphone-17 .power-button {
    position: absolute;
    right: -10px;
    top: 200px;
    width: 3px;
    height: 80px;
    background: #444;
    border-radius: 0 2px 2px 0;
}

/* Glass Card Enhanced Hover */
.glass-card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}