  /* 1. The Container: Force Full Width & Center */
    .galilee-pills-wrapper {
        width: 100%;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 15px;
        margin-bottom: 25px;
        position: relative;
        z-index: 10;
    }

    /* 2. The Group: Force Horizontal Row */
    .galilee-pills-group {
        display: flex !important;
        flex-direction: row !important; /* Forces horizontal */
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 3. The Pill Buttons */
    .quick-filter-pill {
        display: inline-flex !important; /* Prevents vertical stacking */
        align-items: center;
        background: #ffffff;
        border: 1px solid #e1e4e8;
        border-radius: 50px;
        padding: 8px 24px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 0.95rem;
        font-weight: 500;
        color: #586069;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        outline: none !important;
    }

    /* Hover */
    .quick-filter-pill:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        color: #1b1f23;
        background: #f6f8fa;
    }

    /* Active State (Galilee Green) */
    .quick-filter-pill.active {
        background: #0e5c4b !important;
        color: #ffffff !important;
        border-color: #0e5c4b !important;
        box-shadow: 0 4px 10px rgba(14, 92, 75, 0.3) !important;
    }

    .pill-emoji { font-size: 1.2em; margin-right: 8px; }

/* ============================================
   SEXY FLOATING SEARCH BAR - SDC2 CLASS
   ============================================ */

.sdc2 {
    max-width: 750px;
    margin: 2.5rem auto 1rem !important;

    position: sticky;
    top: 20px;
    z-index: 100;
    transition: all 0.3s ease;
}

/* Compact mode when scrolling */
.sdc2.scrolled {
    top: 10px;
    transform: scale(0.95);
}

.sdc2 .search-dock-input {
    width: 100%;
    padding: 15px 35px !important;
    font-size: 18px;
    font-weight: 500;
    border: 2px solid #e8ecef;
    border-radius: 50px;
    background: white;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2c3e50;
    text-indent: 0; /* Fix cursor position */
}

.sdc2 .search-dock-input::placeholder {
    color: #95a5a6;
    font-weight: 400;
    font-size: 17px;
    text-indent: 0; /* Fix cursor position */
}

.sdc2 .search-dock-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 
        0 8px 30px rgba(52, 152, 219, 0.2),
        0 4px 12px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
    background: #ffffff;
}

/* Subtle pulse animation on page load */
@keyframes gentle-pulse {
    0%, 100% { 
        box-shadow: 
            0 4px 20px rgba(0, 0, 0, 0.08),
            0 2px 8px rgba(0, 0, 0, 0.04);
    }
    50% { 
        box-shadow: 
            0 6px 25px rgba(52, 152, 219, 0.15),
            0 3px 10px rgba(52, 152, 219, 0.08);
    }
}

.sdc2 .search-dock-input {
    animation: gentle-pulse 3s ease-in-out 2;
}

/* Hover state */
.sdc2 .search-dock-input:hover:not(:focus) {
    border-color: #d1dce5;
    box-shadow: 
        0 6px 24px rgba(0, 0, 0, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.06);
}

/* Active/typing state - NO PURPLE */
.sdc2 .search-dock-input:not(:placeholder-shown) {
    border-color: #3498db;
    background: #f8fcff;
}

