/* @override 
	https://elmesi.addtocart.fr/assets/style.css */

:root {
	--bg-top: #a164a0;
	--bg-bottom: #c89ac3;
	--text-main: #1f2937;
	--card-bg: #ffffff;
	--badge-grey: #e5e7eb;
	--badge-text: #1f2937;
	--badge-yellow: #fef3c7;
	--badge-yellow-text: #92400e;
	--badge-red: #fee2e2;
	--badge-red-text: #991b1b;
	--circle-bg: #1f2937;
	--font: 'Segoe UI', sans-serif;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font);
	background-color: #a74f8e;
	background-attachment: fixed;
	color: var(--text-main);
	min-height: 100vh;
	padding-bottom: 5rem;
}

a {
	color: #a74f8e;
	text-decoration: none;
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 0;
}

.header .left, .header .center, .header .right {
	min-width: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.logo {
	width: 120px;
	height: 40px;
	background: url('../img/logo.svg') center center no-repeat;
	text-indent: -9999px;
}

.header .btn {
	background: #1f2937;
	border-radius: 9999px;
	padding: 0.5rem;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.select-wrapper {
	position: relative;
	width: 100%;
	margin: 1rem 0;
}

.card {
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid white;
	border-radius: 1.5rem;
	padding: 1rem;
	margin: 0 0 1rem;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	transition: all 0.2s ease-in-out;
}

.card.inactive {
	background: #d68eb3;
	border: 1px solid #d68eb3;
}

.line-top, .line-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.fullname {
	font-size: 1.25rem;
	font-weight: 600;
}

.left-block {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.arrows {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	align-items: center;
	font-size: 1rem;
	color: #777;
	line-height: 1;
}

.order {
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: #1f2937;
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

.left-block .order{
	min-width: 2rem;
	min-height: 2rem;
}

.name-line {
	font-weight: bold;
	color: #1f2937 !important;
}

.horaire-line {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	color: var(--badge-text);
	white-space: nowrap;
	flex-shrink: 0;
}

.icon-clock {
	width: 1rem;
	height: 1rem;
	display: inline-block;
	vertical-align: middle;
}

.badge {
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	font-size: 0.9rem;
}

.badge-grey {
	background: #a74f8e;
	color: #ffffff;
}

.badge-yellow {
	background: #fef3c7;
	color: #92400e;
}

.badge-red {
	background: #e45665;
	color: #fff4f6;
}

.badge-orange {
	background: #f4a261;
	color: #ffffff;
}

.action-buttons {
	margin-left: auto;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.btn {
	background: #1f2937;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.btn-orange {
	background: #f4a261!important;
	color: white;
}

.btn-green {
	background-color: #4ade80!important;
}

.btn-red {
	background-color: #f87171!important;
}

.btn-blue {
	background-color: #60a5fa!important;
}

.btn-yellow {
	background-color: #facc15!important;
}


.footer-scroll {
  display: flex;
  flex-direction: column; /* empile les éléments verticalement */
  align-items: center;
  padding: 0 1rem;
  margin-top: 3rem;
  gap: 0.5rem;
  text-align: center;
}

.footer-scroll .footer-buttons {
  display: flex;
  gap: 1rem; /* espace entre les deux boutons */
}

.footer-scroll .app-version {
  font-size: 0.75rem;
	color:  rgba(214, 142, 179, 0.6);
  margin-top: 1.5rem;
}

.btn-arrow {
	width: 2rem;
	height: 2rem;
	background: #a74f8e;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin: 0;
}

.btn-primary {
	color: white;
	background: #1f2937;
	border: none;
	border-radius: 999px;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	width: fit-content;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	text-align: center;
}

.btn-disabled {
	background-color: #d1d5db;
	pointer-events: none;
	opacity: 0.4;
}

.action-line {
	display: flex;
	gap: 1rem;
	margin: 1.5rem 0;
}

.bottom-action-line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 1.5rem 0;
}

.bottom-action-line .btn {
	width: 2.5rem;
	height: 2.5rem;
}

.bottom-action-line .btn img {
	width: 1.25rem;
	height: 1.25rem;
}

.btn-logout {
	background: #d23b57;
}

.icon-circle {
	background: var(--circle-bg);
	border-radius: 9999px;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.info-block {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
	align-items: flex-start;
}

.info-block input{
}

.info-block > div:last-child {
	flex: 1;
}

.subtitle {
	height: 1.5rem;
	line-height: 1.5rem;
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 0.5rem;
}

.icon-info {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.icon-info img {
	width: 1.5rem;
	height: 1.5rem;
	display: block;
}

#lastMod {
	text-align: center;
	font-size: 0.85rem;
	color: #FFFFFF;
	margin-top: 2rem;
}

/* ============================= */

.container {
	max-width: 800px;
	margin: 1.5rem auto;
	padding: 0 1rem;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group > label {
	display: block;
	margin-bottom: .5rem;
	font-weight: 600;
}

input,

select,

textarea {
  font-size: 16px;
}

.input {
	width: 100%;
	padding: .75rem;
	border: 1px solid #ccc;
	border-radius: 1.5rem;
	transition: border-color .2s, box-shadow .2s;
	margin-bottom: 1rem;
}

.input:focus {
	border-color: var(--bg-top);
	outline: none;
	box-shadow: 0 0 0 3px rgba(161,100,160,.2);
}

textarea.input {
 min-height: 6rem;	
 }

select.input:focus {
  outline: none;
  background-color: rgba(214, 142, 179, 0.75);
}

select.input {
  background-image: url('../img/arrow-select.svg');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem 1rem;
  padding-right: 2.5rem;
}


.form-check-label {
	display: block;
	margin-bottom: 0.25rem;
}

.sub-card {
	background-color:#FFFFFF;
	border: 1px solid #CCCCCC;
	margin-bottom: 1rem;
	position: relative;
	padding: 1rem 4rem 1rem 1rem;
	border-radius: 1rem;
}

.sub-card .btn-remove {
	position: absolute;
	top: .5rem;
	right: .5rem;
}

.sub-card .input {
	
	margin-bottom: .5rem;
	position: relative;
}

.sub-card .btn {
	position: absolute;
	right: 1rem;
	top: 1rem;
	
}

.btn-add {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	padding: .5rem 1rem;
	background: var(--bg-top);
	color: #fff;
	border: none;
	border-radius: .375rem;
	cursor: pointer;
	transition: transform .2s, background .2s;
}

.btn-add:hover {
	transform: scale(1.05);
	background: #8f4f95;
}

.btn-remove {
	background: none;
	border: none;
	padding: .25rem;
	cursor: pointer;
}

.btn-remove .icon {
	width: 1rem;
	height: 1rem;
}

/* ========== SELECT CUSTOMISE ========== */

.select-wrapper select::-ms-expand {
	display: none;
}

.select-wrapper select:focus {
	background: rgba(214, 142, 179, 0.6);
	color: white;
}

.user-card .line-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.user-card input.input,

.user-card select.input {
  flex: 0 0 auto;
}

.user-card .left-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tab-button {
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
background-color: rgba(214, 142, 179, 0.6); 
	color: #a74f8e;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.tab-button.active {
  background-color: #FFFFFF;
  color: #a74f8e;
}

.user-card .input {
  margin-bottom: 0;
}

.list-card .input {
  margin-bottom: 0;
}

.user-card .input[type='text'],

.user-card .input[type='password'] {
  flex: 1;
}

.user-card .action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-card .line-top {
  flex-wrap: nowrap;
  flex-shrink: 0;
  overflow-x: auto;
}

.user-card .select-wrapper {
  position: relative;
  flex: 0 0 auto;
}

.user-card .line-top .action-buttons {
  flex: 0 0 auto;
}

.user-card .line-top {
  overflow-x: auto;
}

.left-block .btn-arrow {
  flex: 0 0 auto;
  min-width: 2rem;
  min-height: 2rem;
}

/* ===== CONFIGURATION ===== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tabs .btn {
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.export-form{
		text-align: center;
}

.export-form > div {
  color: #FFFFFF;
  justify-content: center;
  margin: 1.5rem 0!important;
}

.export-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid white;
  border-radius: 50%; /* forme ronde */
  background-color: transparent; /* pas de fond */
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: border-color 0.2s;
}

/* Quand cochée : toujours sans fond, mais avec icône blanche */
.export-form input[type="checkbox"]:checked {
  background-color: transparent;
  border-color: white;
}

.export-form input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  background-image: url('../img/check.svg');
  background-size: contain;
  background-repeat: no-repeat;
  transform: translate(-50%, -50%);
  filter: brightness(0) invert(1); /* transforme l'icône en blanc */
  pointer-events: none;
}

/* Effet au survol (léger éclaircissement du bord) */
.export-form input[type="checkbox"]:hover {
  border-color: #ffffffcc;
}

/* ===== CONFIGURATION : dropdown accès utilisateurs ===== */
.access-dropdown {
  position: relative;
  display: inline-block;
  min-width: 180px;
}

.access-dropdown details {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  user-select: none;
}

.access-dropdown summary {
  list-style: none;
  outline: none;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.access-dropdown summary::-webkit-details-marker { 
  display: none; 
}

.access-panel {
  margin-top: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  white-space: nowrap;
}

.access-count {
  font-size: 12px;
  color: #666;
}

/* ===== LISTE ===== */
.header .btn img {
	width: 1.25rem;
	height: 1.25rem;
	filter: brightness(0) invert(1);
}

.search-wrapper {
	position: relative;
	width: 100%;
	margin: 1rem 0;
}

.search-wrapper input.input {
	width: 100%;
	background: rgba(214, 142, 179, 0.6) !important;
	border: none;
	border-radius: 1.5rem;
	padding: 0.75rem 1rem 0.75rem 2.5rem;
	font-size: 1rem;
	color: white;
	outline: none;
	backdrop-filter: blur(6px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.search-wrapper input.input::placeholder {
	color: #e8d3e1;
	opacity: 0.8;
}

.search-wrapper input.input:focus {
	background: rgba(214, 142, 179, 0.6);
	color: white;
}

.search-wrapper .search-icon {
	position: absolute;
	top: .75rem;
	left: 1rem;
	width: 1.2rem;
	height: 1.2rem;
	filter: brightness(0) invert(1);
}

.badge-grey img {
	filter: brightness(0) invert(1);
}

.icon-tags img {
	width: 1rem;
	height: 1rem;
	filter: brightness(0) invert(1);
	margin-left: 0.25rem;
}

.btn img {
	width: 1rem;
	height: 1rem;
	filter: brightness(0) invert(1);
}

.btn-arrow img {
	width: 1.rem;
	height: 1rem;
	display: block;
	filter: brightness(0) invert(1);
}

.footer-scroll .btn-logout img.icon {
	width: 1.25rem;
	height: 1.25rem;
	display: inline-block;
	vertical-align: middle;
	filter: brightness(0) invert(1);
}

.btn-primary img {
	width: 1.5rem;
	height: 1.5rem;
	display: inline-block;
	vertical-align: middle;
	filter: brightness(0) invert(1);
	margin-right: 0.25rem;
}

select.input {
  appearance: none;
  color: #000000;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  backdrop-filter: blur(6px);
  width: auto;
  border-radius: 1.5rem;
}

.select-wrapper select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	background-color: rgba(214, 142, 179, 0.6);
	padding: 0.75rem 2.5rem 0.75rem 1rem;
	font-size: 1rem;
	color: white;
	border: 1px solid white;
	border-radius: 1.5rem;
	outline: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
	backdrop-filter: blur(6px);
	cursor: pointer;
}

.select-wrapper::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	background-image: url('../img/arrow-select.svg');
	background-size: contain;
	background-repeat: no-repeat;
	pointer-events: none;
	filter: brightness(0) invert(1);
}

/* --- Mode réduit pour les patients pointés (lecture) --- */

.card.reduit {
	border: 1px solid white;
	border-radius: 1.5rem;
	padding: 1rem;
  transition: all .18s ease-in-out;
}

.card.reduit .line-bottom,
.card.reduit .tags-line,
.card.reduit .action-buttons {
  display: none !important;
}

.card.pointe .order {
	background-color: #facc15;
}

.card .order img {
	filter: brightness(0) invert(1);
}

/* ===== LOGIN ===== */
.container .login-form {
	text-align: center;
	max-width: 400px;
	margin: 0 auto;
}

.login-form .input {
	margin: 0;
}

.login-form .btn-primary {
	margin-top: 1.5rem;
}

/* ===== PATIENT ===== */
.card.patient {
	padding: 1.5rem 1.5rem 0;
}

.tags, .tags-line {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.5rem;
}

#tagList {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1rem;
	gap: 0.5rem;
}

#tagList button {
	all: unset;
	cursor: pointer;
}

.icon-tags button {
	display: inline-flex;
	width: 1rem;
	height: 1rem;
	margin-left: 0.25rem;
}

.card.patient .btn{
	width: 3rem;
	height: 3rem;
}

.card.patient .btn img{
	width: 1.75rem;
	height: 1.75rem;
}

.btn-phone {
	background: #25d366;
	color: white;
}

.btn-maps {
	background: #ea4335;
	color: white;
}

.btn-waze {
	background: #05c8f7;
	color: white;
}

