/* =============================================================================
   EuroCave Horaires — Frontend CSS
   ============================================================================= */

/* --------------------------------------------------------------------------
   Widget principal
   -------------------------------------------------------------------------- */

.ech-widget-container {
	display: block;
}

.ech-widget {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 15px;
	min-width: 280px;
	width: auto;
	transition: all 0.3s ease;
}

.ech-widget.expanded {
	background: #fff;
	padding: 14px 16px;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Ligne de statut (en-tête cliquable)
   -------------------------------------------------------------------------- */

.ech-widget-etat {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	margin-bottom: 0;
	transition: margin 0.3s;
}

.ech-widget.expanded .ech-widget-etat {
	margin-bottom: 10px;
}

.ech-widget-left {
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	flex-shrink: 0;
}

.ech-widget-statut {
	font-weight: 700;
	font-size: 15px;
}

.ech-widget-statut.ouvert  { color: #16a34a; }
.ech-widget-statut.ferme   { color: #dc2626; }

.ech-widget-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	font-weight: 400;
	color: #374151;
	line-height: 1.4;
	min-width: 0;
}

.ech-info-line {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ech-exception-notice {
	font-size: 11px !important;
	font-weight: 500;
	color: #dc2626;
	line-height: 1.2;
}

.ech-exception-notice.special {
	color: #d97706;
}

/* Flèche */

.ech-widget-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	min-width: 18px;
	flex-shrink: 0;
	align-self: center;
	transition: transform 0.3s ease;
}

.ech-widget.expanded .ech-widget-arrow {
	transform: rotate(180deg);
}

.ech-widget-arrow svg {
	width: 100%;
	height: 100%;
	stroke: #9ca3af;
	stroke-width: 2;
	fill: none;
}

/* --------------------------------------------------------------------------
   Liste des jours (accordéon)
   -------------------------------------------------------------------------- */

.ech-widget-liste {
	display: none;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.ech-widget-liste.visible {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

.ech-widget-day-group {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 3px 0;
	font-size: 14px;
	font-weight: 400;
	gap: 16px;
}

.ech-widget-day-group.ajd {
	font-weight: 700;
}

.ech-widget-day-group .ech-jour-nom {
	white-space: nowrap;
	color: #374151;
}

.ech-widget-day-group .ech-jour-plages {
	text-align: right;
	color: #374151;
}

.ech-widget-day-group .ech-jour-plages .ech-ferme {
	color: #9ca3af;
}

.ech-widget-day-group .ech-jour-plages .ech-ex-closed {
	color: #dc2626;
	font-size: 12px;
}

.ech-widget-day-group .ech-jour-plages .ech-ex-special {
	color: #d97706;
	font-size: 12px;
}

/* --------------------------------------------------------------------------
   Indicateur flottant
   -------------------------------------------------------------------------- */

.ech-status-indicator {
	position: fixed;
	top: 80px;
	right: 16px;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, transform 0.2s;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ech-status-indicator:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	transform: scale(1.03);
}

.ech-status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
}

.ech-status-indicator.ouvert .ech-status-dot { background: #16a34a; }
.ech-status-indicator.ferme  .ech-status-dot { background: #dc2626; }
.ech-status-indicator.ouvert { color: #16a34a; }
.ech-status-indicator.ferme  { color: #dc2626; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.ech-widget {
		width: 100%;
		min-width: 0;
	}

	.ech-status-indicator {
		top: auto;
		bottom: 16px;
		right: 12px;
	}
}
