@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500&display=swap");

html, body
{
    background-color: #E6E6E6 !important;
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif !important;
}

.animated-bg {
    display: flex;
    flex-direction: column;

    background: linear-gradient(
        120deg,
        #1D6A7D,
        #3B8EA5,
        #6FB1C7,
        #1D6A7D
    );
    background-size: 300% 300%;
    animation: gradientMove 18s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.navbar {
    position: sticky !important;
    top: 0;
    z-index: 100;
    padding: 1rem 1.5rem;

    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Logo */
.navbar-logo img {
    height: 72px;
    transition: height 0.3s ease;
}

.navbar-center {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Onglet style tic-tac */
.nav-item {
    position: relative;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px; /* forme arrondie type tic-tac */
    transition: all 0.3s ease; /* fluidité */
    z-index: 0;
}

/* Contour invisible par défaut */
.nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    border: 2px solid transparent;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    z-index: -1;
}

/* Actif : contour visible */
.nav-item.active::before {
    background-color : #1D6A7D !important;
    color : #fff !important;
    opacity: 1;
    transform: scale(1);
}

/* Hover : contour apparaît doucement */
.nav-item:not(.active):hover::before {
    opacity: 0.5;
    transform: scale(1);
}

/* Texte actif */
.nav-item.active {
    color: #ffffff;
}

/* Texte hover */
.nav-item:not(.active):hover {
    color: #e0e0ff;
}

.user-large
{
    font-size : 20px !important;
}

.page-content {
    background-color: #ffffff;

    padding: 3rem 2rem;
    min-height: 100vh;

    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.page-content {
    animation: slideUp 0.8s ease-out both;
}

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

.hero {
    min-height: 100vh;
    background: linear-gradient(
        120deg,
        #1D6A7D,
        #3B8EA5,
        #6FB1C7,
        #1D6A7D
    );
    background-size: 300% 300%;
    animation: gradientMove 18s ease infinite;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 6rem;
}


.upload-box {
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;

    transition: all 0.3s ease;
}

.upload-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.upload-icon {
    display: block;
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 1rem;
}

.upload-box p {
    color: #ffffff;
    font-size: 16px;
}

.upload-box.dragover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.upload-box.success {
    border-color: #9effb8;
}

.upload-box.success .upload-icon {
    color: #9effb8;
}
.analysis-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
}

.spinner {
    animation: rotate 1s linear infinite;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-dasharray: 90,150;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1,150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90,150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90,150; stroke-dashoffset: -124; }
}

.hero-right {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-stack {
    position: relative;
    width: min(420px, 90vw);
    aspect-ratio: 1 / 1;
}

.image-card {
    position: absolute;
    background-color: #ffffff;
    padding: 10px;
    border-radius: 20px;

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.card-main {
    width: 80%;
    height: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.card-top {
    width: 50%;
    height: 40%;
    top: 0;
    left: 0;
    transform: translate(-90px, -60px);
    z-index: 3;
}

.card-bottom {
    width: 220px;
    height: 180px;
    bottom: 0;
    right: 0;
    transform: translate(90px, 60px);
    z-index: 3;
}

.image-stack:hover .card-main {
     transform: translate(-50%, -50%) scale(1.03);
}

/* .image-stack:hover .card-top {
    transform: translate(-60px, -30px) scale(1.03);
}

.image-stack:hover .card-bottom {
    transform: translate(60px, 30px) scale(1.03);
} */

.hidden {
    display: none;
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        gap: 4rem;
        text-align: center;
    }

    .hero-left {
        max-width: 600px;
    }

    .image-stack {
        width: 360px;
    }

    .card-top {
        transform: translate(-60px, -40px);
    }

    .card-bottom {
        transform: translate(60px, 40px);
    }
    .navbar {
        padding: 0.75rem 1.25rem;
    }

    .navbar-logo img {
        height: 60px;
    }

    .navbar-center {
        gap: 1rem;
    }

    .nav-item {
        padding: 0.4rem 0.9rem;
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    .navbar {
        padding: 0.6rem 1rem;
    }

    .navbar-center {
        display: none;
    }

    .navbar-logo img {
        height: 48px;
    }

    .navbar-right {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-item {
        padding: 0.35rem 0.6rem;
    }

    .user-large {
        font-size: 18px !important;
    }

    .navbar-right img {
        height: 22px;
    }
}

@media (max-width: 480px) {

    .navbar-logo img {
        height: 42px;
    }

    .navbar-right {
        gap: 0.5rem;
    }

    .user-large {
        font-size: 16px !important;
    }
}