/* =================================================================
   ID44 — Administration — Styles
   Chargé uniquement pour le panneau administrateur.
   Les variables de couleur sont définies dans style.css.
   ================================================================= */

#ecAdminOverlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.55) !important;
    display: none !important;
    /* Hidden by default */
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483647 !important;
}

#ecAdminOverlay.active {
    display: flex !important;
    /* Visible when active */
}

#ecAdminOverlay .ec-admin-box {
    background: #ffffff !important;
    width: 77vw !important;
    max-width: 950px !important;
    min-width: 320px !important;
    height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3) !important;
}



.ec-admin-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1e293b, #334155);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ec-global-test-btn {
    background: none;
    color: white !important;
    border: none;
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: none !important;
}

.ec-global-test-btn.active {
    color: #ef4444 !important;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.4));
}

.ec-admin-header h2 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}

.ec-admin-tabs {
    display: flex;
    height: 48px !important;
    min-height: 48px !important;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    line-height: normal !important;
}

.ec-admin-tabs::-webkit-scrollbar {
    display: none;
}

.ec-tab {
    padding: 0 0.55rem;
    height: 48px !important;
    box-sizing: border-box !important;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.ec-tab.active {
    color: #00D0FF;
    border-bottom-color: #00D0FF;
}

.ec-tab.active img {
    filter: invert(65%) sepia(87%) saturate(2500%) hue-rotate(160deg) brightness(101%) contrast(101%);
}

.ec-tab:not(.active) img.ec-tab-meteo-icon {
    filter: invert(49%) sepia(8%) saturate(1005%) hue-rotate(182deg) brightness(91%) contrast(85%);
}

.ec-tab:hover:not(.active) {
    color: #374151;
}

.ec-admin-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 1.25rem 2rem 1.25rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    display: block;
    background: #ffffff;
}

.ec-panel {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.ec-panel.active {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Admin form elements */
.ec-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    width: 100%;
    min-width: 0;
}

.ec-form-row.single {
    grid-template-columns: 1fr;
}

.ec-settings-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ec-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ec-field {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 1.1rem;
    border: 1.5px solid #94a3b8;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 38px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: #ffffff !important;
    color: #1f2937;
    box-shadow: none !important;
}

.ec-field:focus {
    border-color: #00D0FF;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.1) !important;
}

.ec-select {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #fff !important;
}

.ec-radio-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 0.25rem;
}

.ec-radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    cursor: pointer;
}

.ec-radio-label.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    color: #94a3b8;
}

.ec-op-badge-circle.disabled {
    filter: grayscale(1);
    background: #94a3b8 !important;
    color: #475569 !important;
    border-color: #94a3b8 !important;
}


.ec-btn-sm {
    padding: 0 10px !important;
    height: 32px !important;
    box-sizing: border-box !important;
    border: none;
    border-radius: 8px !important;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
    white-space: nowrap !important;
}

.ec-btn-add {
    background: #00D0FF;
    color: #fff;
    border-radius: 99px !important;
}

.ec-btn-add:hover {
    background: #00b8e0;
}

.ec-btn-danger {
    background: #ef4444;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ec-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.ec-btn-sq {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    overflow: hidden;
}

.ec-btn-edit {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-radius: 8px !important;
    border: 1.5px solid #bae6fd !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ec-btn-edit:hover {
    background: #0369a1 !important;
    color: #fff !important;
}

.ec-btn-history {
    background: #303e53 !important;
    color: white !important;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.ec-btn-history:hover {
    background: #4f46e5 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.ec-btn-history.no-hover:hover {
    background: #303e53 !important;
    transform: none !important;
    box-shadow: none !important;
}

.ec-btn-save {
    background: #10B981;
    color: #fff;
}

.ec-btn-save:hover {
    background: #059669;
}

.ec-btn-send {
    color: white !important;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 99px !important;
    height: 34px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px !important;
}

.ec-btn-send-green {
    background: #10b981;
}

.ec-btn-send-green:hover:not(:disabled),
.ec-btn-send-green:active:not(:disabled) {
    transform: translateY(-1px);
    background: #059669;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ec-btn-send-blue {
    background: #00D0FF;
}

.ec-btn-send-blue:hover:not(:disabled),
.ec-btn-send-blue:active:not(:disabled) {
    transform: translateY(-1px);
    background: #00b8e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ec-btn-send-pure-blue {
    background: #3b82f6;
}

.ec-btn-send-pure-blue:hover:not(:disabled),
.ec-btn-send-pure-blue:active:not(:disabled) {
    transform: translateY(-1px);
    background: #2563eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@keyframes ec-success-bump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.ec-success-anim {
    animation: ec-success-bump 0.4s ease-out;
    background: #10b981 !important;
    color: white !important;
}

.ec-btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #94a3b8;
}

