/* Module audioguide : CSS extrait d'argon-app.css (scripts/extract_module_css.py). Feuille du module : editer ici, avec les variables de static/css/app/tokens.css. */
.audioguide-toolbar{
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #dfe6f2;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    overflow: visible;
}

.audioguide-toolbar-group{
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: max-content;
}

.audioguide-toolbar-group-label{
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mv-gray-500);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 2px;
    white-space: nowrap;
}

.audioguide-toolbar-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    box-shadow: none !important;
}

.audioguide-toolbar-btn svg{
    flex-shrink: 0;
}

.audioguide-toolbar .btn-primary.audioguide-toolbar-btn{
    background: var(--mv-primary);
    border-color: var(--mv-primary);
}

.audioguide-toolbar .btn:hover,
.audioguide-toolbar .btn:active{
    transform: none;
}

.audioguide-toolbar-btn--subtle{
    background: #f3f6fb;
    color: var(--mv-gray-700);
    border-color: #d8e2f1;
}

.audioguide-toolbar-btn--subtle:hover{
    background: #e9eff8;
    color: #1f2937;
    border-color: #bfd0e8;
}

.audioguide-mode-toggle{
    display: flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d8e2f1;
    border-radius: 999px;
    background: #f4f8ff;
}

.audioguide-mode-label{
    min-width: 58px;
    font-size: 0.69rem;
    font-weight: 600;
    color: var(--mv-gray-500);
    text-align: center;
    white-space: nowrap;
}

.audioguide-toolbar-player{
    flex: 1 1 100%;
    min-width: 220px;
    order: 5;
}

.audioguide-toolbar-player .card-body{
    padding: 0.42rem 0.5rem !important;
}

.audioguide-toolbar-player .btn.btn-xs{
    border-radius: 999px;
    min-height: 28px;
    padding: 0 0.65rem;
    min-width: 0;
}

.audioguide-waveform{
    min-width: 0;
}

.audioguide-toolbar-player #noAudioguideMessage{
    display: flex;
    align-items: center;
    margin-bottom: 0 !important;
    min-height: 32px;
    padding-left: 10px;
}

.audioguide-toolbar-side{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
}

.audioguide-sidenav-toggle-btn{
    white-space: nowrap;
}

.audioguide-sidenav-toggle-btn:hover{
    color: inherit;
}

.audioguide-sidenav-toggle-icon{
    width: 14px;
    height: 14px;
    display: inline-block;
}

.audioguide-sidenav-toggle-icon svg{
    width: 10px;
    height: 10px;
    transition: transform 0.2s ease;
}

.audioguide-sidenav-toggle-btn.is-collapsed .audioguide-sidenav-toggle-icon svg{
    transform: rotate(180deg);
}

.audioguide-workspace{
    --audioguide-side-width: 30%;
    --audioguide-side-collapsed: 44px;
    --bs-gutter-x: 0.35rem;
    align-items: stretch;
}

.audioguide-workspace.is-resizing{
    user-select: none;
}

.audioguide-panel-is-resizing *{
    cursor: col-resize !important;
}

