/* Webee Text Resizer — widget front */

.wtr-widget {
	position: fixed;
	bottom: var(--wtr-bottom, 24px);
	right: var(--wtr-right, 24px);
	z-index: var(--wtr-z, 99999);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	/* le widget garde sa propre taille, même quand le site est agrandi */
	font-size: 14px !important;
	line-height: 1.4 !important;
}

/* ---- Bouton flottant ---- */

.wtr-toggle {
	position: relative;
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: var(--wtr-bg, #1f2937);
	color: var(--wtr-fg, #fff);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	padding: 0;
	margin: 0;
}

.wtr-toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.wtr-toggle:focus-visible,
.wtr-slider:focus-visible,
.wtr-reset:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
}

.wtr-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #16a34a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

/* ---- Panneau ---- */

.wtr-panel {
	width: 240px;
	background: #fff;
	color: #111827;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
	padding: 14px 16px;
	box-sizing: border-box;
}

.wtr-panel-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 10px;
}

.wtr-panel-title {
	font-weight: 600;
	font-size: 14px;
}

.wtr-value {
	font-variant-numeric: tabular-nums;
	font-size: 13px;
	color: #6b7280;
}

.wtr-slider-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wtr-a {
	font-weight: 700;
	color: #374151;
	user-select: none;
}

.wtr-a-small { font-size: 12px; }
.wtr-a-big   { font-size: 20px; }

/* ---- Slider ---- */

.wtr-slider {
	flex: 1;
	-webkit-appearance: none;
	appearance: none;
	height: 6px;
	border-radius: 3px;
	background: #e5e7eb;
	cursor: pointer;
	margin: 0;
}

.wtr-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wtr-bg, #1f2937);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

.wtr-slider::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--wtr-bg, #1f2937);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

/* ---- Reset ---- */

.wtr-reset {
	margin-top: 12px;
	width: 100%;
	border: 1px solid #d1d5db;
	background: #f9fafb;
	color: #374151;
	border-radius: 8px;
	padding: 7px 10px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease;
}

.wtr-reset:hover {
	background: #eef2f7;
}

/* ---- Divers ---- */

@media (max-width: 480px) {
	.wtr-panel { width: min(240px, calc(100vw - 32px)); }
}

@media (prefers-reduced-motion: reduce) {
	.wtr-toggle,
	.wtr-reset {
		transition: none;
	}
	.wtr-toggle:hover {
		transform: none;
	}
}

@media print {
	.wtr-widget { display: none !important; }
}

/* Laisser les conteneurs de texte grandir, uniquement quand le visiteur
   agrandit les textes. Les exclusions du moteur ne reçoivent pas ces classes. */
html.wtr-active .wtr-flow {
  height: auto !important;
  max-height: none !important;
  min-width: 0 !important;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: normal;
}
html.wtr-large .wtr-row {
  flex-wrap: wrap !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
html.wtr-large .wtr-row > .wtr-column {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 24px !important;
}
#wtr-widget .wtr-panel {
  max-width: calc(100vw - 24px);
  max-height: max(100px, calc(100dvh - var(--wtr-bottom, 24px) - 80px));
  overflow-y: auto;
}
#wtr-widget .wtr-slider { min-width: 0; }
#wtr-widget .wtr-panel-head { flex-wrap: wrap; gap: 8px; }