.ec-btn-pill {
    border-radius: 99px !important;
}

.ec-edit-btn-circle {
    background: transparent !important;
    border: 1.5px solid #d1d5db !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8 !important;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0 !important;
}

.ec-edit-btn-circle:hover {
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
    transform: translateY(-1px);
}

/* Address Autocomplete */
.ec-address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #94a3b8;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    margin-top: -1px;
}

.ec-address-suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.ec-address-suggestion-item:last-child {
    border-bottom: none;
}

.ec-address-suggestion-item:hover {
    background: #f0f9ff;
    color: #0369a1;
}

.ec-form-group {
    position: relative;
}

.ec-divider {
    height: 1px;
    background: #94a3b8;
    margin: 1rem 0;
}

.ec-client-row-container {
    margin-bottom: 1rem;
    position: relative;
}

.ec-client-row {
    background: #f6f8fa;
    border-radius: 12px;
    padding: 12px 1rem 18px;
    border: 1.5px dotted #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-style 0s;
}

.ec-client-row:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #64748b;
}

.ec-client-row.is-expanded {
    background: #f6f8fa;
    border: 1.5px dotted #475569;
    box-shadow: none;
}

.ec-client-row-name {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.ec-client-row-code {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 8px;
    flex: 1;
}

.ec-client-missions-expand {
    display: none;
    margin-top: 1.2rem;
    border-top: 1.5px dashed #cbd5e1;
    padding: 1rem 0;
    width: 100%;
    background: transparent;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
}

.ec-chevron-container {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 14px;
    pointer-events: none;
}

.ec-client-row.is-expanded .ec-chevron-container {
    transform: translateX(-50%) rotate(180deg);
}

.ec-admin-mission-card {
    border: 1.5px solid #94a3b8;
    border-radius: 10px;
    padding: 0.875rem;
    margin-bottom: 0.625rem;
    background: #f8fafc;
    position: relative;
    border-style: dotted;
}

.ec-admin-mission-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.ec-admin-mission-info {
    font-size: 0.82rem;
    color: #374151;
}

.ec-admin-mission-info strong {
    color: #1f2937;
}

.ec-operateur-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.ec-op-franck {
    background: #dbeafe;
    color: #1d4ed8;
}

.ec-op-vincent {
    background: #fce7f3;
    color: #be185d;
}

.ec-form-card {
    background: #f8fafc;
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0;
    position: relative;
    box-sizing: border-box;
}

.ec-form-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 1rem;
}

.ec-export-area {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 120px;
    font-size: 0.75rem;
    font-family: monospace;
    border: 1.5px solid #94a3b8;
    border-radius: 8px;
    padding: 0.5rem;
    resize: vertical;
    box-sizing: border-box;
}

@media(max-width:768px) {
    .ec-form-row {
        grid-template-columns: 1fr;
    }

    #ecAdminOverlay .ec-admin-box {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        min-width: 100vw !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .ec-admin-header {
        padding: 0.75rem 1rem !important;
    }

    .ec-admin-header h2 {
        font-size: 0.95rem !important;
    }

    .ec-global-test-btn {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        margin-right: 8px !important;
    }

    .ec-admin-box {
        border-radius: 0 !important;
    }

    .ec-admin-body {
        flex: 1 !important;
        padding: 0.75rem !important;
    }

    .ec-suivi-entry {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .ec-responsive-card-padding {
        padding: 1rem 0.6rem !important;
    }
}

.ec-method-disabled {
    opacity: 0.5;
    filter: grayscale(100%);
    pointer-events: none;
    cursor: not-allowed;
    background: #f9fafb !important;
    border-color: #94a3b8 !important;
}

.ec-overlay.active {
    display: flex !important;
    z-index: 2147483647 !important;
}