/* Hide search bar when viewing PDF/document (add this class via JS) */
.sdc2.hidden-for-reading {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sdc2 {
        max-width: 95%;
        margin: 1.5rem auto 2rem;
        top: 10px;
    }
    
    .sdc2 .search-dock-input {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .sdc2.scrolled {
        transform: scale(0.92);
    }
}
/* ================================================================= */
/* --- 1. VIEWER OVERLAY (The Drawer) --- */
/* ================================================================= */
#viewer-overlay {
    display: none;
    width: 100%;
    flex-basis: 100%; 
    background: #fdfdfd;
    margin-top: 25px;
    margin-bottom: 25px;
    
    /* ORANGE BORDER ALL AROUND */
     border: 3px solid #f59c27 !important;
    box-shadow: 0 0 0 4px rgba(245, 156, 39, 0.2) !important;
    border-radius: 8px;
    
    position: relative;
    z-index: 10;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.loading-spinner {
    display: flex; align-items: center; justify-content: center;
    height: 100%; width: 100%; color: #999; font-style: italic;
}

/* Active Card Highlight (Matches Viewer) */
.controle-card.active-card {
    border: 3px solid #f59c27 !important;
    box-shadow: 0 0 0 4px rgba(245, 156, 39, 0.2) !important;
    transform: translateY(-2px);
    z-index: 15;
}

/* Stats Widget */
#meili-stats {
    text-align: center;
    font-size: 0.9em;
    color: #f59c27;
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* ================================================================= */
/* --- 2. VIEWER CONTENT LAYOUT --- */
/* ================================================================= */

.fiche-controle-container {
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 30px 15px; 
    box-sizing: border-box;
    position: relative;
}

.fiche-description {
    background: #ffffff; 
    padding: 25px 30px; 
    border-radius: 12px;
    margin-bottom: 30px; 
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    position: relative; 
}

/* Close Button - BIG GREEN */
.btn-close-absolute {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px; 
    height: 45px;
    border-radius: 50%;
    background: #0e5c4b;
    border: 2px solid #0e5c4b;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-close-absolute:hover {
    background: #094034; 
    transform: scale(1.1);
}

.fiche-title { font-size: 1.6rem; color: #222; margin: 0 0 12px 0; font-weight: 700; line-height: 1.3; max-width: 75%; }
.fiche-metadata-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; align-items: center; }

/* ================================================================= */
/* --- 3. PILLS (ORIGINAL COLORS) --- */
/* ================================================================= */
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 3px;
    border: 1px solid;
    white-space: nowrap;
    background-color: white;
}
.pill-niveau { border-color: #f59c27; color: #f59c27; }
.pill-chapitres { border-color: #0e5c4b; color: #0e5c4b; }
.pill-date { border-color: #39b8b0; color: #39b8b0; }
.pill-complet { background-color: #fff9db; color: #f59f00; border-color: #f59f00; }
.pill-corrige { background-color: #f1a137; color: white; border-color: #f1a137; font-size: 0.8em; padding: 3px 8px; }

/* Thumbnail */
.pdf-thumbnail-float {
    float: right; width: 180px; max-width: 25%;
    margin-left: 25px; margin-bottom: 10px; margin-top: 50px;
    background-color: #fff; border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08); border-radius: 6px;
    overflow: hidden; position: relative; z-index: 10;
}
.pdf-thumbnail-float img { width: 100%; height: auto; display: block; }

/* ================================================================= */
/* --- 4. SPLIT VIEW & LOCK --- */
/* ================================================================= */
.split-view-container { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; width: 100%; min-height: 800px; }
.view-column { background: #fff; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); display: flex; flex-direction: column; border: 1px solid #eef0f2; overflow: hidden; height: 800px; }
.column-header { background: #fff; padding: 15px 20px; border-bottom: 3px solid #f59c27; display: flex; justify-content: space-between; align-items: center; }
.column-header h3 { margin: 0; color: #0e5c4b; font-size: 1.1rem; font-weight: 800; text-transform: uppercase; }

.adobe-viewer-container { flex-grow: 1; width: 100%; height: 100%; background: #f9f9f9; position: relative; }

.correction-wrapper { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
#correction-lock-ui, #correction-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.98); z-index: 50;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px;
}
.lock-icon { font-size: 40px; margin-bottom: 10px; animation: bounce 2s infinite; }
.btn-reveal { background-color: #39b8b0; color: white; border: none; padding: 10px 25px; font-size: 1rem; border-radius: 50px; cursor: pointer; margin-top: 15px; font-weight: bold; box-shadow: 0 4px 10px rgba(57, 184, 176, 0.3); }

/* ================================================================= */
/* --- 5. GRID LIST & SEARCH --- */
/* ================================================================= */
.controle-card-list { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 20px; padding: 15px; max-width: 1400px; margin-left: auto; margin-right: auto; box-sizing: border-box; align-items: flex-start; }
.controle-card { border: 1px solid #ddd; border-radius: 8px; background-color: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; overflow: hidden; width: 300px; flex: 1 0 260px; max-width: 300px; transition: transform 0.2s, box-shadow 0.2s; min-height: 400px; }
.controle-card-header { padding: 10px 15px; background-color: #f8f9fa; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.controle-card-body { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; gap: 15px; }
.image-preview-container { border: none; display: flex; justify-content: center; align-items: center; background-color: #f0f0f0; overflow: hidden; width: 100%; aspect-ratio: 1 / 1.4142; min-height: 180px; }
.image-preview-container img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.card-visible-title { order: -1; margin-bottom: 10px; font-size: 1.1em; font-weight: bold; color: #737373; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; max-height: calc(1.4em * 2); }

#galilee-search-wrapper { max-width: 800px; margin: 0 auto; }
#custom-search-input { width: 100%; padding: 15px 25px; border-radius: 50px; border: 2px solid #e9ecef; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* ================================================================= */
/* --- 6. ANTI-BLINK & MOBILE --- */
/* ================================================================= */
@media (max-width: 991px) {
    #viewer-overlay { position: relative !important; height: auto !important; margin: 15px 0; }
    .split-view-container { grid-template-columns: 1fr; gap: 30px; min-height: auto; }
    .view-column { height: auto; min-height: auto; }
       .adobe-viewer-container { 
        height: 60vh !important; 
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #e9e9e9;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .adobe-viewer-container canvas { 
        max-width: 96% !important; 
        width: 96% !important;
        height: auto !important;
        margin: 10px auto !important; 
        display: block !important;
    }
    
    /* Force no horizontal layout */
    .adobe-viewer-container iframe {
        width: 100% !important;
        height: 100% !important;
    }
    .correction-wrapper { min-height: 400px; }
    .pdf-thumbnail-float { display: none !important; }
    .fiche-text-desc { display: none !important; }
}

.controle-card:not(.fade-in-card) { display: none !important; }
.fade-in-card { opacity: 1 !important; animation: none !important; visibility: visible !important; }
#meili-results-container { min-height: 400px; width: 100%; }

.skeleton-card { border: 1px solid #eee; border-radius: 8px; background: #fff; width: 300px; flex: 1 0 260px; max-width: 300px; height: 400px; display: flex; flex-direction: column; overflow: hidden; position: relative; margin-bottom: 20px; }
.skeleton-card::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,0.5) 20%, rgba(255,255,255,0.8) 60%, rgba(255,255,255,0)); transform: translateX(-100%); animation: shimmer 1.5s infinite; }
.sk-header { height: 40px; background: #f8f9fa; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.sk-title { height: 24px; width: 80%; background: #e0e0e0; margin: 0 15px 15px; border-radius: 4px; }
.sk-image { height: 180px; background: #f0f0f0; margin-bottom: 15px; }
.sk-tag { height: 16px; width: 40%; background: #e0e0e0; margin: 0 15px; border-radius: 10px; }
.sk-footer { margin-top: auto; height: 45px; border-top: 1px solid #eee; background: #f8f9fa; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

#data_adv_form, #advancedcheckbox, label[for="pref_search"], #pref_search { display: none !important; }




/* --- 1. HIDE ORIGINAL TITLES --- */
.page-header-headings h1, 
.activity-header h2 {
    display: none !important;
}

/* --- 2. CONTAINER --- */
.galilee-modern-header {
    text-align: center;
    padding: 1rem 0.1rem;/* More padding for a 'hero' feel */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- 3. BADGE (Pill) - Matches your Turquoise --- */
.galilee-modern-header .header-badge {
    display: inline-block;
    background-color: #E0F7FA; /* Very light Cyan */
    color: #00897B;            /* Deep Teal from your text/square */
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

/* --- 4. TITLE (H2) - Matches your Deep Green --- */
.galilee-modern-header h2 {
    font-size: 3rem;
    font-weight: 800;
    color: #0E5C4B; /* The Deep Forest Green from your text "alilee.ac" */
    margin: 0 0 1rem 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
    white-space: nowrap; /* Forces one line on desktop */
}

/* --- 5. THE SEXY GRADIENT (Mustard -> Turquoise) --- */
.galilee-modern-header .text-gradient {
    /* The Magic: Transitions from your Logo's Orange to Teal */
    background: linear-gradient(120deg, #0E5C4B 0%, #26A69A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
    padding-right: 5px; /* Prevents italic/gradient clipping */
}

/* --- 6. SUBTITLE --- */
.galilee-modern-header .header-subtitle {
    font-size: 1.15rem;
    color: #5d7570; /* Muted Green-Grey */
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- 7. MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .galilee-modern-header {
        padding: 2rem 0.5rem;
    }
    .galilee-modern-header h2 {
        font-size: 1.75rem;
        white-space: normal; /* Wraps on phone */
    }
}