/* Variables CSS Afriland - Doivent être chargées après PatternFly pour surcharger les valeurs par défaut */
:root {
  --pf-v5-global--primary-color--100: #B01030;
  --pf-v5-global--primary-color--200: #a30000;
  --pf-v5-global--primary-color--300: #B01030;
  --pf-v5-global--BackgroundColor--100: #ffffff;
  --pf-v5-global--BackgroundColor--200: #f0f0f0;
  --pf-v5-global--Color--100: #000000;
  --pf-v5-global--Color--200: #333333;
  /* Typographie : familles définies dans common/afriland/css/variables.css */
  --pf-v5-global--FontFamily--text: var(--font-body);
  --pf-v5-global--FontFamily--heading: var(--font-title);
  --pf-v5-global--FontFamily--redhatFont--text: var(--font-body);
  --pf-v5-global--FontFamily--redhatFont--heading: var(--font-title);
  --pf-v5-global--FontFamily--monospace: var(--font-mono);
}

body {
  margin: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--pf-v5-global--Color--100);
}

h1, h2, h3, h4, h5, h6,
.pf-v5-c-title {
  font-family: var(--font-title);
}

input, select, textarea, button,
.pf-v5-c-form-control,
.pf-v5-c-button {
  font-family: var(--font-body);
}

code, pre, kbd, samp {
  font-family: var(--font-mono);
}

body, #app {
  height: 100%;
  background-color: transparent !important;
  /* Note: background.jpeg est appliqué via JavaScript dans App.tsx avec environment.resourceUrl */
  /* Le background est défini dynamiquement : url('${resourceUrl}/background.jpeg') */
}

.container {
  padding: 0;
  margin: 0;
  width: 100%;
}

.keycloak__loading-container {
  height: 100vh;
  width: 100%;
  color: #151515;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .keycloak__loading-container {
    color: #e0e0e0;
    background-color: #1b1d21;
  }
}

#loading-text {
  z-index: 1000;
  font-size: 20px;
  font-weight: 600;
  padding-top: 32px;
}

/* Styles Afriland pour surcharger PatternFly */
.pf-v5-c-page__main-section {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

.pf-v5-c-page {
  background-color: transparent !important;
}

.pf-v5-c-page__main {
  background-color: transparent !important;
}

.pf-v5-c-card {
  background-color: rgba(255, 255, 255, 0.6) !important;
}

.pf-v5-c-panel {
  background-color: rgba(255, 255, 255, 0.6) !important;
}

.pf-v5-c-drawer__panel {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

.pf-v5-c-modal-box {
  background-color: rgba(255, 255, 255, 0.95) !important;
}

.pf-v5-c-masthead {
  background-size: auto;
  border-bottom: 3px solid #B01030 !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
}

.pf-v5-c-masthead__content,
.pf-v5-c-toolbar,
.pf-v5-c-toolbar__content-section,
.pf-v5-c-toolbar__group,
.pf-v5-c-toolbar__item {
  background-color: transparent !important;
}

.pf-v5-c-toolbar {
  width: 100%;
  justify-content: flex-end !important;
}

.pf-v5-c-toolbar__content {
  justify-content: flex-end !important;
  gap: var(--pf-v5-global--spacer--sm);
}

.pf-v5-c-masthead,
.pf-v5-c-masthead .pf-v5-c-toolbar__item,
.pf-v5-c-masthead .pf-v5-c-dropdown__toggle {
  color: #000000 !important;
}

.pf-v5-c-masthead .pf-v5-c-toolbar__item .pf-v5-svg {
  fill: #000000 !important;
}

.pf-v5-c-masthead__toggle .pf-v5-c-button {
  color: #000000 !important;
}

.pf-v5-c-page__sidebar,
.pf-v5-c-page__sidebar-body,
.pf-v5-c-nav {
  background-color: rgba(240, 240, 240, 0.6) !important;
}

.pf-v5-c-nav__link,
.pf-v5-c-nav__item .pf-v5-c-nav__link,
.pf-v5-c-nav__section-title,
.pf-v5-c-nav__group-title {
  color: #000000 !important;
}

.pf-v5-c-nav__link.pf-m-current,
.pf-v5-c-nav__link.pf-m-current:hover,
.pf-v5-c-nav__link.pf-m-current:focus,
.pf-v5-c-nav__link.pf-m-current:active {
  color: #B01030 !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  border-left: 3px solid #B01030;
  padding-left: calc(var(--pf-v5-global--spacer--md) - 3px);
}

.pf-v5-c-nav__link:hover:not(.pf-m-current) {
  color: #000000 !important;
  background-color: rgba(255, 255, 255, 0.5);
}

.pf-v5-c-nav__link::after {
  border-color: #B01030;
}