/* Operator Badges */
.ec-op-badge-circle {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.ec-op-badge-sm {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    margin-right: 6px;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ec-op-bg-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.ec-op-bg-green {
    background: linear-gradient(135deg, #10B981, #059669);
}

.ec-op-bg-pink {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.ec-op-bg-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.ec-op-bg-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.ec-op-bg-grey {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

/* Bilan Grid */
.ec-bilan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ec-bilan-card {
    background: #fff;
    border: 1px solid #94a3b8;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Client Upload Zone */
.ec-upload-section {
    background: #f8fafc;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
}

.ec-upload-section.dragover {
    background: #f0f7ff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

@keyframes ecPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes ecPulseGlowGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes ecPulseGlowBlue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 208, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0, 208, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 208, 255, 0);
    }
}

.ec-pulse-glow-blue {
    animation: ecPulseGlowBlue 2s infinite;
    border-color: #00D0FF !important;
}

.ec-upload-section.dragover .ec-upload-icon-box {
    animation: ecPulseGlow 1.5s infinite;
    color: #3b82f6;
}

.ec-upload-icon-box {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    color: #64748b;
}

.ec-upload-zone.dragover .ec-upload-icon-box {
    color: #3b82f6;
}

.ec-upload-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.ec-upload-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.ec-upload-btn {
    background: #fff;
    border: 1px solid #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.ec-upload-btn:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

#ecUploadStatus {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}




/* Thicker Icons */
[data-feather],
.feather {
    stroke-width: 2.5px !important;
}

.ec-badge {
    border-width: 1px !important;
    height: 28px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.gallery-pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 20px;
    border-radius: 50%;
    display: none;
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s;
}

.gallery-pause-icon.active {
    display: flex;
}

.fullscreen-image-wrapper:hover .gallery-pause-icon {
    display: flex;
}

/* Drop zone icon thickness */
.ec-upload-icon-frame svg {
    stroke-width: 2.5px !important;
}

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

.ec-dynamic-border-rotating {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.ec-dynamic-border-rotating::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, #7c3aed, #00d0ff, #7c3aed, transparent 30%);
    animation: ecRotateGradient 4s linear infinite;
}

.ec-dynamic-border-rotating::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 1.5px;
    top: 1.5px;
    width: calc(100% - 3px);
    height: calc(100% - 3px);
    background: white;
    border-radius: 11px;
}

@keyframes ecSpinOnce {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

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

.ec-spin-once {
    animation: ecSpinOnce 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block !important;
}

.ec-downloading {
    animation: ecPulseDownload 0.8s ease-in-out !important;
    pointer-events: none !important;
    position: relative;
    opacity: 0.7 !important;
}

.ec-downloading svg, 
.ec-downloading i[data-feather], 
.ec-downloading .feather {
    animation: ecSpinOnce 1s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block !important;
    stroke: currentColor !important;
}

.ec-devis-gradient-border {
    position: relative;
    border: 1.5px solid transparent !important;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, #10B981 0%, #3B82F6 100%) border-box !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- Suivi Tab Refinements --- */
#ecPanelSuivi .ec-badge,
#ecPanelSuivi .ec-op-badge,
#ecPanelSuivi .ec-btn-sm,
#ecPanelSuivi .ec-expand-btn,
#ecPanelSuivi .ec-btn-pill,
#ecPanelSuivi .ec-btn-sq,
#ecPanelSuivi .ec-archive-btn-responsive,
#ecPanelSuivi .ec-btn-download-suivi {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

#ecPanelSuivi .ec-op-badge-circle {
    border: 2px solid #fff !important;
}

.ec-archive-btn-responsive .ec-mobile-text {
    display: none;
}

@media (max-width: 768px) {
    .ec-archive-btn-responsive .ec-desktop-text {
        display: none;
    }
    .ec-archive-btn-responsive .ec-mobile-text {
        display: inline;
    }}

/* =================================================================
   Météo Tab — Mission weather cards
   ================================================================= */
.ec-meteo-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ec-meteo-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 600px) {
    .ec-meteo-card > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* =================================================================
   Weather Decision Aid Component (Compact Mon-Fri AM/PM)
   ================================================================= */
.ec-weather-aid-container {
    height: 33px;
    box-sizing: border-box;
    margin-top: 0.75rem;
    padding: 0 0.5rem;
    background: #ffffff;
    border: 1.2px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    overflow: hidden;
}

.ec-weather-aid-bar {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    margin-top: 2px; /* Final offset for perfect centering */
}

.ec-weather-aid-notch {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 4px 2px 2px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: help;
    min-width: 0;
    position: relative;
    height: 22px; /* Fixed height to fit new container */
}

.ec-weather-aid-notch:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    transform: translateY(-1px);
    z-index: 2;
}

.ec-weather-aid-notch.is-mission-day {
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
}
.ec-weather-aid-day-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #475569;
    width: 20px;
    text-align: left;
    margin-right: 14px;
}

.ec-weather-aid-period-sep {
    width: 1px;
    height: 10px;
    background: #e2e8f0;
    margin: 0 10px;
}

.ec-weather-aid-stack {
    display: flex;
    flex-direction: column-reverse;
    gap: 1px;
    width: 14px;
    height: 14px;
    justify-content: center;
}

.ec-weather-aid-segment {
    height: 3px;
    width: 100%;
    border-radius: 1px;
}

.ec-weather-aid-segment.green { background-color: #10b981; }
.ec-weather-aid-segment.red { background-color: #ef4444; }
.ec-weather-aid-segment.empty { background-color: #e2e8f0; opacity: 0.3; }

@media (max-width: 768px) {
    .ec-weather-aid-container {
        height: auto;
        min-height: 33px;
        padding: 6px 5px;
    }
    .ec-weather-aid-bar {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        margin-top: 0 !important;
    }
    .ec-weather-aid-notch {
        flex: 1 1 calc(33.33% - 8px);
        min-width: 0;
        height: 28px;
        padding: 0 6px;
        justify-content: center;
    }
    .ec-weather-aid-stack {
        width: 12px;
        height: 12px;
        gap: 1px;
    }
    .ec-weather-aid-day-label {
        font-size: 0.6rem;
        width: 22px;
    }
}
/* Resources Section */
.ec-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
    align-items: start;
}

.ec-resource-card {
    background: #fff;
    border: 1px solid #e2ebf3;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    position: relative;
    height: auto;
    min-height: fit-content;
}

.ec-resource-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.ec-resource-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ec-resource-icon svg {
    stroke: currentColor;
}

.ec-resource-icon.resource-file {
    background: #f0fdf4;
    color: #10B981;
    border: 1px solid #d1fae5;
}

.ec-resource-icon.resource-link {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.ec-resource-icon.resource-note {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.ec-resource-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ec-resource-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    flex: 1;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
}

.ec-resource-meta {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px;
    font-size: 0.82rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ec-resource-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.ec-resource-meta-item i,
.ec-resource-meta-item svg {
    width: 14px;
    height: 14px;
    stroke-width: 2px !important;
    color: #94a3b8;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.ec-resource-badge {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #cbd5e1; /* Even lighter gray */
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    align-self: flex-start;
    transform: translateY(-2px);
}

.ec-resource-comment {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    font-style: normal;
    padding: 0;
}

.ec-filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ec-filter-btn:hover {
    border-color: #1e293b !important;
    background: #f8fafc !important;
    color: #1e293b !important;
}

.ec-filter-btn.active {
    background: #1e293b !important;
    color: #ffffff !important;
    border-color: #1e293b !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Toast System */
.ec-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.ec-toast {
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: ecToastIn 0.3s ease forwards;
    border-left: 4px solid #10b981;
}

.ec-toast.error {
    border-left-color: #ef4444;
}

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

.ec-toast.fade-out {
    animation: ecToastOut 0.3s ease forwards;
}

@keyframes ecToastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.ec-resource-delete {
    position: absolute;
    top: 7px;
    right: 10px;
    color: #cbd5e1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.ec-resource-delete:hover {
    color: #ef4444;
}

.ec-resource-favorite {
    position: absolute;
    top: 7px;
    right: 36px;
    color: #f59e0b;
    cursor: pointer;
    padding: 4px;
    transition: all 0.2s;
}

.ec-resource-favorite:hover {
    color: #d97706;
}

.ec-resource-favorite.active {
    color: #1e293b;
}

/* Resource Search Bar */
.ec-resource-search-wrap {
    position: relative;
    width: 100%;
}

.ec-resource-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px !important;
    height: 16px !important;
    color: #94a3b8;
    pointer-events: none;
}

.ec-resource-search {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 14px 9px 40px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    font-family: inherit;
}

.ec-resource-search:focus {
    border-color: #94a3b8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}

.ec-resource-search::placeholder {
    color: #94a3b8;
}