@media (min-width: 768px) {
    .audioguide-workspace{
        display: flex;
        flex-wrap: nowrap !important;
        gap: 0;
        align-items: flex-start;
    }

    .audioguide-workspace > .audioguide-main-column{
        flex: 1 1 auto;
        min-width: 0;
        width: calc(100% - var(--audioguide-side-width) - 6px);
        max-width: calc(100% - var(--audioguide-side-width) - 6px);
    }

    .audioguide-workspace > .audioguide-side-column{
        flex: 0 0 var(--audioguide-side-width);
        width: var(--audioguide-side-width);
        max-width: var(--audioguide-side-width);
        min-width: 280px;
    }

    .audioguide-workspace > .audioguide-panel-resizer{
        flex: 0 0 14px;
        width: 14px;
        position: relative;
        align-items: center;
        justify-content: center;
        cursor: col-resize;
        background: transparent;
        border-left: 1px solid #e8ecf2;
        border-right: 1px solid #e8ecf2;
        transition: background 0.15s ease;
    }

    .audioguide-workspace > .audioguide-panel-resizer:hover,
    .audioguide-workspace.is-resizing > .audioguide-panel-resizer{
        background: #eef2ff;
    }

    .audioguide-workspace > .audioguide-panel-resizer::before{
        content: "";
        position: absolute;
        top: 1rem;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        border-radius: 999px;
        background: linear-gradient(180deg, #d8e0ee 0%, #c6d1e4 100%);
        opacity: 0.85;
        transition: background 0.18s ease, opacity 0.18s ease;
    }

    .audioguide-workspace > .audioguide-panel-resizer:hover::before,
    .audioguide-workspace.is-resizing > .audioguide-panel-resizer::before{
        background: linear-gradient(180deg, #7fa2ff 0%, #3f6de6 100%);
        opacity: 1;
    }

    .audioguide-workspace.is-collapsed > .audioguide-panel-resizer{
        display: none !important;
    }

    .audioguide-workspace.is-collapsed > .audioguide-side-column{
        display: none !important;
    }

    .audioguide-workspace.is-collapsed > .audioguide-main-column{
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .audioguide-toolbar-side{
        margin-left: auto;
    }
}

@media (max-width: 767.98px) {
    .audioguide-panel-resizer,
    .audioguide-sidenav-toggle-btn{
        display: none !important;
    }
}

/* Habillage panel — compact header buttons */
.hab-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #d8e2f1;
    background: #f4f7fc;
    color: var(--mv-gray-600);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.hab-btn--text{
    width: auto;
    min-width: 30px;
    padding: 0 10px;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
}

.hab-btn--text span{
    line-height: 1;
}

.hab-btn:hover{
    background: #eaf0f9;
    border-color: #bfd0e8;
    color: #111827;
    box-shadow: none;
}
.hab-btn--create{
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    border-color: transparent;
    color: #fff;
}
.hab-btn--create:hover{
    background: linear-gradient(135deg, #0284c7, #0891b2);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 10px rgba(6,182,212,0.22);
}
.hab-btn--library{
    background: linear-gradient(135deg, #3b82f6, var(--mv-primary));
    border-color: transparent;
    color: #fff;
}
.hab-btn--library:hover{
    background: linear-gradient(135deg, var(--mv-primary), var(--mv-primary-hover));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 85, 255,0.22);
}
.hab-btn svg{
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.audioguide-side-card{
    border: 1px solid #e4eaf4;
    border-radius: 16px;
    box-shadow: none !important;
}

.audioguide-side-card-header{
    background: linear-gradient(to bottom, #f8fbff, #ffffff);
}

.audioguide-sidenav-card .card-body{
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.audioguide-sidenav-block{
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    background: #fbfdff;
    padding: 8px;
}

.audioguide-sidenav-block-title{
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mv-gray-600);
    margin-bottom: 2px;
}

.audioguide-sidenav-section-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.audioguide-hab-actions-slot{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.audioguide-hab-actions-slot .audioguide-side-header-actions{
    margin-left: auto;
}

.audioguide-mode-toggle--side{
    width: 100%;
    justify-content: center;
}

.audioguide-exp-toolbar{
    border: 1px solid #e6ecf5;
    border-radius: 10px;
    background: #f7faff;
    padding: 8px;
}

.audioguide-exp-toolbar-label{
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mv-gray-500);
}

.audioguide-exp-chip-row{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.audioguide-exp-chip-row .btn.btn-xs{
    border-radius: 999px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.68rem;
    font-weight: 600;
}

.audioguide-side-title{
    min-width: 0;
}

.audioguide-side-title-text{
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mv-gray-600);
    white-space: nowrap;
}

.audioguide-hab-section{
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    background: #fbfdff;
}

.audioguide-hab-section-head{
    display: flex;
    align-items: center;
    padding: 7px 8px;
    border-bottom: 1px solid #eef3fa;
    border-radius: 12px 12px 0 0;
    background: #f5f9ff;
}

.audioguide-hab-section-body{
    padding: 8px !important;
}

.audioguide-hab-switch-label{
    font-size: 0.74rem;
    font-weight: 600;
}

.audioguide-hab-audio{
    height: 28px;
    border-radius: 999px;
}

.audioguide-inline-check{
    font-size: 0.72rem;
}

.audioguide-field-label-xs{
    font-size: 0.68rem;
    color: #6b7280;
}

.audioguide-transitions-toggle{
    font-size: 0.68rem;
}

.audioguide-apply-btn{
    border-radius: 999px;
    min-height: 32px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.audioguide-apply-btn.btn-outline-primary{
    background: #f3f7ff;
    border-color: #bfd2ff;
    color: var(--mv-primary-hover);
}

.audioguide-apply-btn.btn-outline-primary:hover{
    background: #e8f0ff;
    border-color: #93b3ff;
    color: #1e40af;
}

.audioguide-pause-delete-btn{
    width: 100px;
}

.audioguide-exp-toolbar-sticky{
    top: 70px;
    z-index: 100;
}

.hab-audio-picker{
    gap: 5px;
    margin-bottom: 6px;
}

.hab-audio-upload-label,
.hab-audio-library-btn{
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .audioguide-toolbar{
        padding: 6px 7px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .audioguide-toolbar-group-label{
        display: none;
    }

    .audioguide-toolbar-player{
        flex: 1 1 100%;
        min-width: 0;
        order: 5;
    }

    .audioguide-toolbar-side{
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .hab-btn--text span{
        display: none;
    }
}

@media (max-width: 1399.98px) {
    .audioguide-toolbar{
        flex-wrap: wrap;
    }

    .audioguide-toolbar-group-label{
        display: none;
    }

    .audioguide-toolbar-player{
        order: 4;
        flex: 1 1 100%;
    }

    .audioguide-toolbar-side{
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .hab-btn--text{
        width: 30px;
        padding: 0;
    }

    .hab-btn--text span{
        display: none;
    }
}

/* Audio file picker – two-button row */
.hab-audio-picker{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 6px;
}
.hab-audio-upload-label,
.hab-audio-library-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}
.hab-audio-upload-label{
    border: 1.5px dashed #d1d5db;
    background: #f9fafb;
    color: #6b7280;
}
.hab-audio-upload-label:hover{
    border-color: #9ca3af;
    background: #f3f4f6;
    color: #374151;
}
.hab-audio-library-btn{
    border: 1.5px solid var(--mv-primary-200);
    background: var(--mv-primary-50);
    color: var(--mv-primary);
}
.hab-audio-library-btn:hover{
    border-color: var(--mv-primary-300);
    background: var(--mv-primary-100);
    color: var(--mv-primary-hover);
}
.hab-audio-upload-label svg,
.hab-audio-library-btn svg{
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* Inline volume row */
.hab-volume-row{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.hab-volume-row label{
    font-size: 0.68rem;
    color: #6b7280;
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    min-width: 48px;
}

/* Habillage card header sticky */
.audioguide-side-column .card-header{
    position: relative;
    top: auto;
    z-index: 1;
}

.audioguide-sequence{
    padding : 0 0 0 10px;
    border-left : 2px solid var(--mv-primary-dark);
    margin-bottom : 10px;
}

.audioguide-sequence.outdated{
    border-left-color: orange;
}

.audioguide-sequence.pause {
    border-left-style: dashed;
    border-left-color: grey;
  }

/* =============================================
   PRONUNCIATION MARKS - Audioguide Editor
   ============================================= */

/* Base style for marked pronunciation text */
.pronunciation-marked {
    position: relative;
    border-bottom: 2px dashed #6c5ce7;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pronunciation-marked:hover {
    background-color: rgba(108, 92, 231, 0.15);
    border-bottom-color: #5647d0;
}

/* Tooltip showing pronunciation on hover */
.pronunciation-marked::after {
    content: attr(data-pronunciation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3436;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Arrow for tooltip */
.pronunciation-marked::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2d3436;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.pronunciation-marked:hover::after,
.pronunciation-marked:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Dictionary entries have a different color */
.pronunciation-marked[data-dictionary="true"] {
    border-bottom-color: #00b894;
}

.pronunciation-marked[data-dictionary="true"]:hover {
    background-color: rgba(0, 184, 148, 0.15);
    border-bottom-color: #00a382;
}

.pronunciation-marked[data-dictionary="true"]::after {
    background-color: #00b894;
}

.pronunciation-marked[data-dictionary="true"]::before {
    border-top-color: #00b894;
}

/* Global dictionary entries (apply to all) - RED style */
.pronunciation-global {
    position: relative;
    border-bottom: 2px dashed #e74c3c;
    cursor: help;
    transition: all 0.2s ease;
}

.pronunciation-global:hover {
    background-color: rgba(231, 76, 60, 0.15);
    border-bottom-color: #c0392b;
}

/* Tooltip showing pronunciation on hover */
.pronunciation-global::after {
    content: attr(data-pronunciation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Arrow for tooltip */
.pronunciation-global::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #e74c3c;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.pronunciation-global:hover::after,
.pronunciation-global:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Pronunciation modal styles */
#pronunciationModal .pronunciation-preview-section {
    background-color: var(--mv-gray-50);
    border-radius: 8px;
    padding: 15px;
}

#pronunciationModal .pronunciation-preview-section .btn-preview {
    min-width: 120px;
}

#pronunciationModal .pronunciation-original-text {
    background-color: #fff;
    border: 1px solid var(--mv-gray-200);
    border-radius: 4px;
    padding: 10px 15px;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Context menu for pronunciation selection */
.pronunciation-context-menu {
    position: fixed !important;
    z-index: 1100 !important;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 5px 0;
    min-width: 200px;
    display: none;
}

.pronunciation-context-menu.show {
    display: block !important;
}

.pronunciation-context-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--mv-text-heading);
    transition: background-color 0.15s ease;
}

.pronunciation-context-menu button:hover {
    background-color: #f0f7ff;
}

.pronunciation-context-menu button i {
    margin-right: 10px;
    color: var(--mv-primary);
}

/* Pronunciation marker in text */
.pronunciation-marker {
    background-color: rgba(0, 85, 255, 0.15);
    border-bottom: 2px dashed var(--mv-primary);
    padding: 0 2px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease;
}

.pronunciation-marker:hover {
    background-color: rgba(0, 85, 255, 0.3);
}

.pronunciation-marker::after {
    content: attr(data-pronunciation);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mv-text-heading);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.pronunciation-marker:hover::after {
    opacity: 1;
    visibility: visible;
}

.aud-desc-prep-dialog {
  max-width: min(1760px, calc(100vw - 24px));
}

.aud-desc-header-card {
  border: 1px solid #dce5f7;
  border-radius: 14px;
  padding: 13px 14px;
  background: linear-gradient(180deg, #f7faff 0%, #fdfdff 100%);
  box-shadow: 0 4px 14px rgba(31, 66, 145, 0.06);
}

.aud-desc-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.aud-desc-step-card {
  border: 1px solid #e3e9f5;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 7px 20px rgba(24, 46, 91, 0.05);
  overflow: hidden;
}

.aud-desc-step-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.aud-desc-step-meta {
  min-width: 0;
}

.aud-desc-step-meta h6 {
  font-size: 1rem;
}

.aud-desc-step-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.aud-desc-source-preview,
.aud-desc-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aud-desc-source-full {
  margin-top: 6px;
}

.aud-desc-source-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.aud-desc-source-toggle .btn-link {
  font-size: 0.8rem;
  text-decoration: none;
}

.aud-desc-source-text {
  border: 1px solid #e7ecf6;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 10px 11px;
  font-size: 0.85rem;
  line-height: 1.5;
  max-height: 165px;
  overflow: auto;
  white-space: pre-wrap;
}

.aud-desc-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aud-desc-image-card {
  border: 1px solid #e5eaf4;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.aud-desc-image-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.aud-desc-image-workspace {
  width: 100%;
}

.aud-desc-image-workspace.row {
  --bs-gutter-x: 12px;
  --bs-gutter-y: 12px;
  align-items: start;
}

.aud-desc-image-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.aud-desc-image-stage {
  position: relative;
  border-radius: 10px;
  border: 1px solid #e3e8f0;
  background: #f6f8fc;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.aud-desc-image-stage img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(80vh, 620px) !important;
  object-fit: contain;
}

.aud-desc-image-stage.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
}

.aud-desc-image-empty {
  color: #8b95a7;
  font-size: 0.84rem;
  padding: 14px;
}

.aud-desc-image-tip {
  font-size: 0.77rem;
  color: #69758c;
}

.aud-desc-markers-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.aud-desc-scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 85, 255, 0.04) 0%,
    rgba(0, 85, 255, 0.1) 52%,
    rgba(0, 85, 255, 0.04) 100%
  );
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.aud-desc-scan-overlay.is-active {
  opacity: 1;
}

.aud-desc-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: -10%;
  background: linear-gradient(90deg, rgba(0, 85, 255, 0), rgba(0, 85, 255, 0.95), rgba(0, 85, 255, 0));
  box-shadow: 0 0 12px rgba(0, 85, 255, 0.45);
  animation: aud-desc-scan-sweep 1.7s linear infinite;
}

@keyframes aud-desc-scan-sweep {
  0% {
    top: -10%;
  }
  100% {
    top: 110%;
  }
}

.aud-desc-marker-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 85, 255, 0.85);
  border-radius: 999px;
  background: rgba(0, 85, 255, 0.9);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.aud-desc-image-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #e7ecf6;
  border-radius: 12px;
  background: #f9fbff;
  padding: 11px;
  min-width: 0;
}

.aud-desc-scan-badge {
  border: 1px solid transparent;
}

.aud-desc-scan-badge.is-idle {
  background: var(--mv-gray-50);
  border-color: #d8e0ec;
  color: #5f6b7d;
}

.aud-desc-scan-badge.is-queued,
.aud-desc-scan-badge.is-scanning {
  background: #eef4ff;
  border-color: #bfd2ff;
  color: #1e429f;
}

.aud-desc-scan-badge.is-done {
  background: #ecfdf3;
  border-color: #b7ebc6;
  color: #166534;
}

.aud-desc-scan-badge.is-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.aud-desc-scan-badge.is-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.aud-desc-analysis-card {
  border: 1px solid #e6ebf7;
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.aud-desc-analysis-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--mv-gray-700);
  max-height: 134px;
  overflow: auto;
  white-space: pre-wrap;
}

.aud-desc-analysis-text.is-muted {
  color: var(--mv-gray-500);
}

.aud-desc-analysis-text.is-warning {
  color: #92400e;
}

.aud-desc-analysis-text.is-error {
  color: #991b1b;
}

.aud-desc-helper-card {
  border: 1px solid #e6ebf7;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.aud-desc-helper-title {
  font-size: 0.8rem;
  color: #1f2f52;
  font-weight: 600;
}

.aud-desc-helper-list {
  margin: 0;
  padding-left: 17px;
}

.aud-desc-helper-list li {
  font-size: 0.76rem;
  color: #4c5a75;
  margin-bottom: 4px;
}

.aud-desc-helper-list li:last-child {
  margin-bottom: 0;
}

.aud-desc-markers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aud-desc-markers-empty {
  border: 1px dashed #d2dbeb;
  border-radius: 8px;
  background: #fff;
  color: #68738a;
  font-size: 0.8rem;
  padding: 8px 10px;
}

.aud-desc-marker-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.aud-desc-marker-row-index {
  font-size: 0.72rem;
  color: #6d7788;
  min-width: 28px;
}

.aud-desc-marker-remove {
  white-space: nowrap;
}

.aud-desc-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.aud-desc-empty-images {
  border: 1px dashed #d7ddea;
  border-radius: 10px;
  padding: 12px;
  color: #738097;
  font-size: 0.84rem;
  background: #fafbfd;
}

.aud-desc-library-panel {
  border: 1px solid #dfe7f6;
  border-radius: 13px;
  background: #fff;
  padding: 13px;
  margin-bottom: 14px;
  box-shadow: 0 6px 15px rgba(18, 45, 97, 0.05);
}

.aud-desc-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 11px;
}

.aud-desc-library-item {
  border: 1px solid #e6eaf2;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.aud-desc-library-thumb {
  background: #f5f7fb;
  height: 130px;
}

.aud-desc-library-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aud-desc-library-meta {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aud-desc-library-name {
  font-size: 0.78rem;
  color: #20293a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aud-desc-library-loading,
.aud-desc-library-empty,
.aud-desc-library-error {
  border: 1px dashed #d4dbea;
  border-radius: 8px;
  background: #fafbfd;
  color: var(--mv-gray-500);
  font-size: 0.84rem;
  padding: 10px;
}

.aud-desc-library-error {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.aud-desc-task-alert {
  top: 20px;
  right: 20px;
  width: min(430px, calc(100vw - 30px));
  z-index: 1060;
  box-shadow: 0 14px 32px rgba(19, 35, 69, 0.16);
}

.aud-desc-task-log {
  max-height: 140px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  background: #fff;
}

.aud-desc-task-log-line {
  font-size: 0.78rem;
  color: var(--mv-gray-700);
  padding: 6px 8px;
  border-bottom: 1px solid #eff3fa;
}

.aud-desc-task-log-line:last-child {
  border-bottom: none;
}

@media (max-width: 991.98px) {
  .aud-desc-source-preview,
  .aud-desc-source-grid {
    grid-template-columns: 1fr;
  }

  .aud-desc-step-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .aud-desc-marker-row {
    grid-template-columns: 1fr;
  }

  .aud-desc-marker-row-index {
    min-width: auto;
  }

  .aud-desc-task-alert {
    left: 14px;
    right: 14px;
    width: auto;
  }

  .aud-desc-image-stage img {
    max-height: min(56vh, 440px) !important;
  }
}

/* Audioguide source / modal */
.audioguide-source-badge {
  display: none;
}

.audioguide-sequence .parametre-voix-btn {
  border-radius: 999px;
  border: 1px solid #d8deef;
  background: #f9fbff;
}

.audioguide-sequence .parametre-voix-btn .voix-nom,
.audioguide-sequence .parametre-voix-btn .exp-voice-label {
  font-weight: 600;
}


/* Audioguide sequences visual hierarchy */
.audioguide-sequence {
  position: relative;
  margin-bottom: 14px;
  padding: 10px 12px 12px 14px;
  border-left: 4px solid #2f5ae0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.audioguide-sequence:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.audioguide-sequence .btn-audioguide-sequence {
  margin-bottom: 8px;
}

.audioguide-sequence .editable-text {
  border-radius: 10px;
  background: #f8faff;
  padding: 8px 10px;
}

.audioguide-sequence[data-origin="USR"] {
  border-left-color: #0f9f9b;
  background: #f6fcfb;
}

.audioguide-sequence[data-origin="USR"] .editable-text {
  background: #edf9f8;
}

.audioguide-sequence[data-origin="VCG"] {
  border-left-color: #f08a24;
  background: #fffaf2;
}

.audioguide-sequence[data-origin="VCG"] .editable-text {
  background: #fff4e4;
}

.audioguide-sequence.outdated {
  border-left-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28), 0 8px 18px rgba(245, 158, 11, 0.12);
}

.audioguide-sequence.pause {
  border-left-style: dashed;
  border-left-color: var(--mv-gray-400);
  background: var(--mv-gray-50);
}

@media (max-width: 768px) {
  .audioguide-sequence {
    padding: 10px 10px 12px 12px;
    margin-bottom: 10px;
  }
}

.agt-voice-expert {
  margin-top: var(--mv-space-4);
  padding-top: var(--mv-space-4);
}

.agt-voice-expert > summary {
  cursor: pointer;
  color: var(--mv-text);
}
