/* ─── BirdNET Identifier — OrnithoQuizz ─────────────────────── */
/* Thème : aurore forestière (fonds sombres, accents dorés, verts forêt) */

/* ─── Hero ──────────────────────────────────────────────────── */

.fiche-back-id{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--mist);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: var(--sage);
    letter-spacing: 0.04em;
    margin: 0.5rem 0 0.5rem 2rem;
    transition: color var(--transition), background-color var(--transition);
}

.fiche-back-id:hover {
    color: var(--leaf); 
    background-color: var(--mist);
}

.birdnet-hero {
    background: linear-gradient(135deg, #0a1a0f 0%, #1a2e1a 50%, #0d1f14 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
}

.birdnet-hero__badge {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dawn, #d4af37);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 0.35rem 1rem;
    margin-bottom: 1.2rem;
}

.birdnet-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #f0ead6;
    margin: 0 0 0.8rem;
    line-height: 1.2;
}

.birdnet-hero__subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: rgba(240, 234, 214, 0.6);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Modes (Upload / Enregistrer) ──────────────────────────── */
.birdnet-app {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.birdnet-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.birdnet-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: rgba(26, 46, 26, 0.5);
    border: 1px solid rgba(240, 234, 214, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.birdnet-mode:hover {
    background: rgba(26, 46, 26, 0.8);
    border-color: rgba(212, 175, 55, 0.486);
}

.birdnet-mode--active {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--dawn, #d4af37);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.08);
}

.birdnet-mode__icon {
    width: 32px;
    height: 32px;
    color: rgba(240, 234, 214, 0.4);
    transition: color 0.3s;
}

.birdnet-mode--active .birdnet-mode__icon {
    color: var(--dawn, #d4af37);
}

.birdnet-mode__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f0ead6;
}


/* ─── Panel commun ──────────────────────────────────────────── */
.birdnet-panel {
    background: rgba(26, 46, 26, 0.3);
    border: 1px solid rgba(240, 234, 214, 0.06);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* ─── Dropzone (Upload) ─────────────────────────────────────── */
.birdnet-dropzone {
    border: 2px dashed rgba(240, 234, 214, 0.12);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.birdnet-dropzone:hover,
.birdnet-dropzone--drag {
    border-color: var(--dawn, #d4af37);
    background: rgba(212, 175, 55, 0.04);
}

.birdnet-dropzone__input {
    display: none;
}

.birdnet-dropzone__icon {
    width: 56px;
    height: 56px;
    color: rgba(240, 234, 214, 0.15);
    margin-bottom: 1.1rem;
    transition: color 0.3s;
}

.birdnet-dropzone:hover .birdnet-dropzone__icon {
    color: rgba(212, 175, 55, 0.4);
}

.birdnet-dropzone__text {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: rgba(240, 234, 214, 0.5);
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.birdnet-dropzone__text span {
    color: var(--dawn, #d4af37);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.birdnet-dropzone__formats {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: rgba(240, 234, 214, 0.3);
    margin: 0;
}

/* Fichier sélectionné */
.birdnet-dropzone__file {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(212, 175, 55, 0.06);
    border-radius: 8px;
}

.birdnet-dropzone__file svg {
    color: var(--dawn, #d4af37);
    flex-shrink: 0;
}

.birdnet-dropzone__file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    min-width: 0;
}

.birdnet-dropzone__file-info span:first-child {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #f0ead6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.birdnet-dropzone__file-info span:last-child {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: rgba(240, 234, 214, 0.4);
}

.birdnet-dropzone__remove {
    background: none;
    border: none;
    color: rgba(240, 234, 214, 0.3);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.birdnet-dropzone__remove:hover {
    color: #e74c3c;
}

/* ─── Player custom (enregistrement / upload) ───────────────── */
.birdnet-player {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(26, 46, 26, 0.4);
    border: 1px solid rgba(240, 234, 214, 0.06);
    border-radius: 10px;
}

.birdnet-player__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    color: var(--dawn, #d4af37);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.birdnet-player__btn:hover {
    background: rgba(212, 175, 55, 0.2);
}

.birdnet-player__progress {
    flex: 1;
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.birdnet-player__progress-bg {
    position: absolute;
    width: 100%;
    height: 3px;
    background: rgba(240, 234, 214, 0.08);
    border-radius: 2px;
}

.birdnet-player__progress-fill {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, var(--dawn, #d4af37), #e0be4a);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.birdnet-player__time {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(240, 234, 214, 0.4);
    flex-shrink: 0;
    min-width: 32px;
    text-align: right;
}

/* ─── Bouton Analyser ───────────────────────────────────────── */
.birdnet-analyze-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #d4af37, #b8962e);
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0a1a0f;
    cursor: pointer;
    transition: all 0.3s ease;
}

.birdnet-analyze-btn span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.birdnet-analyze-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0be4a, #d4af37);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.birdnet-analyze-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ─── Recorder (Micro) ──────────────────────────────────────── */
.birdnet-recorder {
    text-align: center;
}

.birdnet-recorder__viz {
    position: relative;
    background: rgba(10, 26, 15, 0.6);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.birdnet-recorder__viz canvas {
    width: 100%;
    height: 120px;
    display: block;
}

.birdnet-recorder__time {
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dawn, #d4af37);
    background: rgba(10, 26, 15, 0.7);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.birdnet-recorder__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.birdnet-recorder__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Boutons enregistrement */
.birdnet-rec-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.birdnet-rec-btn--start {
    background: #c0392b;
    color: white;
}

.birdnet-rec-btn--start:hover {
    background: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

.birdnet-rec-btn__dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.birdnet-rec-btn--stop {
    background: rgba(240, 234, 214, 0.1);
    color: #f0ead6;
    border: 1px solid rgba(240, 234, 214, 0.2);
}

.birdnet-rec-btn--stop:hover {
    background: rgba(240, 234, 214, 0.15);
}

.birdnet-rec-btn__square {
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 2px;
}

.birdnet-rec-btn--retry {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1.5rem;
    background: rgba(240, 234, 214, 0.06);
    border: 1px solid rgba(240, 234, 214, 0.12);
    border-radius: 10px;
    color: rgba(240, 234, 214, 0.6);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.birdnet-rec-btn--retry:hover {
    background: rgba(240, 234, 214, 0.1);
    color: #f0ead6;
}

/* ─── Spinner ───────────────────────────────────────────────── */
.birdnet-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(10, 26, 15, 0.3);
    border-top-color: #0a1a0f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.birdnet-spinner--large {
    width: 36px;
    height: 36px;
    border-width: 3px;
    border-color: rgba(212, 175, 55, 0.2);
    border-top-color: var(--dawn, #d4af37);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Model Status ──────────────────────────────────────────── */
.birdnet-model-status {
    margin: 1.5rem 0;
}

.birdnet-model-loading {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 46, 26, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(240, 234, 214, 0.06);
}

.birdnet-model-loading p {
    font-family: 'DM Sans', sans-serif;
    color: rgba(240, 234, 214, 0.6);
    margin: 0.8rem 0 0;
}

.birdnet-model-loading__detail {
    font-size: 0.8rem !important;
    color: rgba(240, 234, 214, 0.35) !important;
}

.birdnet-progress {
    width: 100%;
    height: 4px;
    background: rgba(240, 234, 214, 0.06);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.birdnet-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dawn, #d4af37), #e0be4a);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.birdnet-model-error {
    text-align: center;
    padding: 2rem;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 12px;
}

.birdnet-model-error p {
    font-family: 'DM Sans', sans-serif;
    color: #e74c3c;
    margin: 0 0 1rem;
}

.birdnet-model-error button {
    padding: 0.6rem 1.2rem;
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    color: #e74c3c;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
}

/* ─── Résultats ─────────────────────────────────────────────── */
.birdnet-results {
    margin-top: 2rem;
}

.birdnet-results__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #f0ead6;
    margin: 0 0 1.2rem;
}

.birdnet-results__title svg {
    color: #27ae60;
}

.birdnet-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: rgba(26, 46, 26, 0.3);
    border: 1px solid rgba(240, 234, 214, 0.06);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    transition: all 0.2s;
    flex-wrap: wrap;
}

.birdnet-result--matched {
    border-color: rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.04);
}

.birdnet-result__rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 234, 214, 0.06);
    border-radius: 50%;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(240, 234, 214, 0.4);
    flex-shrink: 0;
}

.birdnet-result--matched .birdnet-result__rank {
    background: rgba(212, 175, 55, 0.15);
    color: var(--dawn, #d4af37);
}

.birdnet-result__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.birdnet-result__name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f0ead6;
}

.birdnet-result__latin {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-style: italic;
    color: rgba(240, 234, 214, 0.4);
}

.birdnet-result__time {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    color: rgba(240, 234, 214, 0.3);
}

.birdnet-result__confidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 110px;
}

.birdnet-result__bar {
    flex: 1;
    height: 4px;
    background: rgba(240, 234, 214, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.birdnet-result__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.birdnet-result__pct {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #27ae60;
    min-width: 38px;
    text-align: right;
}

.birdnet-result__link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dawn, #d4af37);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.birdnet-result__link:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* No results */
.birdnet-no-results {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 2rem;
}

.birdnet-no-results svg {
    color: rgba(240, 234, 214, 0.15);
    margin-bottom: 1rem;
}

.birdnet-no-results p {
    font-family: 'DM Sans', sans-serif;
    color: rgba(240, 234, 214, 0.5);
    margin: 0;
}

.birdnet-no-results__hint {
    font-size: 0.85rem;
    color: rgba(240, 234, 214, 0.3) !important;
    margin-top: 0.5rem !important;
}

.birdnet-result__external {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    order: 5;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(240, 234, 214, 0.06);
    margin-top: 0.2rem;
    gap: 2rem;
}

.birdnet-result__external a {
    color: rgba(240, 234, 214, 0.35);
    font-size: 1rem;
    transition: color 0.2s;
    text-decoration: none;
}

.birdnet-result__external a:hover {
    color: var(--dawn);
}

.external-links{
    width: 100%;
    display: flex;
    justify-content: space-evenly;
}

.birdnet-result__external  .fa-google , .birdnet-result__external  .fa-wikipedia-w,
.birdnet-result__external  .fa-youtube , .birdnet-result__external  .fa-feather  , .birdnet-result__external  .fa-dove {
    font-size: 1.5rem;
    color: var(--dawn);
    margin-bottom: 0.5rem;
}

/* ─── Info Section ──────────────────────────────────────────── */
.birdnet-info {
    background: rgba(26, 46, 26, 0.2);
    border-top: 1px solid rgba(240, 234, 214, 0.04);
    padding: 3rem 1.5rem;
}

.birdnet-info__content {
    max-width: 680px;
    margin: 0 auto;
}

.birdnet-info__content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #f0ead6;
    text-align: center;
    margin: 0 0 2rem;
}

.birdnet-info__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.birdnet-info__step {
    text-align: center;
}

.birdnet-info__step-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dawn, #d4af37);
}

.birdnet-info__step h3 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f0ead6;
    margin: 0 0 0.4rem;
}

.birdnet-info__step p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    color: rgba(240, 234, 214, 0.45);
    line-height: 1.5;
    margin: 0;
}

.birdnet-info__credit {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    color: rgba(240, 234, 214, 0.3);
    text-align: center;
    margin: 0;
}

.birdnet-info__credit a {
    color: var(--dawn, #d4af37);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
    .birdnet-panel {
        padding: 1.5rem 1rem;
    }

    .birdnet-dropzone {
        padding: 2rem 1rem;
    }

    .birdnet-info__steps {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .birdnet-result {
        flex-wrap: wrap;
    }

    .birdnet-result__confidence {
        width: 100%;
        order: 3;
    }

    .birdnet-result__link {
        order: 4;
    }
}

@media (min-width: 1024px) {
    .birdnet-hero {
        justify-content: center;
    }

    .birdnet-modes{
        display: flex;
    }

    .birdnet-app{
        flex-direction: column;
    }

    .birdnet-info__content{
        max-width: 1600px;
    }
}