html {
  position: relative;
  height: 100%;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ===================== Design tokens (Phase 1) ===================== */
:root {
  --rk-color-bg: #ffffff;
  --rk-color-bg-alt: #f5f7fa;
  --rk-color-surface: #ffffff;
  --rk-color-border: #e2e6ea;
  --rk-color-border-alt: #d9dde1;
  --rk-color-primary: #0d6efd;
  --rk-color-accent: #ff5a6e;
  --rk-color-info: #1266f1;
  --rk-color-danger: #d9534f;
  --rk-color-warning: #ffc107;
  --rk-color-success: #198754;
  --rk-color-muted: #6c757d;
  --rk-color-soft: #f0f2f5;
  --rk-color-soft-accent: #ffe6ef;
  --rk-font-size-xs: .75rem;
  --rk-font-size-sm: .84rem;
  --rk-font-size-base: 1rem;
  --rk-font-size-lg: 1.25rem;
  --rk-font-weight-medium: 500;
  --rk-radius-sm: 4px;
  --rk-radius-md: 8px;
  --rk-radius-lg: 16px;
  --rk-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --rk-shadow-md: 0 2px 6px rgba(0,0,0,.10);
  --rk-space-1: 4px;
  --rk-space-2: 8px;
  --rk-space-3: 12px;
  --rk-space-4: 16px;
  --rk-space-5: 20px;
  --rk-space-6: 24px;
}

/* Action button semantic helpers */
.btn-create { background: var(--rk-color-primary); color:#fff; border-color: var(--rk-color-primary); }
.btn-create:hover { background:#0b5ed7; color:#fff; }
.btn-update { background: var(--rk-color-warning); color:#000; border-color: var(--rk-color-warning); }
.btn-update:hover { background:#e0ac07; color:#000; }
.btn-delete { background: var(--rk-color-danger); color:#fff; border-color: var(--rk-color-danger); }
.btn-delete:hover { background:#c14440; color:#fff; }
/* Outline legacy conversions (if some remain) */
.btn-outline-primary.btn-create,
.btn-outline-primary.btn-update,
.btn-outline-danger.btn-delete {
  /* unify to filled style visually */
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

/* Global layout adjustments */
body {
  margin-bottom: 30px;
  background: var(--rk-color-bg-alt);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

main {
  flex:1 0 auto;
}

footer {
  flex-shrink:0;
  position:static;
  height:auto;
}

/* Header gradient update */
.header {
  background-image: linear-gradient(180deg, var(--rk-color-bg-alt), var(--rk-color-bg) 120px);
}

/* Container width enhancement */
@media (min-width: 1200px) {
  .container {
    max-width: 1040px;
  }
}

/* Footer modernisation */
.footer {
  background: var(--rk-color-bg-alt);
  border-top:1px solid var(--rk-color-border);
  line-height:1.4;
  position:static;
  height:auto;
}

/* Menu title accent */
.menu-title {
  color: var(--rk-color-accent);
  font-weight: var(--rk-font-weight-medium);
}

/* Log box refinement */
.log {
  padding: var(--rk-space-3) var(--rk-space-4);
  border-radius: var(--rk-radius-sm);
  box-shadow: var(--rk-shadow-sm);
  border-left:6px solid currentcolor;
}

/* Membership warning unify */
.membership-warning {
  background: var(--rk-color-soft-accent);
  border-radius: var(--rk-radius-sm);
  font-weight: var(--rk-font-weight-medium);
}

/* Trombinoscope photo unify */
.trombi-photo, .trombi-photo.placeholder {
  border-radius: var(--rk-radius-md);
  background: var(--rk-color-soft);
  border:1px solid var(--rk-color-border);
}

/* Generic components */
.rk-card {
  background: var(--rk-color-surface);
  border:1px solid var(--rk-color-border);
  border-radius: var(--rk-radius-md);
  padding:var(--rk-space-4);
  box-shadow: var(--rk-shadow-sm);
}

.rk-card--tight {
  padding: var(--rk-space-2) var(--rk-space-3);
}

.rk-section-title {
  font-size: var(--rk-font-size-lg);
  font-weight: var(--rk-font-weight-medium);
  margin-bottom: var(--rk-space-3);
}

/* Typographic hierarchy */
h1, .rk-h1 {
  font-size:1.9rem;
  font-weight:600;
  margin:0 0 var(--rk-space-4);
}

h2, .rk-h2 {
  font-size:1.5rem;
  font-weight:600;
  margin:var(--rk-space-5) 0 var(--rk-space-3);
}

h3, .rk-h3 {
  font-size:1.25rem;
  font-weight:600;
  margin:var(--rk-space-4) 0 var(--rk-space-2);
}

h4, .rk-h4 {
  font-size:1.1rem;
  font-weight:600;
  margin:var(--rk-space-3) 0 var(--rk-space-2);
}

small, .small {
  font-size: var(--rk-font-size-sm);
}

nav a.link-primary, nav a.link-secondary {
  font-weight: var(--rk-font-weight-medium);
}

#notif_button .badge {
  transition: transform .15s ease;
}

#notif_button .badge:not(.collapse) {
  transform: scale(1);
}

.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}

.form-signin .checkbox {
  font-weight: 400;
}

.form-signin .form-floating:focus-within {
  z-index: 2;
}

.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.header {
  background-image: linear-gradient(180deg, #eee, #fff 100px, #fff);
}

.container {
  max-width: 960px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30px; /* Set the fixed height of the footer here */
  line-height: 30px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

.dropdown-category .dropdown-item {
  width: 440px;
}

.dropdown-category li {
  clear: both;
  color: rgba(0, 0, 0, 0.87);
  cursor: pointer;
  min-height: 50px;
  line-height: 1.5rem;
  min-width: 200px;
  text-align: left;
  text-transform: none;
}

.dropdown-category {
  width: 500px;
}

.dropdown-category li > a {
    font-size: 16px;
    color: #26a69a;
    display: block;
    line-height: 22px;
    padding: 14px 16px;
}


label.bg-secondary, span.bg-secondary {
  color: white;
}

/* Brand dropdown: pousser le caret complètement à droite */
#brandDropdownBtn {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding-right: .85rem; /* compense l'icône caret */
}
#brandDropdownBtn .brand-current { flex:1 1 auto; }

.repairstatus .card-header, .age .card-header {
  color:  white;
}

.card-body-textarea {
  padding: 0px;
}

.form-check-inline-wmarg {
  margin-right: 6px;
}
.card-body-wmarg {
  padding-top: 14px;
  padding-bottom: 0px;
}

.input-group-wmarg {
  margin-top:  1rem;
}

.card-header-wmarg {
  padding-top: 6px;
  padding-bottom: 6px;
}

.idbox {
  position:  absolute;
  z-index: 100;
  top: 8px;
  right:  8px;
  width:  200px;
  height: 16px;
}

.input-group > span, .card-header {
  font-weight: bold;
}

.card-no-padding {
  padding: 0px;
}

.card-no-padding .form-control {
  border-radius: 0px;
}

.log {
    background-color: #e1ecfd;
    border-color: #1266f1;
    padding: 10px;
    border-left: 6px solid;
    border-left-color: currentcolor;
    border-radius: 5px;
}

#closeStatus {
  font-weight: bold;
}

.img-wrapper {
  position: relative;
}

.img-responsive {
  width: 100%;
  height: auto;
}

.img-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  text-align: right;
  margin: 10px;
}

.img-overlay-badge {
  position: absolute;
  top: -14px;
  left: -8px;
}

.dropdown-notif {
    display:inline-block;
    margin-left:20px;
    padding:10px;
}

.notifications {
   min-width:420px;
}

#notifications-wrapper {
  overflow:auto;
  max-height:250px;
}

.menu-title {
  color:#ff7788;
  font-size:1rem;
  display:inline-block;
}

.notification-heading, .notification-footer  {
  padding:2px 10px;
}

.dropdown-menu .divider {
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}

.item-title {
 font-size:1rem;
 color:#000;
}

.notifications a.content {
  text-decoration:none;
  background:#ccc;
}

.notification-item {
  padding:5px;
  margin:5px;
  background:#ccc;
  border-radius:4px;
}

.form-floating > label {
    padding: 1rem 1.5rem;
}

.right-container {
  display: none;
}
.left-container {
  height: 100%;
}
.left-container .content {
  width:  360px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  margin: auto;
}
@media(min-width: 992px) {
  .left-container { margin: 0;max-width: 100%; width: 40%; }
  .left-container .content { left: 25%; }
  .right-container { position: fixed; top: 0; right: 0; width: 60%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; pointer-events: none; z-index: 0; background:#fff; }
  .right-container:after { content: ""; display: -webkit-box; display: -ms-flexbox; display: flex; background: #fff url(/static/img/rco-low.jpg) center 80% no-repeat; width: 100%; height: 100%; background-size: contain; }
}

/* Assure que le footer passe au-dessus de l'image décorative du login et reste cliquable */
footer { position: relative; z-index: 5; }

.label {
  font-size: 40px;
  text-anchor: middle;
  vertical-align: center;
}

/* Indication visuelle des champs obligatoires */
.required-indicator::after {
  content: ' *';
  color: #d9534f; /* bootstrap danger */
  font-weight: normal;
}
.form-control[required], .form-select[required] {
  box-shadow: none;
}
.form-control[required].is-invalid, .form-select[required].is-invalid {
  border-color: #dc3545;
}
/* accent léger */
.required-highlight {
  border-left: 3px solid #d9534f;
  padding-left: .5rem;
}

/* Alerte cotisation (rose) */
.membership-warning {
  background: #ffe6ef;
  border: 1px solid #ff9bb8;
  color: #b30042;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 500;
}

/* Table réparateurs compacte */
.user-table thead th { font-size: .8rem; }
.user-table tbody td { font-size: .82rem; padding: .35rem .5rem; }
.user-table input { font-size: .7rem; }
@media (max-width: 700px) {
  .user-table thead .filters input { max-width: 70px; }
  .user-table td:nth-child(2),
  .user-table td:nth-child(3) { word-break: break-word; }
}

/* ---- Trombinoscope ---- */
.trombi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem;
}
.trombi-item { text-align: center; }
.trombi-photo-wrapper { width: 120px; height: 120px; margin: 0 auto; }
.trombi-photo, .trombi-photo.placeholder {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  font-weight: 600;
  color: #888;
  border: 1px solid #ddd;
}
.trombi-role { letter-spacing: .5px; }
.trombi-name { font-weight: 500; }
@media (max-width: 600px) {
  .trombi-photo-wrapper { width: 90px; height: 90px; }
  .trombi-photo, .trombi-photo.placeholder { width: 90px; height: 90px; font-size: 34px; }
  .trombi-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
.trombi-item.open { position: relative; }
.trombi-item .trombi-bio { font-size: .85rem; text-align: left; line-height:1.25rem; }
@media (max-width: 575.98px) {
  .trombi-item .trombi-bio { margin-top: .4rem; background:#fff; border:1px solid #e2e2e2; padding:.5rem .6rem; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,.08); }
}
