/* ===========================================================================
   Easytech Africa — thème de marque pour AdminLTE 4 / Bootstrap 5.3
   À inclure APRÈS adminlte.css et bootstrap.css.
   Palette officielle extraite du logo :
     Bleu   #00408F   (couleur primaire / structure)
     Orange #F26C16   (accent / call-to-action)
   =========================================================================== */

:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
    --et-blue: #00408F;
    --et-blue-600: #00346F;
    --et-blue-700: #00285A;
    --et-orange: #F26C16;
    --et-orange-600: #D95F0E;
    --et-orange-700: #C4540A;

    /* On branche la couleur primaire de Bootstrap sur le bleu Easytech */
    --bs-primary: #00408F;
    --bs-primary-rgb: 0, 64, 143;
    --bs-link-color: #00408F;
    --bs-link-color-rgb: 0, 64, 143;
    --bs-link-hover-color: #00285A;
}

/* --- Boutons --------------------------------------------------------------- */
.btn-primary {
    --bs-btn-bg: var(--et-blue);
    --bs-btn-border-color: var(--et-blue);
    --bs-btn-hover-bg: var(--et-blue-600);
    --bs-btn-hover-border-color: var(--et-blue-600);
    --bs-btn-active-bg: var(--et-blue-700);
    --bs-btn-active-border-color: var(--et-blue-700);
    --bs-btn-disabled-bg: var(--et-blue);
    --bs-btn-disabled-border-color: var(--et-blue);
}

/* Bouton d'action principal (orange) : <a class="btn btn-accent"> */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--et-orange);
    --bs-btn-border-color: var(--et-orange);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--et-orange-600);
    --bs-btn-hover-border-color: var(--et-orange-600);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--et-orange-700);
    --bs-btn-active-border-color: var(--et-orange-700);
    --bs-btn-focus-shadow-rgb: 242, 108, 22;
}

.btn-outline-primary {
    --bs-btn-color: var(--et-blue);
    --bs-btn-border-color: var(--et-blue);
    --bs-btn-hover-bg: var(--et-blue);
    --bs-btn-hover-border-color: var(--et-blue);
    --bs-btn-active-bg: var(--et-blue);
}

