/* ==========================================================================
   PORTAIL OFFICIEL CNMP - RÉPUBLIQUE DE DJIBOUTI
   Design System & Modern Dynamic Styling (Vanilla CSS)
   ========================================================================== */

:root {
    /* Brand Colors - Republic of Djibouti & Modern Gov Tech */
    --dj-blue: #0084d6;
    --dj-blue-dark: #0a4d80;
    --dj-blue-deep: #081a33;
    --dj-blue-light: #e0f2fe;
    --dj-green: #10b981;
    --dj-green-dark: #065f46;
    --dj-green-light: #ecfdf5;
    --dj-red: #ef4444;
    --dj-red-light: #fef2f2;
    --dj-gold: #f59e0b;
    --dj-gold-light: #fef3c7;

    /* Base Colors - Light Theme Default */
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --bg-header-gradient: linear-gradient(135deg, #091a33 0%, #0c284d 50%, #004b80 100%);
    --bg-hero: linear-gradient(180deg, #0c284d 0%, #0f3666 100%);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --text-accent: #0284c7;

    --border-color: #e2e8f0;
    --border-focus: #0284c7;
    --border-glass: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(0, 132, 214, 0.35);

    /* Radius & Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-page: #0a0f1d;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-surface-subtle: #162032;
    --bg-header-gradient: linear-gradient(135deg, #050b14 0%, #0a1424 50%, #0f243e 100%);
    --bg-hero: linear-gradient(180deg, #07101e 0%, #0c1a30 100%);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #ffffff;
    --text-accent: #38bdf8;

    --border-color: #243044;
    --border-focus: #38bdf8;
    --border-glass: rgba(255, 255, 255, 0.08);

    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
}

/* Arabic typography support */
[lang="ar"], .arabic-text {
    font-family: 'Tajawal', system-ui, sans-serif;
    direction: rtl;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   TOP OFFICIAL GOVERNMENT BAR
   ========================================================================== */
.top-gov-bar {
    background-color: #050e1a;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 50;
}

.top-gov-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.gov-flag-strip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gov-flag-img {
    height: 18px;
    width: 26px;
    max-width: 26px;
    max-height: 18px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

.gov-country-block {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.gov-country-block.ar {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}

.gov-country-name {
    font-size: 0.74rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

.gov-country-name.ar {
    font-size: 0.80rem;
    color: #f8fafc;
    font-weight: 800;
}

.gov-country-motto {
    font-size: 0.64rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.gov-country-motto.ar {
    font-size: 0.67rem;
    color: #94a3b8;
    font-weight: 500;
}

.gov-top-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.16);
    margin: 0 2px;
}

.top-gov-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gov-hotline {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #38bdf8;
    font-weight: 600;
}

.gov-hotline i {
    font-size: 0.82rem;
    transform: none !important;
    display: inline-block;
}

.lang-selector, .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.lang-selector:hover, .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* ==========================================================================
   OFFICIAL HEADER & BANNER (COMPACT UNIFIED MODERN BAR)
   ========================================================================== */
.main-header {
    background: var(--bg-header-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    border-bottom: 2.5px solid var(--dj-green);
    padding: 8px 0;
}

.nav-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

/* Left Brand Group */
.brand-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-emblem-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
    transition: transform var(--transition-base);
}

.brand-left-group:hover .brand-emblem-img {
    transform: scale(1.04);
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.brand-main-fr {
    font-size: 0.94rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-sub-ar {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.80rem;
    font-weight: 700;
    color: #38bdf8;
    line-height: 1.2;
    direction: rtl;
    text-align: left;
}

/* Right Navigation Group */
.nav-right-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 6px;
    color: #e2e8f0;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.78rem;
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.nav-link:hover, .nav-item.active .nav-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-link:hover i, .nav-item.active .nav-link i {
    color: #38bdf8;
}

.badge-live-count {
    background: var(--dj-green);
    color: #ffffff;
    font-size: 0.60rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: var(--radius-full);
    margin-left: 2px;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: livePulse 2s infinite;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #0d1b30;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #cbd5e1;
    font-size: 0.82rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(2, 132, 214, 0.2);
    color: #ffffff;
    padding-left: 20px;
}

.dropdown-item i {
    font-size: 0.78rem;
    color: #38bdf8;
}

.header-action-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    padding: 7px 13px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(2, 132, 214, 0.35);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.header-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(2, 132, 214, 0.5);
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.btn-mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Mobile Drawer Overlay */
.mobile-drawer-overlay {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 29, 0.96);
    backdrop-filter: blur(12px);
    z-index: 99;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.mobile-drawer-overlay.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-drawer-overlay .nav-link {
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   TICKER / FLASH INFO BAR (ANIMATED FADING SLIDER)
   ========================================================================== */
.news-ticker-bar {
    background: #061120;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 0;
    font-size: 0.82rem;
    color: #cbd5e1;
    position: relative;
    z-index: 40;
}

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.ticker-label {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.70rem;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
    flex-shrink: 0;
}

.ticker-slider-container {
    flex: 1;
    position: relative;
    height: 24px;
    overflow: hidden;
    min-width: 0;
}

.ticker-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    will-change: opacity, transform;
}

.ticker-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ticker-slide.fading-out {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.ticker-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.ticker-tag.tag-urgent {
    background: rgba(239, 68, 68, 0.22);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.ticker-tag.tag-nouveau {
    background: rgba(2, 132, 214, 0.22);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 214, 0.35);
}

.ticker-tag.tag-info {
    background: rgba(16, 185, 129, 0.22);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.ticker-tag.tag-recours {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.ticker-text {
    color: #cbd5e1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.82rem;
}

.ticker-text strong {
    color: #ffffff;
    font-weight: 700;
}

.ticker-nav-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ticker-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ticker-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.08);
}

.ticker-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ticker-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticker-dot.active {
    width: 14px;
    border-radius: 4px;
    background: var(--dj-blue);
}

/* ==========================================================================
   HERO SECTION & SMART UNIFIED SEARCH
   ========================================================================== */
.hero-section {
    background: var(--bg-hero);
    color: #ffffff;
    padding: 48px 0 64px 0;
    position: relative;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 15% 25%, rgba(2, 132, 214, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 36px auto;
}

.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #e0f2fe;
    margin-bottom: 18px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.hero-title span {
    background: linear-gradient(120deg, #38bdf8 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.08rem;
    color: #cbd5e1;
    font-weight: 400;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
}

/* SMART SEARCH CONTAINER */
.search-card-wrapper {
    position: relative;
    z-index: 20;
    max-width: 1080px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding: 24px;
    backdrop-filter: blur(16px);
}

[data-theme="dark"] .search-card-wrapper {
    background: rgba(17, 24, 39, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.search-form-grid {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1.3fr 1.1fr auto;
    gap: 12px;
    align-items: center;
}

.search-field {
    position: relative;
}

.search-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-group i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input-group input, 
.search-input-group select {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input-group input:focus, 
.search-input-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(2, 132, 214, 0.15);
}

.btn-search-submit {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(2, 132, 214, 0.4);
    transition: all var(--transition-fast);
    margin-top: 21px;
}

.btn-search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 214, 0.55);
}

.search-quick-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quick-tag-chip {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-tag-chip:hover {
    background: var(--dj-blue-light);
    color: var(--dj-blue);
    border-color: var(--dj-blue);
}

/* ==========================================================================
   KPI STATS SECTION (RECAPITULATIF REIMAGINED)
   ========================================================================== */
.stats-section {
    margin-top: -36px;
    position: relative;
    z-index: 30;
    margin-bottom: 48px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--dj-blue);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before { background: var(--dj-blue); }
.stat-card.green::before { background: var(--dj-green); }
.stat-card.amber::before { background: var(--dj-gold); }
.stat-card.purple::before { background: #8b5cf6; }

.stat-icon-box {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-card.blue .stat-icon-box { background: #e0f2fe; color: #0284c7; }
.stat-card.green .stat-icon-box { background: #dcfce7; color: #10b981; }
.stat-card.amber .stat-icon-box { background: #fef3c7; color: #d97706; }
.stat-card.purple .stat-icon-box { background: #ede9fe; color: #7c3aed; }

[data-theme="dark"] .stat-card.blue .stat-icon-box { background: rgba(2, 132, 214, 0.2); }
[data-theme="dark"] .stat-card.green .stat-icon-box { background: rgba(16, 185, 129, 0.2); }
[data-theme="dark"] .stat-card.amber .stat-icon-box { background: rgba(217, 119, 6, 0.2); }
[data-theme="dark"] .stat-card.purple .stat-icon-box { background: rgba(124, 58, 237, 0.2); }

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    font-feature-settings: "tnum";
}

.stat-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 3px;
}

.stat-trend {
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.trend-up { color: var(--dj-green); }
.trend-alert { color: var(--dj-red); }

/* ==========================================================================
   MAIN CONTENT LAYOUT (2 COLUMNS)
   ========================================================================== */
.main-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    margin-bottom: 60px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.main-content-column {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.sidebar-column {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--dj-blue-light);
    color: var(--dj-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

[data-theme="dark"] .section-icon-badge {
    background: rgba(2, 132, 214, 0.2);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Tabs & Controls */
.tenders-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    margin-bottom: 20px;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.filter-pills-list {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
}

.filter-pill-btn {
    background: transparent;
    border: none;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-pill-btn:hover {
    background: var(--bg-surface-subtle);
    color: var(--text-primary);
}

.filter-pill-btn.active {
    background: var(--dj-blue);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 214, 0.35);
}

.view-mode-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-surface-subtle);
    border-radius: var(--radius-sm);
    padding: 3px;
    border: 1px solid var(--border-color);
}

.view-toggle-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 30px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.view-toggle-btn.active {
    background: var(--bg-surface);
    color: var(--dj-blue);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   DYNAMIC MODERN TENDER PUBLICATION CARDS (V2 - 3 PER ROW)
   ========================================================================== */
.tenders-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tender-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 15px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border-top: 3.5px solid var(--dj-blue);
}

.tender-card.urgent {
    border-top-color: #ef4444;
}

.tender-card.expire {
    border-top-color: #94a3b8;
    opacity: 0.85;
}

.tender-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(2, 132, 214, 0.16);
    border-color: rgba(2, 132, 214, 0.35);
}

.t-card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.t-card-authority {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.t-authority-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 214, 0.12);
}

[data-theme="dark"] .t-authority-icon {
    background: rgba(2, 132, 214, 0.15);
    color: #38bdf8;
}

.t-authority-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.t-authority-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.t-project-name {
    font-size: 0.69rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tender-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 750;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.tender-badge-pill.pill-active {
    background: #dcfce7;
    color: #15803d;
}

.tender-badge-pill.pill-urgent {
    background: #fee2e2;
    color: #b91c1c;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
    animation: gentlePulse 2s infinite;
}

.tender-badge-pill.pill-expired {
    background: #f1f5f9;
    color: #64748b;
}

[data-theme="dark"] .tender-badge-pill.pill-active {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .tender-badge-pill.pill-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

[data-theme="dark"] .tender-badge-pill.pill-expired {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.live-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
    animation: livePulse 1.8s infinite;
}

.t-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.t-ref-chip {
    font-family: monospace;
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--dj-blue);
    background: var(--dj-blue-light);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

[data-theme="dark"] .t-ref-chip {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.t-nature-chip, .t-mode-chip {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-surface-subtle);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tender-card-title-v2 {
    font-size: 0.90rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.38;
    margin-bottom: 6px;
    cursor: pointer;
    transition: color var(--transition-fast);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tender-card-title-v2:hover {
    color: var(--dj-blue);
}

.tender-card-desc-v2 {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t-card-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    background: var(--bg-surface-subtle);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.t-meta-item {
    display: flex;
    flex-direction: column;
}

.t-meta-label {
    font-size: 0.64rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.t-meta-value {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t-meta-value.deadline-highlight {
    color: #0369a1;
}

[data-theme="dark"] .t-meta-value.deadline-highlight {
    color: #38bdf8;
}

.t-card-action-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.btn-t-consult {
    flex: 1;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(2, 132, 214, 0.25);
    transition: all var(--transition-fast);
}

.btn-t-consult:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 214, 0.4);
}

.btn-t-dao {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-t-dao:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

[data-theme="dark"] .btn-t-dao:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: #ef4444;
}

/* SEE ALL TENDERS ACTION */
.see-all-tenders-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 8px;
}

.btn-see-all-tenders {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--dj-blue);
    padding: 11px 26px;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 750;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-see-all-tenders:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 214, 0.28);
}

.btn-see-all-tenders.expanded {
    background: var(--bg-surface-subtle);
    color: var(--text-secondary);
}

.btn-see-all-tenders.expanded:hover {
    background: var(--text-primary);
    color: #ffffff;
    border-color: var(--text-primary);
}

[data-theme="dark"] .btn-see-all-tenders {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
}

[data-theme="dark"] .btn-see-all-tenders:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
}

/* Table buttons */
.btn-tender-consult-sm {
    background: var(--dj-blue);
    color: #ffffff;
    border: none;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 4px;
    transition: all var(--transition-fast);
}

.btn-tender-consult-sm:hover {
    background: var(--dj-blue-dark);
}

.btn-tender-dao-sm {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all var(--transition-fast);
}

.btn-tender-dao-sm:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* ==========================================================================
   ATTRIBUTIONS TABLE (RECENT AWARDS)
   ========================================================================== */
.attributions-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-top: 36px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 16px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    display: block;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.86rem;
}

.modern-table th {
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: background-color var(--transition-fast);
}

.modern-table tbody tr:hover {
    background-color: rgba(2, 132, 214, 0.03);
}

/* ==========================================================================
   ATTRIBUTIONS VALIDÉES (CLEAN, SIMPLE & ELEGANT TABLE)
   ========================================================================== */
.award-table-row {
    transition: background-color var(--transition-fast);
}

.award-table-row:hover {
    background-color: rgba(2, 132, 214, 0.04);
}

.col-award-market {
    max-width: 360px;
}

.award-clean-title {
    font-weight: 750;
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.38;
    margin-bottom: 5px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.award-clean-title:hover {
    color: var(--dj-blue);
}

.award-clean-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.73rem;
    color: var(--text-muted);
}

.award-ref-tag {
    font-family: monospace;
    font-weight: 700;
    color: var(--dj-blue);
    background: var(--dj-blue-light);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.70rem;
    letter-spacing: 0.02em;
}

[data-theme="dark"] .award-ref-tag {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.award-inst-tag {
    color: var(--text-muted);
    font-weight: 500;
}

.col-award-winner {
    white-space: nowrap;
}

.award-winner-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 750;
    font-size: 0.86rem;
    color: var(--text-primary);
}

.award-winner-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 0.73rem;
    color: var(--text-muted);
}

.award-nat-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.69rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: var(--radius-full);
}

.award-nat-badge.nat-local {
    background: #dcfce7;
    color: #15803d;
}

.award-nat-badge.nat-intl {
    background: #e0f2fe;
    color: #0369a1;
}

[data-theme="dark"] .award-nat-badge.nat-local {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .award-nat-badge.nat-intl {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.award-duration {
    color: var(--text-muted);
}

.col-award-amount {
    white-space: nowrap;
}

.award-amount-box {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-feature-settings: "tnum";
}

.award-amount-val {
    font-weight: 850;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.award-amount-cur {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--dj-blue);
    letter-spacing: 0.03em;
}

.award-status-note {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--dj-green);
    margin-top: 2px;
}

.btn-award-extract {
    background: #ffffff;
    border: 1px solid rgba(2, 132, 214, 0.25);
    color: var(--dj-blue);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-weight: 650;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.btn-award-extract:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 214, 0.25);
}

[data-theme="dark"] .btn-award-extract {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
}

[data-theme="dark"] .btn-award-extract:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
}

/* ==========================================================================
   SIDEBAR (RIGHT COLUMN)
   ========================================================================== */
.sidebar-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* SIDEBAR CARD */
.sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    overflow: hidden;
}

.sidebar-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: -0.01em;
}

.sidebar-card-title i {
    color: var(--dj-blue);
}

/* E-SERVICES / LOGIN WIDGET */
.portal-login-widget {
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-surface-subtle) 100%);
    border: 1.5px solid var(--dj-blue);
    position: relative;
}

.login-type-tabs {
    display: flex;
    background: var(--bg-surface-subtle);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 14px;
}

.login-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-tab-btn.active {
    background: var(--bg-surface);
    color: var(--dj-blue);
    box-shadow: var(--shadow-sm);
}

.login-form-group {
    margin-bottom: 12px;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.login-input:focus {
    border-color: var(--dj-blue);
    box-shadow: 0 0 0 2px rgba(2, 132, 214, 0.15);
}

.btn-portal-login {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(2, 132, 214, 0.3);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-portal-login:hover {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    box-shadow: 0 6px 14px rgba(2, 132, 214, 0.45);
}

.login-helpers {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.74rem;
    color: var(--dj-blue);
}

/* EVENT BANNER (COLLOQUE) */
.event-banner-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0f1e36;
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.event-banner-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-banner-card:hover img {
    transform: scale(1.05);
}

.event-banner-overlay {
    padding: 14px;
}

.event-badge-label {
    background: var(--dj-green);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.event-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}

/* REGULATIONS LIST */
.regulations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.regulation-item {
    padding: 10px;
    background: var(--bg-surface-subtle);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--dj-blue);
    font-size: 0.78rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.regulation-item:hover {
    background: var(--dj-blue-light);
    transform: translateX(4px);
}

[data-theme="dark"] .regulation-item:hover {
    background: rgba(2, 132, 214, 0.15);
}

.regulation-decree-number {
    font-weight: 700;
    color: var(--dj-blue);
    margin-bottom: 2px;
}

.regulation-desc {
    color: var(--text-secondary);
    line-height: 1.35;
}

/* CALCULATOR CARD (MINI TOOL) */
.calc-field-group {
    margin-bottom: 12px;
}

.calc-field-group label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calc-result-box {
    background: var(--bg-surface-subtle);
    border: 1px dashed var(--dj-blue);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-top: 10px;
    text-align: center;
}

.calc-result-number {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dj-blue);
    font-feature-settings: "tnum";
}

/* ==========================================================================
   DOCUMENTS TYPE SECTION (DAO REIMAGINED)
   ========================================================================== */
.documents-type-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-sm);
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.doc-type-card {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 26px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.doc-type-card:hover {
    transform: translateY(-6px);
    border-color: var(--dj-blue);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
}

.doc-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
    transition: all var(--transition-fast);
}

.doc-type-card:hover .doc-icon-circle {
    background: var(--dj-blue);
    color: #ffffff;
    transform: rotate(5deg) scale(1.08);
}

.doc-category-badge {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--dj-blue);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.doc-title-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.doc-subtitle-nature {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dj-green);
    margin-bottom: 12px;
}

.doc-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 18px;
    flex: 1;
}

.btn-download-doc {
    background: var(--bg-surface);
    border: 1.5px solid var(--dj-blue);
    color: var(--dj-blue);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    justify-content: center;
}

.btn-download-doc:hover {
    background: var(--dj-blue);
    color: #ffffff;
}

/* ==========================================================================
   INTERACTIVE DATA & CHARTS SECTION
   ========================================================================== */
.stats-charts-section {
    margin-bottom: 60px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.chart-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.chart-container-box {
    position: relative;
    height: 280px;
    width: 100%;
}

/* ==========================================================================
   MODALS & DRAWERS
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    padding: 20px;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-backdrop.active .modal-dialog {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close-btn {
    background: var(--bg-surface-subtle);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background: var(--dj-red-light);
    color: var(--dj-red);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface-subtle);
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
    flex-wrap: wrap;
}

/* ==========================================================================
   MODAL ACTIONS BUTTONS & GENERAL ACTION BUTTONS
   ========================================================================== */
.btn-modal-close {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

[data-theme="dark"] .btn-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-modal-print {
    background: var(--bg-surface);
    border: 1.5px solid rgba(2, 132, 214, 0.35);
    color: var(--dj-blue);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-modal-print:hover {
    background: var(--dj-blue-light);
    border-color: var(--dj-blue);
    color: var(--dj-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 132, 214, 0.15);
}

[data-theme="dark"] .btn-modal-print {
    background: rgba(2, 132, 214, 0.1);
    border-color: rgba(2, 132, 214, 0.4);
    color: #38bdf8;
}

[data-theme="dark"] .btn-modal-print:hover {
    background: rgba(2, 132, 214, 0.2);
    color: #ffffff;
}

.btn-modal-download-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 750;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(2, 132, 214, 0.3);
}

.btn-modal-download-primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 214, 0.45);
    color: #ffffff;
}

/* Individual document download button in modals */
.btn-doc-download {
    background: #ffffff;
    border: 1px solid rgba(2, 132, 214, 0.3);
    color: var(--dj-blue);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-doc-download:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(2, 132, 214, 0.25);
}

[data-theme="dark"] .btn-doc-download {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
}

[data-theme="dark"] .btn-doc-download:hover {
    background: var(--dj-blue);
    color: #ffffff;
    border-color: var(--dj-blue);
}

/* Fallback for general small detail buttons */
.btn-sm-details {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-sm-details:hover {
    background: var(--bg-surface-subtle);
    border-color: var(--dj-blue);
    color: var(--dj-blue);
}

[data-theme="dark"] .btn-sm-details {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

[data-theme="dark"] .btn-sm-details:hover {
    background: rgba(2, 132, 214, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* WIZARD PROGRESS */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.wizard-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wizard-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.wizard-step-item.active .wizard-step-circle {
    border-color: var(--dj-blue);
    background: var(--dj-blue);
    color: #ffffff;
}

.wizard-step-item.completed .wizard-step-circle {
    border-color: var(--dj-green);
    background: var(--dj-green);
    color: #ffffff;
}

.wizard-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.wizard-step-item.active .wizard-step-label {
    color: var(--dj-blue);
}

/* ==========================================================================
   CHATBOT / VIRTUAL ASSISTANT (DJIBOU-MARCHÉS IA)
   ========================================================================== */
.chatbot-floating-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px rgba(2, 132, 214, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-base);
}

.chatbot-floating-toggle:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 14px 30px rgba(2, 132, 214, 0.6);
}

.chatbot-pulse-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--dj-green);
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.chatbot-window-drawer {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 380px;
    height: 520px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 950;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
}

.chatbot-window-drawer.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: var(--bg-header-gradient);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.chatbot-messages-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-surface-subtle);
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    line-height: 1.45;
}

.chat-bubble.bot {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-bubble.user {
    background: var(--dj-blue);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chat-chip {
    background: var(--dj-blue-light);
    color: var(--dj-blue);
    border: none;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

[data-theme="dark"] .chat-chip {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.chat-chip:hover {
    background: var(--dj-blue);
    color: #ffffff;
}

.chatbot-input-bar {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    gap: 8px;
}

.chatbot-input-bar input {
    flex: 1;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-subtle);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    outline: none;
}

.chatbot-input-bar button {
    background: var(--dj-blue);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   FOOTER (ENHANCED OFFICIAL GOV FOOTER)
   ========================================================================== */
.main-footer {
    background: #091424;
    color: #94a3b8;
    border-top: 4px solid var(--dj-green);
    padding-top: 50px;
}

.footer-top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer-col-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--dj-blue);
}

.footer-links-list li {
    margin-bottom: 10px;
}

.footer-links-list a,
.footer-links-list a:visited {
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.footer-links-list a:hover {
    color: #38bdf8;
    transform: translateX(4px);
}

.footer-contact-info {
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-contact-info i {
    color: var(--dj-green);
    margin-top: 4px;
}

.footer-map-preview {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-map-preview iframe {
    width: 100%;
    height: 160px;
    border: none;
    display: block;
}

.footer-bottom-bar {
    background: #050b14;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.78rem;
    color: #64748b;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.ansie-credits {
    color: #38bdf8;
    font-weight: 600;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(0.95); }
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ==========================================================================
   NEWSLETTER & ALERTE MARCHÉS PUBLICS (PROTOTYPE)
   ========================================================================== */
.newsletter-section {
    background: linear-gradient(135deg, #091a33 0%, #0c2b52 50%, #034b7d 100%);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.newsletter-header-box .newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.newsletter-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #ffffff;
}

.newsletter-title span {
    color: #38bdf8;
}

.newsletter-desc {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.newsletter-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
    color: #93c5fd;
}

.newsletter-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-features-list i {
    color: #10b981;
}

/* Newsletter Form Card */
.newsletter-form-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.newsletter-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.newsletter-email-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #0f172a;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition-fast);
}

.newsletter-email-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.btn-newsletter-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-newsletter-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
}

.newsletter-sectors-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.newsletter-sectors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.sector-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.sector-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sector-checkbox-label input {
    accent-color: #10b981;
}

.newsletter-privacy-note {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1260px) {
    .nav-menu {
        display: none;
    }

    .btn-mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .tenders-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .search-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .btn-search-submit {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-stage-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .sidebar-sticky {
        position: static;
    }

    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-top-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Header & Nav */
    .header-action-btn {
        display: none; /* Accessible in the mobile drawer */
    }

    .brand-emblem-img {
        height: 44px;
    }

    .brand-main-fr {
        font-size: 0.92rem;
    }

    .brand-sub-ar {
        font-size: 0.75rem;
    }

    .top-gov-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .top-gov-actions {
        width: 100%;
        justify-content: space-between;
    }

    /* FLASH AVIS (OPTIMISÉ POUR MOBILE) */
    .news-ticker-bar {
        padding: 8px 0;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .ticker-inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 10px;
        width: 100%;
    }

    .ticker-label {
        order: 1;
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .ticker-nav-controls {
        order: 2;
        margin-left: auto;
        gap: 6px;
        display: flex;
        align-items: center;
    }

    .ticker-counter {
        display: inline-block;
        font-size: 0.70rem;
        font-weight: 700;
        color: #94a3b8;
    }

    .ticker-dots {
        display: none;
    }

    .ticker-slider-container {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        height: auto;
        min-height: 42px;
        position: relative;
        overflow: hidden;
    }

    .ticker-slide {
        display: none;
        position: relative;
        inset: auto;
        width: 100%;
        align-items: flex-start;
        gap: 8px;
        white-space: normal;
        opacity: 0;
        visibility: hidden;
    }

    .ticker-slide.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .ticker-slide.fading-out {
        display: none;
    }

    .ticker-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
        margin-top: 2px;
        flex-shrink: 0;
    }

    .ticker-text {
        font-size: 0.78rem;
        line-height: 1.35;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
        color: #e2e8f0;
    }

    /* Hero */
    .hero-section {
        padding: 32px 0 44px 0;
    }

    .hero-title {
        font-size: 1.65rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.92rem;
    }

    .search-card-wrapper {
        padding: 16px;
    }

    .search-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-search-submit {
        margin-top: 5px;
    }

    /* Stats */
    .stats-section {
        margin-top: -24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    /* Controls Bar & Tenders Grid */
    .tenders-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .filter-pills-list {
        padding-bottom: 4px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        -webkit-overflow-scrolling: touch;
    }

    .view-mode-toggle {
        align-self: flex-end;
    }

    .tenders-cards-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .tender-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .t-card-top-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .t-card-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* TABLE DES ATTRIBUTIONS -> CARTES RESPONSIVES SUR MOBILE */
    .attributions-section {
        padding: 16px 14px;
        margin-top: 24px;
        border-radius: var(--radius-md);
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .attributions-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .table-responsive-wrapper {
        margin-top: 12px;
        overflow-x: visible;
        width: 100%;
        max-width: 100%;
    }

    .modern-table,
    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .modern-table thead {
        display: none;
    }

    .award-table-row {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 14px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: transform var(--transition-fast), border-color var(--transition-fast);
        width: 100%;
        box-sizing: border-box;
    }

    .award-table-row:hover {
        border-color: var(--dj-blue);
        transform: translateY(-1px);
    }

    .award-table-row td {
        padding: 0 !important;
        border: none !important;
        width: 100%;
    }

    .col-award-market {
        max-width: 100%;
        width: 100%;
    }

    .award-clean-title {
        font-size: 0.90rem;
        line-height: 1.35;
        margin-bottom: 6px;
        color: var(--text-primary);
    }

    .award-clean-meta {
        gap: 6px;
        flex-wrap: wrap;
    }

    .col-award-winner {
        background: var(--bg-surface-subtle);
        padding: 10px 12px !important;
        border-radius: var(--radius-sm);
        border: 1px solid rgba(0, 0, 0, 0.04);
        white-space: normal;
        width: 100%;
        box-sizing: border-box;
    }

    [data-theme="dark"] .col-award-winner {
        border-color: rgba(255, 255, 255, 0.06);
    }

    .award-winner-main {
        font-size: 0.86rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .award-winner-details {
        margin-top: 5px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .col-award-amount {
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: normal;
        border-top: 1px dashed var(--border-color) !important;
        padding-top: 8px !important;
        width: 100%;
        box-sizing: border-box;
    }

    .award-amount-box {
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .award-amount-val {
        font-size: 1.12rem;
        color: var(--dj-blue);
        font-weight: 800;
    }

    .col-award-actions {
        padding-top: 2px !important;
        width: 100%;
    }

    .btn-award-extract {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
        font-size: 0.82rem;
        border-radius: var(--radius-sm);
    }

    /* Vue Tableau Marchés -> Cartes si activée */
    .tenders-table tr {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        padding: 14px;
        margin-bottom: 12px;
        box-shadow: var(--shadow-sm);
        width: 100%;
    }

    .tenders-table td {
        padding: 6px 0 !important;
        border: none !important;
        width: 100%;
    }

    /* Sidebar Widgets (Simulateur, Réglementation, Connexion) */
    .sidebar-column {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .sidebar-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px;
    }

    .calculator-widget,
    .regulations-widget,
    .portal-login-widget {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .calc-input-group,
    .calc-select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .regulation-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Documents Types Grid */
    .docs-grid {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }

    .doc-type-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Newsletter */
    .newsletter-section {
        padding: 30px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .newsletter-input-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-newsletter-submit {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer-top-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        width: 100%;
    }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Chatbot drawer on mobile */
    .chatbot-window-drawer {
        width: calc(100vw - 32px);
        right: 16px;
        bottom: 84px;
        height: 480px;
        max-width: calc(100% - 32px);
    }

    .chatbot-floating-toggle {
        bottom: 18px;
        right: 18px;
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .brand-main-fr {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    .brand-emblem-img {
        height: 38px;
    }

    .gov-flag-strip {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tender-header {
        flex-direction: column;
        gap: 6px;
    }

    .tender-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tender-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   OFFICIAL DJIBOUTI FLAG IMAGE STYLING
   ========================================================================== */
.gov-flag-img {
    height: 18px;
    width: auto;
    max-width: 28px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   INDICATIVE NAVIGATION LINKS
   ========================================================================== */
.nav-link.indicative {
    cursor: default;
    user-select: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link.indicative:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
}

/* ==========================================================================
   DEDICATED CONTACT SECTION (BEAUTIFUL & MODERN)
   ========================================================================== */
.contact-section-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 44px 36px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.contact-section-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--dj-blue) 0%, var(--dj-green) 100%);
}

.contact-header-center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 36px auto;
}

.contact-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--dj-blue-light);
    color: var(--dj-blue);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

[data-theme="dark"] .contact-badge-pill {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.contact-main-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.contact-main-title span {
    color: var(--dj-blue);
}

.contact-main-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 36px;
    align-items: start;
}

/* Contact Info Cards Column */
.contact-info-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-detail-card {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-base);
}

.contact-detail-card:hover {
    border-color: var(--dj-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon-box {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

[data-theme="dark"] .contact-icon-box {
    background: rgba(2, 132, 214, 0.2);
    color: #38bdf8;
}

.contact-detail-content h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-detail-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.contact-detail-content strong {
    color: var(--text-primary);
}

.contact-detail-content a {
    color: var(--dj-blue);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.contact-detail-content a:hover {
    color: var(--dj-blue-dark);
    text-decoration: underline;
}

/* Interactive Contact Form */
.contact-form-panel {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.contact-form-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.contact-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.contact-field-group {
    margin-bottom: 14px;
}

.contact-field-group label {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.contact-input-styled {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.contact-input-styled:focus {
    border-color: var(--dj-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 214, 0.15);
}

textarea.contact-input-styled {
    resize: vertical;
    min-height: 110px;
}

.btn-contact-submit {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(2, 132, 214, 0.35);
    transition: all var(--transition-fast);
}

.btn-contact-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 214, 0.5);
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

/* ==========================================================================
   FULL ARABIC / RTL SUPPORT ([dir="rtl"])
   ========================================================================== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
}

[dir="rtl"] .top-gov-inner,
[dir="rtl"] .nav-header-container,
[dir="rtl"] .footer-bottom-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .brand-left-group {
    flex-direction: row;
}

[dir="rtl"] .brand-text-block {
    text-align: right;
}

[dir="rtl"] .brand-sub-ar {
    text-align: right;
}

[dir="rtl"] .nav-right-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-input-group i {
    left: auto;
    right: 14px;
}

[dir="rtl"] .search-input-group input,
[dir="rtl"] .search-input-group select {
    padding: 12px 40px 12px 14px;
}

[dir="rtl"] .stat-card {
    border-left: 1px solid var(--border-color);
    border-right: 4px solid transparent;
}

[dir="rtl"] .stat-card.blue { border-right-color: var(--dj-blue); }
[dir="rtl"] .stat-card.green { border-right-color: var(--dj-green); }
[dir="rtl"] .stat-card.amber { border-right-color: var(--dj-gold); }
[dir="rtl"] .stat-card.purple { border-right-color: #8b5cf6; }

[dir="rtl"] .stat-card::before {
    display: none;
}

[dir="rtl"] .modern-table th,
[dir="rtl"] .modern-table td {
    text-align: right;
}

[dir="rtl"] .modern-table th:last-child,
[dir="rtl"] .modern-table td:last-child {
    text-align: center;
}

[dir="rtl"] .amount-badge-djf {
    float: left;
}

[dir="rtl"] .badge-live-count {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .chatbot-window-drawer {
    right: auto;
    left: 28px;
}

[dir="rtl"] .chatbot-floating-toggle {
    right: auto;
    left: 28px;
}

[dir="rtl"] .contact-section-wrapper::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .contact-detail-card {
    flex-direction: row;
}

[dir="rtl"] .footer-links-list a:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .regulation-item:hover {
    transform: translateX(-4px);
}

@media (max-width: 900px) {
    .contact-layout-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-row-2 {
        grid-template-columns: 1fr;
    }

    .faq-grid-cards {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   DEDICATED CONTACT.HTML PAGE STYLING
   ========================================================================== */
.breadcrumb-strip {
    background: var(--bg-surface-subtle);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 0.8rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--text-muted);
}

.breadcrumb-list a {
    color: var(--text-secondary);
    font-weight: 600;
}

.breadcrumb-list a:hover {
    color: var(--dj-blue);
}

.breadcrumb-list .sep {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.breadcrumb-list .current {
    color: var(--dj-blue);
    font-weight: 700;
}

.contact-page-hero {
    background: linear-gradient(180deg, rgba(2, 132, 214, 0.08) 0%, rgba(2, 132, 214, 0) 100%);
    padding: 40px 0 20px 0;
    text-align: center;
}

.contact-page-hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.contact-page-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.contact-page-title span {
    background: linear-gradient(135deg, var(--dj-blue) 0%, var(--dj-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.faq-card:hover {
    border-color: var(--dj-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.faq-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-card p {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.6;
}



