/* =========================================
   EN-TÊTE (HEADER) - Z-INDEX MINIMAL
   ========================================= */
.header {
    background-color: #1a2644 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 4px 12px !important;
    
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1.5px solid #E2E8F0 !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

body:not(.toolbar-fixed) {
    padding-top: 50px !important;
}

/* =========================================
   LOGO / TITRE - COMPACT ET ÉLÉGANT
   ========================================= */
.header .logo {
  gap: 7px !important;
}

.header .logo img {
  width: 30px !important;
  height: 30px !important;
}

.d-none.text-white.d-lg-block {
    font-family: 'Arial', sans-serif;
    font-size: 4px !important;
    font-weight: 547;
    text-transform: uppercase;
    letter-spacing: -0.7px !important;
    color: #0F172A !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    padding: 4px 8px !important;
    border-radius: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.d-none.text-white.d-lg-block:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* =========================================
   FORMULAIRE DE RECHERCHE (DATE/HEURE) - COMPACT
   ========================================= */
.search-bar {
  margin: 0 !important;
  padding: 0 !important;
}

.search-form {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600;
    padding: 4px 10px !important;
    display: inline-block;
    max-width: 140px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-form:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =========================================
   BOUTON TOGGLE SIDEBAR - COMPACT
   ========================================= */
.toggle-sidebar-btn {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 10px !important;
    padding: 6px 10px !important;
    width: 38px !important;
    height: 38px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-sidebar-btn::before {
    content: "" !important;
    display: block !important;
    width: 16px !important;
    height: 2px !important;
    background-color: #ffffff !important;
    border-radius: 2px !important;
    position: absolute !important;
    top: 40% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    border: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 5px 0 #ffffff, 0 10px 0 #ffffff;
    transition: all 0.3s ease;
}

.toggle-sidebar-btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toggle-sidebar-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.toggle-sidebar-btn[title]::after {
    content: attr(title) !important;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background-color: #ffffff !important;
    color: #1a2644 !important;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    width: max-content;
    pointer-events: none;
}

.toggle-sidebar-btn:hover[title]::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   COMPATIBILITÉ TOOLBAR ADMIN DRUPAL
   ========================================= */
.toolbar-fixed .header,
body.toolbar-horizontal .header {
    top: 39px !important;
}

.toolbar-horizontal.toolbar-tray-open .header,
body.toolbar-tray-open .header {
    top: 79px !important;
}

body.toolbar-fixed {
    padding-top: 89px !important;
}

body.toolbar-horizontal.toolbar-tray-open {
    padding-top: 129px !important;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (min-width: 768px) {
    .d-none.text-white.d-lg-block {
        font-size: 18px !important;
    }
    
    .header .logo img {
      width: 40px !important;
      height: 40px !important;
    }
    
    .search-form {
        font-size: 14px !important;
        max-width: 160px !important;
    }
    
    .toggle-sidebar-btn {
        width: 42px !important;
        height: 42px !important;
    }
    
    .toggle-sidebar-btn::before {
        width: 18px !important;
        box-shadow: 0 6px 0 #ffffff, 0 12px 0 #ffffff;
    }
}

@media (max-width: 767px) {
    .header {
        padding: 6px 10px !important;
        gap: 8px !important;
    }
    
    .header .logo img {
      width: 32px !important;
      height: 32px !important;
    }
    
    .d-none.text-white.d-lg-block {
        font-size: 14px !important;
        letter-spacing: 0.2px !important;
        padding: 3px 6px !important;
    }
    
    .search-form {
        font-size: 12px !important;
        padding: 3px 8px !important;
        max-width: 120px !important;
    }
    
    .toggle-sidebar-btn {
        width: 36px !important;
        height: 36px !important;
    }
    
    .toggle-sidebar-btn::before {
        width: 14px !important;
        box-shadow: 0 4px 0 #ffffff, 0 8px 0 #ffffff;
    }
}

/* =========================================
   MESSAGES DRUPAL
   ========================================= */
.messages,
.messages--status,
.messages--warning,
.messages--error,
.status-messages,
.region-highlighted,
.breadcrumb,
.tabs,
.node--unpublished {
  position: relative !important;
}

/* =========================================
   FORMULAIRES
   ========================================= */
.user-login-form,
.login-form,
#user-login-form,
form,
.form--inline,
.block-user-login {
  position: relative !important;
}

/* =========================================
   MODALS
   ========================================= */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

.modal-dialog {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100vh - 60px) !important;
  margin: 30px auto !important;
}

.modal-content {
  width: 100% !important;
  margin: auto !important;
  background-color: #ffffff !important;
  position: relative !important;
}

/* =========================================
   LOADER
   ========================================= */
.ajax-progress,
.ajax-progress-throbber,
.ajax-progress-bar,
.ajax-progress-fullscreen {
  position: fixed !important;
}