﻿#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: white;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

    #loading-overlay.hidden {
        opacity: 0;
        visibility: hidden;
    }

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.app-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0;
    animation: textFadeIn 0.8s ease-out 0.5s forwards;
}

.loading-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    opacity: 0;
    animation: textFadeIn 0.8s ease-out 1s forwards;
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

    .particle:nth-child(1) {
        width: 10px;
        height: 10px;
        left: 10%;
        animation-delay: 0s;
        animation-duration: 3s;
    }

    .particle:nth-child(2) {
        width: 8px;
        height: 8px;
        left: 30%;
        animation-delay: 0s;
        animation-duration: 2s;
    }

    .particle:nth-child(3) {
        width: 12px;
        height: 12px;
        left: 50%;
        animation-delay: 0s;
        animation-duration: 1.75s;
    }

    .particle:nth-child(4) {
        width: 10px;
        height: 10px;
        left: 70%;
        animation-delay: 0s;
        animation-duration: 2.5s;
    }

    .particle:nth-child(5) {
        width: 8px;
        height: 8px;
        left: 90%;
        animation-delay: 0s;
        animation-duration: 2.25s;
    }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes progressLoad {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .app-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .loading-text {
        font-size: 1.2rem;
    }

    .progress-bar {
        width: 150px;
    }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }


/* Canard */
:root {
    --color-green-dark: #0B4D3A; /* Vert foncé tête */
    --color-green-medium: #1A6B4F; /* Vert moyen corps */
    --color-white: #FFFFFF; /* Blanc poitrine/cou */
    --color-brown-dark: #5D4E37; /* Brun foncé aile */
    --color-orange: #FF7F00; /* Orange bec/pattes */
    --color-wing-speculum: #2E5090;
    --duck-speed: 1s;
    --duck-speed-half: calc(var(--duck-speed) / 2);
}

*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

duck-container {
    height: 50vh;
    display: grid;
    place-content: center;
    overflow: hidden;
    position: relative;
}

.duck {
    display: flex;
    flex-direction: column;
    position: relative;
}

.duck__wrapper {
    display: grid;
    place-content: center;
}

.duck__head {
    align-self: flex-end;
    width: 6rem;
    height: 4.5rem;
    border-radius: 13rem 15rem 0 9rem;
    background: linear-gradient(145deg, var(--color-green-dark), var(--color-green-medium));
    position: relative;
    transform: translateY(1px);
    z-index: 1;
}

    .duck__head::after, .duck__head::before {
        content: "";
        position: absolute;
        border-radius: 1rem;
        background-color: var(--color-green-dark);
        width: 0.4rem;
        height: 2rem;
        top: 0;
    }

    .duck__head::after {
        left: 44%;
        transform: translate(-50%, -50%) rotate(-30deg);
    }

    .duck__head::before {
        left: 45%;
        transform: translate(-50%, -50%) rotate(10deg);
    }

.duck__eye {
    position: absolute;
    bottom: 1.2rem;
    right: 1rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background-color: #000;
    animation: eye-animation 1s infinite linear;
}

    .duck__eye--shadow {
    position: absolute;
    bottom: 0.5rem;
    right: 2rem;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background-color: darkolivegreen;
    z-index: 1;
}

.duck__mouth {
    position: absolute;
    right: 0;
    top: 35%;
    width: 2rem;
    height: 1.4rem;
    transform: translate(85%, -50%);
    clip-path: polygon(0 0, 100% 40%, 100% 60%, 0% 100%);
    border-radius: 0 1rem 1rem 0;
    background-color: var(--color-orange);
    z-index:51;
}

.duck__white {
    position: absolute;
    bottom: -0.8rem;
    left: 1rem;
    width: 5rem;
    height: 1rem;
    border-radius: 25%;
    background-color: var(--color-white);
    z-index: 2;
}

.duck__body {
    width: 9.5rem;
    height: 5.5rem;
    border-radius: 1rem 0 16rem 16rem;
    background: linear-gradient(270deg, var(--color-brown-dark) 0%, var(--color-brown-dark) 25%,var(--color-white) 100%);
    position: relative;
    overflow: hidden;
}

    .duck__body::after {
        content: "";
        position: absolute;
        width: 105%;
        height: 200%;
        left: 50%;
        top: -95%;
        transform: translate(-50%, 0.02rem) rotate(-6deg);
        border-radius: 50%;
        border-bottom: 1rem solid var(--color-light-orange-2);
    }

