/* ============================================================
   FI-Motors — theme moderne (habillage) inspire des applis
   fimotorsatelier / fimotorsgestion : noir / blanc / rouge,
   cartes epurees, boutons pilule.
   Ce fichier est charge en dernier : il surcharge styles_v1.css
   sans le modifier.
   ============================================================ */

:root {
  --fim-red: #E30613;
  --fim-red-dark: #b8050f;
  --fim-black: #141414;
}

/* ---------- Bandeau + menu : noir uni, l'accent rouge suffit ---------- */
.main-header {
  background: #000 !important;
  background: linear-gradient(to right, #000 1%, #2b2b2b 51%, #000 100%) !important;
}

.main-header .logo {
  background: transparent !important;
  font-weight: 700;
}

.main-header .navbar {
  background: transparent !important;
}

/* ---------- Titre de page : plus sobre, puce rouge ---------- */
.content-header {
  padding: 18px 15px 8px 15px;
}

.content-header > h1 {
  font-weight: 700;
  font-size: 21px;
}

.content-header > h1::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fim-red);
  margin-right: 8px;
  vertical-align: middle;
}

/* ---------- Cartes : coins arrondis, bordure fine, pas d'ombre lourde ---------- */
.box {
  border-radius: 14px;
  border-top: none !important;
  border: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.box > .box-header {
  border-radius: 0;
}

/* ---------- Boutons : forme pilule, rouge de marque en primaire ---------- */
.btn {
  border-radius: 50px;
  font-weight: 600;
  box-shadow: none;
}

.btn-primary {
  background-color: var(--fim-red);
  border-color: var(--fim-red);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.hover,
.btn-primary:focus {
  background-color: var(--fim-red-dark);
  border-color: var(--fim-red-dark);
}

.btn-danger {
  background-color: var(--fim-red);
  border-color: var(--fim-red);
}

.btn-danger:hover,
.btn-danger:active {
  background-color: var(--fim-red-dark);
  border-color: var(--fim-red-dark);
}

.btn-nav-odr {
  border-radius: 10px;
}

/* ---------- Champs de formulaire : plus arrondis ---------- */
.form-control {
  border-radius: 8px;
}

/* ---------- Badges / labels : forme pilule ---------- */
.label,
.badge {
  border-radius: 50px;
}

/* ---------- Cartes de liste type "tache" (accueil, demandes web) ---------- */
.fim-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.fim-card .fim-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.fim-dot-red { background: var(--fim-red); }
.fim-dot-gray { background: #bbb; }
.fim-dot-green { background: #00a65a; }
.fim-dot-orange { background: #f39c12; }

.fim-card .fim-title {
  font-weight: 700;
}

.fim-card .fim-meta {
  font-size: 10pt;
  color: #888;
  margin-top: 2px;
}


/* ---------- Planning ODR (spv_encours.php) ---------- */
.fim-btn-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--fim-red);
	color: #fff !important;
	font-size: 15px;
	box-shadow: 0 2px 6px rgba(227, 6, 19, .35);
	transition: transform .15s ease, background .15s ease;
	float: right;
	margin-top: 8px;
}
.fim-btn-add:hover {
	background: var(--fim-red-dark);
	transform: scale(1.06);
	text-decoration: none;
}

.fim-search-wrap {
	position: relative;
	max-width: 420px;
	margin: 0 0 20px;
}
.fim-search-wrap i {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #aaa;
	font-size: 13px;
}
.fim-search-input {
	width: 100%;
	padding: 9px 12px 9px 34px;
	border: 1px solid #e2e2e2;
	border-radius: 20px;
	font-size: 13px;
	background: #fff;
	outline: none;
	transition: border-color .15s ease;
	box-sizing: border-box;
}
.fim-search-input:focus {
	border-color: var(--fim-red);
}

.fim-section {
	margin-bottom: 22px;
}
.fim-section-title {
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: .5px;
	font-weight: 700;
	margin: 0 0 10px;
	color: #444;
}
.fim-section-title-urgent {
	color: var(--fim-red);
}

.fim-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 10px;
}

.fim-card-link {
	display: block;
	text-decoration: none !important;
	color: inherit;
}
.fim-card-link:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
	text-decoration: none;
	color: inherit;
}
.fim-card-urgent {
	background: #fdeceb;
	border-color: #f5b7b1;
}

.fim-daytabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin-bottom: 18px;
	padding-bottom: 4px;
}
.fim-daytab {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 8px 14px;
	border-radius: 12px;
	border: 1px solid #e2e2e2;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
	color: #444;
	position: relative;
}
.fim-daytab-name {
	text-transform: uppercase;
	font-size: 10px;
	color: #999;
}
.fim-daytab-num {
	font-size: 16px;
	font-weight: 700;
}
.fim-daytab-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: var(--fim-red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	min-width: 16px;
	height: 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
}
.fim-daytab.active {
	background: var(--fim-black);
	border-color: var(--fim-black);
	color: #fff;
}
.fim-daytab.active .fim-daytab-name {
	color: #ccc;
}

.fim-daygroup-title {
	font-size: 13px;
	font-weight: 700;
	color: #666;
	margin: 4px 0 8px;
}
.fim-daygroup {
	margin-bottom: 20px;
}

.fim-badge {
	display: inline-block;
	font-size: 10.5px;
	padding: 2px 8px;
	border-radius: 10px;
	background: #f1f1f1;
	color: #555;
}
.fim-badge-urgent {
	background: var(--fim-red);
	color: #fff;
}

.fim-progress {
	height: 4px;
	border-radius: 2px;
	background: #eee;
	margin-top: 8px;
	overflow: hidden;
}
.fim-progress-bar {
	height: 100%;
	background: var(--fim-red);
}
.fim-progress-label {
	font-size: 10.5px;
	color: #999;
	text-align: right;
	margin-top: 3px;
}


/* ---------- Onglets En cours / Archivés / Tâches (spv_encours, spv_archives, spv_taches) ---------- */
.fim-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 4px 0 14px;
  border-bottom: 1px solid #eee;
  padding-bottom: 0;
}
.fim-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px;
  font-weight: 600;
  font-size: 13.5px;
  color: #888;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.fim-tab:hover {
  color: var(--fim-black);
  text-decoration: none;
}
.fim-tab.active {
  color: var(--fim-black);
  border-bottom-color: var(--fim-red);
}
.fim-tab-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--fim-red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  line-height: 18px;
}

/* ---------- Accueil (index1.php) : bandeau planning ODR + section clients ---------- */
.fim-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.fim-section-header .fim-section-title {
  margin: 0;
}
.fim-count-pill {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  padding: 1px 7px;
  border-radius: 9px;
  background: #eee;
  color: #555;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}
.fim-btn-voir-tout {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fim-red);
  text-decoration: none;
  white-space: nowrap;
}
.fim-btn-voir-tout:hover {
  color: var(--fim-red-dark);
  text-decoration: underline;
}
.fim-card-grid-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.fim-card-grid-row .fim-card {
  flex: 0 0 auto;
  width: 230px;
  margin-bottom: 0;
}
