/* ============================================================
   TRAKKIT — Custom Dark Blue Theme (Final Unified Version)
   ============================================================ */

/* COLOR VARIABLES */
:root {
    --darkblue: #00008B;
    --darkblue-hover: #00006F;
    --secondary-gray: #6c757d;
    --link-light: #9dc1ff;
    --dropdown-bg: #ffffff;
    --dropdown-hover: rgba(0, 0, 139, 0.10);
}

/* ============================================================
   GLOBAL FONTS
   ============================================================ */
body, h1, h2, h3, h4, h5, h6,
a, button, nav, .dropdown-item,
.nav-link, .btn {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* ============================================================
   NAVBAR + HEADER
   ============================================================ */
.navbar,
header {
    background-color: var(--darkblue) !important;
    color: white !important;
}

/* Navbar links */
.nav-link,
.navbar-brand h1 {
    color: #ffffff !important;
    font-weight: 600;
}

.nav-link:hover {
    background-color: var(--darkblue-hover) !important;
    color: #ffffff !important;
}

/* ============================================================
   DROPDOWN MENUS — White + readable
   ============================================================ */
.dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    color: #000 !important;
    border: 1px solid #d0d0d0 !important;
}

.dropdown-item {
    color: var(--darkblue) !important;
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover) !important;
    color: var(--darkblue) !important;
}

/* ============================================================
   BOOTSTRAP BUTTONS
   ============================================================ */

/* PRIMARY (Dark Blue) */
.btn-primary,
.btn-primary:visited {
    background-color: var(--darkblue) !important;
    border-color: var(--darkblue) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--darkblue-hover) !important;
    border-color: var(--darkblue-hover) !important;
}
.btn-primary:focus {
    box-shadow: 0 0 0 .25rem rgba(0, 0, 139, 0.4) !important;
}

/* OUTLINE PRIMARY-TYPE BUTTONS → Dark Blue */
.btn-outline-primary,
.btn-outline-info,
.btn-outline-light {
    color: var(--darkblue) !important;
    border-color: var(--darkblue) !important;
}
.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-light:hover {
    background-color: var(--darkblue) !important;
    color: #ffffff !important;
}

/* SECONDARY = Bootstrap gray (standard) */
.btn-outline-secondary {
    color: var(--secondary-gray) !important;
    border-color: var(--secondary-gray) !important;
}
.btn-outline-secondary:hover {
    background-color: var(--secondary-gray) !important;
    color: #ffffff !important;
}

/* outline-dark (white) */
.btn-outline-dark {
    color: #ffffff !important;
    border-color: #ffffff !important;
}
.btn-outline-dark:hover {
    background-color: #ffffff !important;
    color: var(--darkblue) !important;
}

/* ============================================================
   LINKS
   ============================================================ */
a {
    color: var(--link-light);
}
a:hover {
    color: #ffffff;
}

/* ============================================================
   BACKGROUND
   ============================================================ */
body {
    background-color: #f9fbff !important;
    color: #000 !important;
}

/* text-primary override */
.text-primary {
    color: var(--darkblue) !important;
}

/* ============================================================
   TRAKKIT LOGO — Ultra Embossed / Deep 3D Effect
   ============================================================ */
.navbar-brand h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #ffffff !important;

    text-shadow:
        0 4px 6px rgba(0,0,0,0.85),
        0 6px 10px rgba(0,0,0,0.65),
        0 -2px 2px rgba(255,255,255,0.55),
        0 -4px 3px rgba(255,255,255,0.35);
}

.navbar-brand:hover h1 {
    text-shadow:
        0 4px 6px rgba(0,0,0,0.75),
        0 6px 12px rgba(0,0,0,0.55),
        0 -2px 3px rgba(255,255,255,0.8),
        0 -4px 4px rgba(255,255,255,1),
        0 0 10px rgba(255,255,255,1),
        0 0 18px rgba(255,255,255,0.9);
    transition: 0.25s ease-in-out;
}

.navbar-brand {
    margin-right: 3rem !important;
}

/* ============================================================
   MOBILE MENU — HAMBURGER YELLOW
   ============================================================ */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23FFD700' stroke-width='3' stroke-linecap='round' d='M5 7h20M5 15h20M5 23h20'/%3E%3C/svg%3E") !important;
}

.navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

/* ============================================================
   NAVBAR SPACING + ALIGNEMENT VERTICAL
   ============================================================ */
.navbar .container-fluid {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link,
.navbar-nav .dropdown-toggle {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav > li,
.navbar-nav > a {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
}

.navbar-nav .mx-2 {
    margin-left: 1.2rem !important;
    margin-right: 1.2rem !important;
}

/* ============================================================
   TABLES: Scroll mobile + dropdown fixes
   ============================================================ */
.table-responsive img {
    width: auto;
    height: 0.9em;
    vertical-align: middle;
}

.table-responsive .dropdown-menu {
    padding: 0.5rem;
    min-width: 160px;
    z-index: 1055;
}

.table-responsive .dropdown-menu .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

.table-responsive .dropdown-menu li:not(:last-child) {
    margin-bottom: 0.25rem;
}

.table-responsive {
    overflow: visible !important;
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
    }
    .table-responsive .dropdown-menu {
        position: static !important;
    }
}

/* ============================================================
   FORMS – Uniform Bootstrap-Compatible Styling
   ============================================================ */

/* Container des formulaires */
.form-container {
    background-color: #ffffff;
    padding: 25px;
    margin-top: 20px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Ligne label + champ */
.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

/* Labels */
.form-group label {
    width: 30%;
    font-weight: bold;
    color: #000;
}

/* Inputs standard */
.form-group input,
.form-group select {
    width: 68%;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    background-color: #f7f9ff;
}

/* Champ lecture seule */
.form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Fix pour les input-group (DIRECT URL) */
.input-group-text {
    background-color: var(--darkblue);
    color: white;
    border: 1px solid var(--darkblue);
}

.input-group input {
    border-left: 0;
}

/* Mobile : vertical au lieu d’horizontal */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    .form-group label {
        width: 100%;
        margin-bottom: 6px;
    }
    .form-group input,
    .form-group select {
        width: 100%;
    }
}

/* ============================================================
   FORM GROUP FIX — aligner les input-group avec les autres champs
   ============================================================ */

/* Quand il y a .row, on overwritte pour rester cohérent */
.form-group.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Label dans un form-group.row */
.form-group.row label {
    width: 30%;
    margin-bottom: 0;
}

/* Container input Bootstrap */
.form-group.row .col-sm-9 {
    width: 68%;
    padding: 0;
}

/* Input group full-width */
.form-group.row .input-group {
    width: 100%;
}

/* Harmoniser la hauteur des input-group text avec les inputs */
.input-group-text {
    height: 100%;
    background-color: var(--darkblue);
    color: white;
    border-color: var(--darkblue);
}

/* Garder les .form-group.row alignés à gauche même sur mobile */
@media (max-width: 576px) {

  .form-group.row {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important; /* toujours aligné à gauche */
  }

  .form-group.row label {
    text-align: left !important;
    width: 100%;
  }

  .form-group.row .col-sm-9 {
    width: 100%;  /* force l'input à prendre la largeur */
    padding-left: 0;
  }

  .form-group.row .input-group {
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }

}