.duck__wing {
    position: absolute;
    top: 55%;
    width: 5rem;
    height: 2.6rem;
    border-radius: 1rem 1rem 4rem 4rem;
    background: linear-gradient(45deg, var(--color-brown-dark) 0%, var(--color-wing-speculum) 40%, var(--color-brown-dark) 100%);
    transform: translate(0, -50%);
    transform-origin: right;
    animation: wing-animation var(--duck-speed) linear infinite;
    z-index: 1;
    border: 2px solid var(--color-wing-speculum);
}

.duck__foot {
    position: absolute;
    width: 0.6rem;
    height: 2rem;
    background-color: var(--color-orange);
    z-index: -1;
}

    .duck__foot::after {
        content: "";
        position: absolute;
        width: 2rem;
        height: 0.6rem;
        bottom: 0rem;
        left: -0.5rem;
        background-color: var(--color-orange);
        border-radius: 1rem;
    }

.duck__foot--1, .duck__foot--2 {
    left: 40%;
    bottom: 0;
    transform: translate(-50%, 80%);
}

.duck__foot--1 {
    animation: foot-ans var(--duck-speed) linear infinite;
}

.duck__foot--2 {
    animation: foot-ans var(--duck-speed) var(--duck-speed-half) linear infinite;
}

.surface {
    position: absolute;
    bottom: -1.9rem;
    left: 55%;
    transform: translateX(-50%);
    background-color: #764ba2;
    width: 8rem;
    height: 0.5rem;
    border-radius: 1rem;
    animation: surface-animation var(--duck-speed-half) linear infinite;
}

@keyframes surface-animation {
    0%, 100% {
        transform: translateX(-50%) scaleX(0.9);
    }

    50% {
        transform: translateX(-50%) scaleX(1);
    }
}

@keyframes foot-ans {
    0% {
        transform: translate(-50%, 80%) rotate(0deg);
    }

    10% {
        transform: translate(-150%, 80%) rotate(10deg);
    }

    20% {
        transform: translate(-150%, 10%) rotate(10deg);
    }

    40% {
        transform: translate(400%, 10%) rotate(-20deg);
    }

    60% {
        transform: translate(600%, 60%) rotate(-20deg);
    }

    70% {
        transform: translate(500%, 60%) rotate(0deg);
    }
}

.duck__inner {
    animation: bird-up-down var(--duck-speed-half) linear infinite;
}

@keyframes bird-up-down {
    0%, 100% {
        transform: translateY(0.4rem);
    }

    50% {
        transform: translateY(0rem);
    }
}

@keyframes wing-animation {
    0%, 100% {
        transform: translate(0, -50%) rotate(16deg);
    }

    50% {
        transform: translate(0, -50%) rotate(-2deg);
    }
}

@keyframes eye-animation {
    0%, 20% {
        transform: scaleY(1);
    }

    10% {
        transform: scaleY(0);
    }
}

.cloud {
    position: absolute;
    width: 5rem;
    height: 3rem;
    border-radius: 6rem 6rem 0 1rem;
    background-color: white;
}

.cloud--1 {
    top: 15vh;
    left: 110vw;
    animation: cloud-animation 5s 0s linear infinite;
}

.cloud--2 {
    top: 10vh;
    left: 110vw;
    animation: cloud-animation 5s 1.25s linear infinite;
}

.cloud--3 {
    top: 15vh;
    left: 110vw;
    animation: cloud-animation 5s 2.5s linear infinite;
}

.cloud--4 {
    top: 10vh;
    left: 110vw;
    animation: cloud-animation 5s 3.75s linear infinite;
}

/* Styles visuels internes */
.cloud::after {
    content: "";
    position: absolute;
    width: 6rem;
    height: 3.5rem;
    bottom: 0;
    border-radius: 6rem 10rem 1rem 0;
    transform: translateX(3rem);
    background-color: #fff;
}

.cloud::before {
    content: "";
    position: absolute;
    width: 4rem;
    height: 3rem;
    bottom: 2rem;
    border-radius: 10rem 10rem 0 0;
    transform: translateX(2rem);
    background-color: #fff;
}

@keyframes cloud-animation {
    0% {
        transform: translateX(0vw);
    }

    100% {
        transform: translateX(-150vw);
    }
}