:root { 
    /* Couleurs Gummy */
    --primary-pink: #ff85b2; 
    --light-pink: #ffd9e7;
    --primary-purple: #9262ab;
    --primary-yellow: #ffd35a;
    --bg-mint: #d1f2f0;
    --text-dark: #5a4a6b;
}

/* --- RESET & FONTS --- */
*, *::before, *::after {
    font-family: "DynaPuff", "Comic Sans MS", sans-serif !important;
    box-sizing: border-box;
}

body { 
    background: linear-gradient(135deg, #d1f2f0, #f9d8e7, #e8d9f2, #d1f2f0);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    background-attachment: fixed;
    color: var(--text-dark); 
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    min-height: 100dvh; /* Utilisation de dvh pour mobile */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-weight: lighter;
}

.login-container {
    margin: auto;
}

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

/* --- BANNIÈRE --- */
.banner {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: var(--bg-mint);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.banner img {
    width: 100%;
    max-width: 1000px;
    height: auto;
}

/* --- CONTENEUR PRINCIPAL --- */
.container { 
    width: 90%; 
    max-width: 700px; 
    margin-top: 30px; 
    background: rgba(255, 255, 255, 0.85);
    padding: 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(146, 98, 171, 0.15);
    border: 3px solid white;
    z-index: 10;
}

/* --- INPUTS & BOUTONS --- */
input { 
    width: 100%; 
    padding: 18px 25px; 
    border: 3px solid #eee; 
    border-radius: 40px; 
    font-size: 1rem; 
    background: white; 
    color: var(--text-dark); 
    outline: none; 
    transition: 0.3s;
}
input:focus { 
    border-color: var(--primary-pink); 
    box-shadow: 0 0 15px rgba(255,133,178,0.2); 
}

.download-btn { 
    display: block; 
    text-align: center; 
    margin-top: 25px; 
    padding: 18px; 
    background: linear-gradient(to right, var(--primary-pink), var(--primary-purple)); 
    color: white; 
    border-radius: 40px; 
    text-decoration: none; 
    font-size: 1.1rem; 
    box-shadow: 0 5px 15px rgba(146, 98, 171, 0.3); 
    transition: 0.3s; 
}
.download-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(146, 98, 171, 0.4); 
}


.task-btn { 
    display: block; 
    text-align: center; 
    margin-top: 25px; 
    padding: 18px; 
    background: linear-gradient(to right, var(--light-pink), var(--bg-mint)); 
    color: var(--text-dark); 
    border-radius: 40px; 
    text-decoration: none; 
    font-size: 1.1rem; 
    box-shadow: 0 5px 15px rgba(146, 98, 171, 0.3); 
    transition: 0.3s; 
}
.task-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 20px rgba(146, 98, 171, 0.4); 
}

/* --- RÉSULTATS DE RECHERCHE --- */
.skeleton { 
    height: 85px; 
    background: linear-gradient(90deg, var(--light-pink) 25%, #fff 50%, var(--light-pink) 75%); 
    background-size: 200% 100%; 
    animation: skeleton-wave 1.5s infinite; 
    border-radius: 20px; 
    margin-top: 12px; 
}

/* L'animation qui crée le mouvement horizontal */
@keyframes skeleton-wave {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}


.result-item { 
    background: white; 
    padding: 15px 22px; 
    margin-top: 12px; 
    border-radius: 20px; 
    cursor: pointer; 
    transition: 0.2s; 
    border: 2px solid transparent; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); 
    font-size: small;
    font-weight: lighter;
}
.result-item:hover { 
    border-color: var(--primary-purple); 
    transform: scale(1.02); 
    background: #fafafa; 
}

.res-title { color: var(--primary-purple); display: block; margin-bottom: 4px; overflow-wrap: break-word; white-space: normal;}
.res-info { font-size: 0.85rem; color: #888; }
.badge-official { background: #e0f4ff; color: #00a2ff; border: 1px solid #00a2ff; padding: 2px 8px; border-radius: 20px; font-size: 0.65rem; margin-left: 10px; }

.delete-zone {
    margin-left: 15px;
    padding: 10px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s;
    font-size: 1.2rem;
}
.delete-zone:hover {
    opacity: 1;
    transform: scale(1.2);
}
.result-item { position: relative; transition: all 0.3s; }

/* --- ÉTAT ET BARRE DE PROGRESSION --- */
#progress-container {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    margin: 20px 0 10px 0;
    border: 2px solid white;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

#progress-bar {
    height: 100%;
    width: 0%; 
    min-width: 3%;
    background: linear-gradient(90deg, var(--primary-pink) 0%, var(--primary-yellow) 50%, var(--primary-purple) 100%);
    transition: width 0.6s ease-in-out;
    position: relative;
    border-radius:20px;

}

#progress-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 2s infinite;
}

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

#log-active { 
    background: white; 
    padding: 18px; 
    border-radius: 20px; 
    border-left: 8px solid var(--primary-pink); 
    margin-top: 20px; 
    color: var(--primary-pink); 
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Animation de pulsation pour le skeleton */
@keyframes skeleton-loading {
    0% { background-color: var(--light-pink); }
    50% { background-color: var(--primary-pink); }
    100% { background-color: var(--light-pink); }
}

.skeleton-badge {
    display: inline-block;
    width: 60px;
    height: 14px;
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    vertical-align: middle;
}

/* On fixe une hauteur mini pour l'info pour éviter le jump */
.res-info {
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#log-static {
    color: var(--text-dark);
    font-size: small;
}

.log-item-failed {
    text-decoration: line-through !important;
    color: #a0a0a0 !important;
    opacity: 0.6;
}

/* --- FOOTER --- */
.footer {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.4;
    color: var(--primary-pink);
    margin: 20px 0;
    opacity: 0.8;
}

/* --- UTILITAIRES --- */
.hidden { display: none !important; }

.particle { 
    position: fixed; 
    pointer-events: none; 
    z-index: 9999; 
}

@media (max-width: 480px) {
    .container { width: 95%; padding: 15px; }
    .res-title { font-size: 0.9rem; }
}