/* RESET & OPTIMISATION GLOBALE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body { background-color: #02010c; }

/* ----------------------------------------------------
   NOISE OVERLAY (Anti-Pixelisation des dégradés)
   ---------------------------------------------------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1; 
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.6;
    mix-blend-mode: overlay;
}

/* ----------------------------------------------------
   ANIMATIONS CSS
   ---------------------------------------------------- */
@keyframes spin-clockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-counter-clockwise {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.02); }
    100% { transform: translateY(0px) scale(1); }
}

.animate-spin-slow { animation: spin-clockwise 25s linear infinite; }
.animate-spin-reverse { animation: spin-counter-clockwise 30s linear infinite; }
.animate-float { animation: float 6s ease-in-out infinite; }

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------------------
   LE TÉLÉPHONE 3D (AVEC SCALER RÉPONSIVE & ANTI-FLOU)
   ---------------------------------------------------- */
.perspective-[2000px] { perspective: 2000px; z-index: 10; }

.phone-scaler {
    transform-origin: center right; 
    transition: transform 0.3s ease, margin 0.3s ease;
}

.phone-chassis {
    transform-style: preserve-3d;
    transform: perspective(1400px) rotateY(-20deg) rotateX(10deg) translateZ(0); 
    backface-visibility: hidden;
    width: 250px;
    aspect-ratio: 9 / 18.5;
    background: linear-gradient(135deg, #11111a 0%, #05050a 100%);
    border-radius: 2.8rem;
    padding: 0.5rem;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 255, 255, 0.1), 
        inset 0 0 0 4px rgba(0, 0, 0, 1),         
        -15px 25px 40px rgba(0, 0, 0, 0.8),       
        -5px 10px 20px rgba(244, 63, 94, 0.05);    
}

.phone-screen {
    width: 100%; height: 100%;
    border-radius: 2.3rem;
    border: 1px solid rgba(255, 255, 255, 0.05); 
    background-image: radial-gradient(circle at 50% 0%, rgba(244, 63, 94, 0.08) 0%, transparent 70%);
    transform: translate3d(0, 0, 0) scale(1);
    backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-font-smoothing: antialiased;
}

.mask-glare { clip-path: inset(0 0 0 0 round 2.3rem); }

/* ----------------------------------------------------
   DESIGN SYSTEM : BENTO CARDS & 3D
   ---------------------------------------------------- */
.transform-style-3d { transform-style: preserve-3d; }

.glass-card {
    background: var(--tw-colors-oraCard, rgba(15, 23, 42, 0.45));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    backdrop-filter: blur(24px);
    padding: 2rem;
    transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 20px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 20px 40px -15px rgba(0,0,0,0.6), 
        inset 0 1px 2px 0 rgba(255, 255, 255, 0.1);
}

.icon-box {
    width: 3.2rem; height: 3.2rem; border-radius: 1rem; display: flex;
    align-items: center; justify-content: center; border: 1px solid;
    transition: transform 0.3s ease;
}

.glass-card:hover .icon-box {
    transform: scale(1.05);
}

details summary::-webkit-details-marker { display: none; }

/* ----------------------------------------------------
   MÉDIA QUERIES
   ---------------------------------------------------- */
@media (max-width: 380px) {
    .phone-scaler { transform: scale(0.55); margin-right: -15%; }
}
@media (min-width: 381px) and (max-width: 639px) {
    .phone-scaler { transform: scale(0.65); margin-right: -10%; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .phone-scaler { transform: scale(0.85); transform-origin: center center; margin-right: -5%; }
}
@media (min-width: 1024px) {
    .phone-scaler { transform: scale(1); transform-origin: center center; margin: 0; }
}
@media (min-width: 1440px) {
    html { font-size: 19px; }
    .phone-scaler { transform: scale(1.15); }
}
@media (min-width: 1920px) {
    html { font-size: 21px; }
    .phone-scaler { transform: scale(1.25); }
}

/* ----------------------------------------------------
   MENU HIGHLIGHTS & DOWNLOAD BUTTON PREMIUM HOVER
   ---------------------------------------------------- */
header nav a {
    position: relative;
    padding: 6px 0;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header nav a:hover::after,
header nav a.active-nav-link::after {
    transform: scaleX(1);
}

/* Download button animation */
.download-glow-btn {
    position: relative;
    z-index: 10;
    background: #ffffff !important;
    color: #02010c !important;
    border: 1px solid #ffffff !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05) !important;
}

.download-glow-btn:hover {
    background: #02010c !important;
    color: #ffffff !important;
    transform: scale(1.05) translateY(-2px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 
        0 8px 20px rgba(236, 72, 153, 0.15),
        0 8px 20px rgba(139, 92, 246, 0.1) !important;
}

.download-glow-btn:active {
    transform: scale(0.96) translateY(0);
}