/* --- Utilitaires de marque ------------------------------------------------- */
.text-easytech-blue   { color: var(--et-blue) !important; }
.text-easytech-orange { color: var(--et-orange) !important; }
.bg-easytech-blue     { background-color: var(--et-blue) !important; color: #fff; }
.bg-easytech-orange   { background-color: var(--et-orange) !important; color: #fff; }

/* --- Carte avec filet de marque orange (rappel du logo) -------------------- */
.card-easytech { border-top: 3px solid var(--et-orange); }

/* --- En-têtes de tableau --------------------------------------------------- */
.table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}
.table thead th a:hover { color: var(--et-blue) !important; }

/* --- Avatar initiales ------------------------------------------------------ */
.avatar-initiales {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .01em;
    background: rgba(0, 64, 143, .10);
    color: var(--et-blue);
}

/* --- Badges de statut de licence ------------------------------------------ */
.badge.et-active  { background: #E7F4EC; color: #0E7A4D; font-weight: 600; }
.badge.et-expired { background: #FBF0DA; color: #956209; font-weight: 600; }
.badge.et-none    { background: #EEF1F4; color: #677488; font-weight: 600; }
.badge.et-active .bi,
.badge.et-expired .bi,
.badge.et-none .bi { margin-left: -.35rem; }

/* --- Onglets de filtre actifs : focus bleu -------------------------------- */
.btn-check:focus + .btn, .btn:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(0, 64, 143, .25);
}

/* --- AdminLTE : barre latérale & en-tête aux couleurs Easytech ------------ */
.app-sidebar.bg-body-secondary,
.sidebar-dark-primary,
.app-sidebar {
    background-color: var(--et-blue) !important;
}
.app-sidebar .sidebar-brand { background-color: #00346F; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.app-sidebar .nav-link { color: rgba(255, 255, 255, .82); border-radius: 7px; margin: 1px 8px; }
.app-sidebar .nav-link:hover { background-color: rgba(255, 255, 255, .10); color: #fff; }
.app-sidebar .nav-link.active,
.sidebar .nav-link.active {
    background-color: var(--et-orange) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px -4px rgba(242, 108, 22, .7);
}
.app-sidebar .nav-icon { color: inherit; }
.app-sidebar .nav-header { color: rgba(255, 255, 255, .42); font-size: .68rem; letter-spacing: .08em; font-weight: 700; padding: 14px 16px 6px; }
.app-sidebar .brand-link { border-bottom: 1px solid rgba(255, 255, 255, .1); }

/* Barre supérieure */
.app-header.navbar { border-bottom: 1px solid #E3E7EC; }
.app-header .nav-link { color: #5B6675; }
.app-header .nav-link:hover { color: var(--et-blue); }
.app-footer { border-top: 1px solid #E3E7EC; color: #8A93A0; font-size: .82rem; }
.app-content-header { padding-top: 16px; }
.bg-easytech-orange { background-color: var(--et-orange) !important; }

/* --- Pagination ------------------------------------------------------------ */
.page-item.active .page-link {
    background-color: var(--et-blue);
    border-color: var(--et-blue);
}
.page-link { color: var(--et-blue); }

/* --- Écran d'authentification (mise en page en bandes, type BioTime) ------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.auth-header { display: flex; align-items: center; justify-content: center; padding: 46px 24px 40px; }
.auth-header img { height: 62px; width: auto; display: block; }

.auth-band { display: flex; justify-content: center; padding: 52px 0; background: linear-gradient(180deg, var(--et-blue) 0%, rgba(0, 64, 143, .92) 100%); }
.auth-band-inner { width: 100%; max-width: 720px; padding: 0 24px; }

.auth-tabs { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-tab { border: none; background: none; padding: 0 0 4px; cursor: pointer; font-size: 17px; font-weight: 500; color: rgba(255, 255, 255, .6); border-bottom: 2px solid transparent; text-decoration: none; }
.auth-tab.active { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.auth-sep { color: rgba(255, 255, 255, .4); font-size: 18px; }
.auth-icons { margin-left: auto; display: flex; gap: 9px; }
.auth-iconbox { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fff; }

.auth-input { position: relative; margin-bottom: 16px; }
.auth-input > .bi { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9098A5; z-index: 2; }
.auth-input .form-control { height: 50px; padding-left: 42px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .65); }
.auth-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; border: none; background: none; color: #9098A5; cursor: pointer; padding: 6px; border-radius: 7px; }
.auth-toggle:hover { background: #F0F2F5; color: #1A2230; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 22px; color: #fff; }
.auth-row .form-check-label { color: #fff; }
.auth-row a { color: rgba(255, 255, 255, .9); text-decoration: none; font-size: 13.5px; }
.auth-row a:hover { color: #fff; text-decoration: underline; }

.auth-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-buttons.single { grid-template-columns: 1fr; }
.btn-connexion { height: 54px; border: none; border-radius: 8px; background: var(--et-orange); color: #fff; font-weight: 600; font-style: italic; box-shadow: 0 6px 16px -6px rgba(242, 108, 22, .6); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-connexion:hover { background: var(--et-orange-600); color: #fff; }
.btn-bio { height: 54px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; font-style: italic; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-bio:hover { background: rgba(255, 255, 255, .22); color: #fff; }

.auth-error { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 16px; background: rgba(255, 255, 255, .96); border-left: 4px solid #C0392B; border-radius: 8px; color: #9F1B12; font-size: 13.5px; }
.auth-error ul { margin: 0; padding-left: 18px; }

.auth-footer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px 24px 30px; }
.auth-wordmark { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }

@media (max-width: 720px) { .auth-buttons { grid-template-columns: 1fr; } }
