/* ==========================================================================
   Back-office Rail Express — identité visuelle (bleu #003087, jaune #F5C400)
   ========================================================================== */
:root {
  --re-blue: #003087;
  --re-blue-dark: #001F5B;
  --re-yellow: #F5C400;
  --re-bg: #F4F6FA;
  --bs-primary: #003087;
  --bs-primary-rgb: 0, 48, 135;
  --bs-link-color: #003087;
  --bs-link-color-rgb: 0, 48, 135;
  --bs-link-hover-color: #001F5B;
}
body { background: var(--re-bg); font-size: .95rem; }
.re-ar { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif; font-size: 1.02rem; }

/* Boutons */
.btn-re { background: var(--re-blue); border-color: var(--re-blue); color: #fff; }
.btn-re:hover, .btn-re:focus { background: var(--re-blue-dark); border-color: var(--re-blue-dark); color: #fff; }
.btn-outline-primary { --bs-btn-color: var(--re-blue); --bs-btn-border-color: var(--re-blue); --bs-btn-hover-bg: var(--re-blue); --bs-btn-hover-border-color: var(--re-blue); --bs-btn-active-bg: var(--re-blue-dark); }
.nav-pills.re-tabs .nav-link { color: #4b5563; }
.nav-pills.re-tabs .nav-link.active { background: var(--re-blue); color: #fff; }
.page-link { color: var(--re-blue); }
.page-item.active .page-link { background: var(--re-blue); border-color: var(--re-blue); }
.form-check-input:checked { background-color: var(--re-blue); border-color: var(--re-blue); }

/* Structure */
.re-shell { display: flex; min-height: 100vh; }
.re-sidebar { width: 250px; background: var(--re-blue-dark) !important; color: #fff; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .re-sidebar { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
}
@media (max-width: 991.98px) {
  .re-sidebar.offcanvas-lg { background: var(--re-blue-dark); }
}
.re-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1rem; border-bottom: 3px solid var(--re-yellow); }
.re-logo { width: 42px; height: 42px; object-fit: contain; }
.re-brand-name { font-weight: 700; letter-spacing: .5px; }
.re-brand-sub { font-size: .75rem; color: var(--re-yellow); text-transform: uppercase; letter-spacing: 1.5px; }
.re-nav { padding: .75rem .5rem; flex: 1; overflow-y: auto; }
.re-nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .85rem; color: rgba(255,255,255,.75); text-decoration: none; border-radius: 8px; margin-bottom: 2px; }
.re-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.re-nav-link.active { background: var(--re-yellow); color: var(--re-blue-dark); font-weight: 600; }
.re-nav-link .bi { font-size: 1.1rem; }
.re-badge { background: #dc3545; }
.re-sidebar-foot { padding: .5rem; border-top: 1px solid rgba(255,255,255,.1); }
.re-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.re-topbar { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.5rem; background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10; }
.re-page-title { font-size: 1.2rem; margin: 0; font-weight: 600; color: var(--re-blue-dark); }
.re-content { padding: 1.5rem; }
@media (max-width: 575.98px) { .re-content { padding: 1rem .75rem; } .re-topbar { padding: .7rem .75rem; } }
.card { border-color: #e5e7eb; }

/* Tableau de bord */
.re-stat { border: 0; border-left: 4px solid var(--re-blue); color: inherit; transition: transform .1s; }
.re-stat:hover { transform: translateY(-2px); }
.re-stat-yellow { border-left-color: var(--re-yellow); }
.re-stat-grey { border-left-color: #9ca3af; }
.re-stat-icon { font-size: 1.8rem; color: var(--re-blue); }
.re-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--re-blue-dark); }
.re-stat-label { font-size: .8rem; color: #6b7280; }
.re-maxw { max-width: 320px; }

/* Listes et images */
.re-col-thumb { width: 80px; }
.re-col-order { width: 100px; }
.re-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; display: inline-flex; }
.re-thumb-empty { background: #e5e7eb; color: #9ca3af; align-items: center; justify-content: center; display: flex; }
.re-thumb-lg { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; }
.re-preview-img { max-width: 100%; max-height: 180px; border-radius: 8px; border: 1px solid #e5e7eb; }
.re-logo-thumb { max-width: 90px; max-height: 50px; object-fit: contain; }
.re-logo-lg { max-width: 180px; max-height: 100px; }
.re-gallery-item { position: relative; }
.re-gallery-del { position: absolute; top: 4px; right: 4px; padding: 0 .3rem; line-height: 1.2; }
.re-search { max-width: 460px; }
.re-form-narrow { max-width: 720px; }
.re-message-body { white-space: normal; background: #f9fafb; border-radius: 8px; padding: 1rem; }
.re-actions-bar { position: sticky; bottom: 0; background: rgba(244,246,250,.95); padding: .75rem 0; display: flex; flex-wrap: wrap; gap: .5rem; border-top: 1px solid #e5e7eb; }

/* Page de connexion */
.re-guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--re-blue) 0%, var(--re-blue-dark) 100%); padding: 1rem; }
.re-guest-box { width: 100%; max-width: 400px; }
.re-guest-logo { width: 80px; height: 80px; object-fit: contain; }
.re-guest-title { color: #fff; margin-top: .75rem; font-weight: 600; letter-spacing: .5px; }
.re-guest-box > p.text-muted { color: rgba(255,255,255,.7) !important; }

/* Prévisualisation (reprend le style du site public) */
.re-preview-body { background: #F7F8FA; }
.re-preview-banner { background: var(--re-yellow); color: var(--re-blue-dark); text-align: center; padding: .5rem; font-weight: 600; font-size: .9rem; }
.re-site-hero { background: linear-gradient(135deg, #003087 0%, #001F5B 100%); color: #fff; padding: 2.5rem 0; }
.re-site-label { color: var(--re-yellow); font-weight: 700; letter-spacing: 3px; font-size: .8rem; }
.re-site-title { font-weight: 800; font-size: 2rem; margin: .25rem 0 0; }
.re-site-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.re-site-card-img { width: 100%; height: 230px; object-fit: cover; display: flex; font-size: 2rem; }
.re-site-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.re-site-meta { display: flex; gap: .75rem; align-items: center; font-size: .8rem; color: #6b7280; margin-bottom: .6rem; }
.re-site-cat { background: rgba(0,48,135,.08); color: var(--re-blue); font-weight: 700; padding: .15rem .6rem; border-radius: 20px; }
.re-site-card-title { font-size: 1.2rem; font-weight: 700; color: #1B1B1B; }
.re-site-card-text { color: #4b5563; line-height: 1.7; margin: 0; }
[dir="rtl"] .re-site-card-text, [dir="rtl"] .re-site-card-title { font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif; }
