/* ==============================================================
   7aboire — PWA styles
   Design system inspiré de 7aboire.ch
   Palette : Ivoire / Charbon / Bordeaux / Or
   Typos : Cormorant Garamond (éditorial) + Inter (fonctionnel)
   ============================================================== */

:root {
	/* Palette */
	--ivory: #FBF7F2;
	--ivory-dark: #F2EBE0;
	--white: #FFFFFF;
	--charcoal: #1C1C1C;
	--charcoal-soft: #333333;
	--gray: #6B6B6B;
	--gray-light: #D8CFC8;
	--gray-lighter: #ECE6DE;
	--wine: #6B1F2B;
	--wine-dark: #4A1219;
	--wine-light: #F2E6E8;
	--gold: #A88658;
	--red: #B3261E;
	--green: #1F7A48;

	/* Typos */
	--serif: 'Cormorant Garamond', Georgia, serif;
	--sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	/* Radii */
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 16px;
	--radius-xl: 24px;

	/* Safe area (iOS notch) */
	--safe-top: env(safe-area-inset-top, 0);
	--safe-bottom: env(safe-area-inset-bottom, 0);
	--safe-left: env(safe-area-inset-left, 0);
	--safe-right: env(safe-area-inset-right, 0);
}

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

html, body {
	height: 100%;
	overflow: hidden; /* le scroll est géré par chaque screen */
}

body {
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.5;
	color: var(--charcoal);
	background: var(--ivory);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overscroll-behavior: none;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* ==============================================================
   Splash screen (affiché avant que le JS charge)
   ============================================================== */

.pwa-splash {
	position: fixed;
	inset: 0;
	background: var(--ivory);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	transition: opacity 300ms ease;
}

.pwa-splash.fading {
	opacity: 0;
	pointer-events: none;
}

.pwa-splash-inner {
	text-align: center;
	padding: 24px;
}

.pwa-splash-logo {
	font-family: var(--serif);
	font-size: 48px;
	font-weight: 500;
	font-style: italic;
	letter-spacing: -1px;
	color: var(--charcoal);
	line-height: 1;
}

.pwa-splash-logo span {
	font-weight: 600;
	font-style: normal;
	color: var(--wine);
}

.pwa-splash-tagline {
	font-family: var(--serif);
	font-style: italic;
	font-size: 14px;
	color: var(--gray);
	margin-top: 8px;
}

.pwa-splash-spinner {
	margin: 32px auto 0;
	width: 24px;
	height: 24px;
	border: 2px solid var(--gray-light);
	border-top-color: var(--wine);
	border-radius: 50%;
	animation: spin 800ms linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ==============================================================
   App shell
   ============================================================== */

#app {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	max-width: 560px;
	margin: 0 auto;
	background: var(--ivory);
	position: relative;
	overflow: hidden;
}

.screen {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: screen-enter 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes screen-enter {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.screen-content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 24px;
}

/* ==============================================================
   Topbar (minimal, partagée)
   ============================================================== */

.topbar {
	padding: calc(16px + var(--safe-top)) 24px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--ivory);
	border-bottom: 1px solid var(--gray-light);
}

.topbar-logo {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 500;
	font-style: italic;
	color: var(--charcoal);
	letter-spacing: -0.5px;
	text-decoration: none;
}

.topbar-logo strong {
	font-weight: 600;
	font-style: normal;
	color: var(--wine);
}

.topbar-action {
	background: transparent;
	border: none;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray);
	font-weight: 600;
	text-decoration: none;
	padding: 4px 8px;
}

.topbar-action:hover {
	color: var(--wine);
}

/* ==============================================================
   Typography classes
   ============================================================== */

.eyebrow {
	font-size: 10px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gray);
	font-weight: 600;
}

.eyebrow-wine {
	color: var(--wine);
}

.h-display {
	font-family: var(--serif);
	font-size: 36px;
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.5px;
	color: var(--charcoal);
}

.h-section {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.15;
	color: var(--charcoal);
}

.h-small {
	font-family: var(--serif);
	font-size: 18px;
	font-weight: 500;
	color: var(--charcoal);
}

.txt-editorial {
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	line-height: 1.55;
	color: var(--charcoal-soft);
}

.txt-body {
	font-size: 14px;
	line-height: 1.55;
	color: var(--charcoal-soft);
}

.txt-small {
	font-size: 12px;
	line-height: 1.5;
	color: var(--gray);
}

/* ==============================================================
   Buttons
   ============================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	font-family: var(--sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all 150ms ease;
	gap: 8px;
	-webkit-tap-highlight-color: transparent;
}

.btn:active {
	transform: scale(0.98);
}

.btn-primary {
	background: var(--charcoal);
	color: var(--ivory);
	border-color: var(--charcoal);
}

.btn-primary:hover {
	background: var(--wine);
	border-color: var(--wine);
}

.btn-wine {
	background: var(--wine);
	color: var(--white);
	border-color: var(--wine);
}

.btn-outline {
	background: transparent;
	color: var(--charcoal);
	border-color: var(--charcoal);
}

.btn-block {
	width: 100%;
}

.btn-sm {
	padding: 8px 14px;
	font-size: 11px;
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ==============================================================
   Chips / Tags
   ============================================================== */

.chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 500;
	background: var(--ivory-dark);
	color: var(--charcoal-soft);
	border: 1px solid var(--gray-light);
	white-space: nowrap;
}

.chip-wine {
	background: var(--wine-light);
	color: var(--wine);
	border-color: transparent;
}

.chip-selected {
	background: var(--charcoal);
	color: var(--ivory);
	border-color: var(--charcoal);
}

/* ==============================================================
   Forms
   ============================================================== */

.input {
	width: 100%;
	padding: 14px 16px;
	font-family: var(--sans);
	font-size: 16px; /* 16px = pas de zoom iOS */
	line-height: 1.3;
	border: 1px solid var(--gray-light);
	border-radius: var(--radius-sm);
	background: var(--white);
	color: var(--charcoal);
	transition: border-color 120ms ease;
	-webkit-appearance: none;
	appearance: none;
}

.input:focus {
	outline: none;
	border-color: var(--charcoal);
}

.input::placeholder {
	color: var(--gray);
	opacity: 0.7;
}

.input-label {
	display: block;
	font-family: var(--serif);
	font-style: italic;
	font-size: 14px;
	color: var(--charcoal-soft);
	margin-bottom: 8px;
}

/* ==============================================================
   Sticky bottom CTA (pattern clé PWA)
   ============================================================== */

.sticky-bottom {
	position: sticky;
	bottom: 0;
	background: var(--white);
	padding: 16px 20px calc(16px + var(--safe-bottom));
	border-top: 1px solid var(--gray-light);
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.04);
	display: flex;
	gap: 12px;
	align-items: center;
	z-index: 10;
}

.sticky-bottom-total {
	flex: 1;
	min-width: 0;
}

.sticky-bottom-total-label {
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--gray);
	margin-bottom: 2px;
	font-weight: 600;
}

.sticky-bottom-total-value {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 500;
	color: var(--charcoal);
	line-height: 1;
}

/* ==============================================================
   Dividers
   ============================================================== */

.divider {
	border: none;
	border-top: 1px solid var(--gray-light);
	margin: 20px 0;
}

.divider-wine {
	border: none;
	border-top: 2px solid var(--wine);
	width: 40px;
	margin: 16px 0;
}

/* ==============================================================
   Toast / Notifications
   ============================================================== */

.toast-container {
	position: fixed;
	top: calc(16px + var(--safe-top));
	left: 16px;
	right: 16px;
	z-index: 1000;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 560px;
	margin: 0 auto;
}

.toast {
	padding: 12px 16px;
	background: var(--charcoal);
	color: var(--ivory);
	border-radius: var(--radius-md);
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	pointer-events: auto;
	animation: toast-enter 250ms ease-out;
}

.toast.toast-success { background: var(--green); }
.toast.toast-error { background: var(--red); }

@keyframes toast-enter {
	from { opacity: 0; transform: translateY(-12px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================
   ECRAN 1 — ACCUEIL DEGUSTATION
   ============================================================== */

.accueil {
	padding: 24px 24px 32px;
}

.accueil-date {
	font-size: 11px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--wine);
	font-weight: 600;
	margin-bottom: 18px;
}

.accueil-title {
	font-family: var(--serif);
	font-size: 38px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.8px;
	color: var(--charcoal);
	margin-bottom: 6px;
}

.accueil-vigneron-line {
	font-family: var(--serif);
	font-size: 18px;
	font-style: italic;
	color: var(--wine);
	margin-bottom: 18px;
}

.accueil-photo {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	border-radius: var(--radius-md);
	margin-bottom: 22px;
	background: linear-gradient(135deg, #8B5A3C 0%, #6B1F2B 100%);
	display: block;
}

.accueil-photo-placeholder {
	width: 100%;
	aspect-ratio: 4/3;
	border-radius: var(--radius-md);
	background: linear-gradient(135deg, #8B5A3C 0%, #4A2C1A 50%, #6B1F2B 100%);
	margin-bottom: 22px;
	display: flex;
	align-items: flex-end;
	padding: 20px;
	color: white;
	font-family: var(--serif);
	font-style: italic;
	font-size: 13px;
}

.accueil-excerpt {
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	line-height: 1.55;
	color: var(--charcoal-soft);
	margin-bottom: 16px;
	padding-left: 16px;
	border-left: 2px solid var(--wine);
}

.accueil-link-vigneron {
	display: inline-block;
	font-size: 12px;
	letter-spacing: 1px;
	color: var(--charcoal);
	text-decoration: none;
	border-bottom: 1px solid var(--wine);
	padding-bottom: 2px;
	margin-bottom: 24px;
}

.accueil-infos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	padding: 18px 0;
	border-top: 1px solid var(--gray-light);
	border-bottom: 1px solid var(--gray-light);
	margin-bottom: 24px;
}

.accueil-info {
	text-align: center;
}

.accueil-info-value {
	font-family: var(--serif);
	font-size: 26px;
	font-weight: 500;
	color: var(--charcoal);
	display: block;
	line-height: 1;
}

.accueil-info-label {
	font-size: 9px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray);
	font-weight: 600;
	margin-top: 6px;
}

.accueil-email-form {
	margin-bottom: 8px;
}

.accueil-error {
	display: block;
	background: var(--ivory-dark);
	padding: 16px;
	text-align: center;
	color: var(--gray);
	font-style: italic;
	border-radius: var(--radius-md);
	margin: 32px 24px;
}

/* ==============================================================
   Utilities
   ============================================================== */

[hidden] { display: none !important; }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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

.mt-auto { margin-top: auto; }

/* ==============================================================
   ECRAN 2 — LISTE DES VINS
   ============================================================== */

.vins-header {
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--gray-light);
}

.vins-count {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 4px;
	gap: 12px;
}

.vins-count-num {
	font-family: var(--serif);
	font-size: 32px;
	font-weight: 500;
	color: var(--charcoal);
	line-height: 1;
	white-space: nowrap;
}

.vins-count-label {
	font-size: 12px;
	color: var(--gray);
	text-align: right;
}

.vin-item {
	padding: 20px 24px;
	border-bottom: 1px solid var(--gray-light);
}

.vin-item:last-of-type {
	border-bottom: none;
}

.vin-item-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 6px;
	gap: 12px;
}

.vin-nom {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 500;
	letter-spacing: -0.3px;
	color: var(--charcoal);
	line-height: 1.1;
}

.vin-annee {
	font-family: var(--serif);
	font-style: italic;
	font-size: 14px;
	color: var(--gray);
	margin-left: 4px;
}

.vin-prix {
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 500;
	color: var(--charcoal);
	white-space: nowrap;
}

.vin-cepages {
	margin: 8px 0 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.vin-meta {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--gray);
	margin-bottom: 8px;
}

.vin-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
}

.qty-picker {
	display: flex;
	align-items: center;
	border: 1px solid var(--gray-light);
	border-radius: 999px;
	overflow: hidden;
	background: var(--white);
}

.qty-picker button {
	background: var(--white);
	border: none;
	width: 36px;
	height: 36px;
	font-size: 18px;
	cursor: pointer;
	color: var(--charcoal);
	transition: background 120ms;
	-webkit-tap-highlight-color: transparent;
}

.qty-picker button:hover {
	background: var(--ivory);
}

.qty-picker button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.qty-picker .qty-value {
	min-width: 36px;
	text-align: center;
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 500;
	user-select: none;
}

.qty-picker.qty-active .qty-value {
	color: var(--wine);
}

/* ==============================================================
   ECRAN 4 — PANIER / COMMANDE
   ============================================================== */

.panier-header {
	padding: 20px 24px 12px;
	border-bottom: 1px solid var(--gray-light);
}

.panier-section {
	padding: 16px 24px;
	border-bottom: 1px solid var(--gray-light);
}

.panier-empty {
	padding: 60px 24px;
	text-align: center;
	color: var(--gray);
	font-style: italic;
}

.panier-item {
	display: grid;
	grid-template-columns: 1fr auto;
	padding: 12px 0;
	border-bottom: 1px solid var(--gray-lighter);
	gap: 12px;
}

.panier-item:last-of-type {
	border-bottom: none;
}

.panier-item-nom {
	font-family: var(--serif);
	font-size: 16px;
	color: var(--charcoal);
	line-height: 1.2;
}

.panier-item-details {
	font-size: 12px;
	color: var(--gray);
	margin-top: 2px;
}

.panier-item-prix {
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 500;
	text-align: right;
	white-space: nowrap;
}

.panier-totals {
	padding: 16px 24px;
	background: var(--ivory-dark);
}

.panier-total-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 14px;
}

.panier-total-row.big {
	border-top: 1px solid var(--charcoal);
	margin-top: 8px;
	padding-top: 12px;
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 500;
}

.panier-rabais {
	color: var(--wine);
	font-style: italic;
}

.panier-frais-offert {
	color: var(--gold);
	font-style: italic;
}

.panier-frais-rembourse {
	color: var(--green);
	font-style: italic;
}

.panier-cta-back {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	color: var(--wine);
	text-decoration: none;
	font-style: italic;
	font-family: var(--serif);
}

.panier-cta-back:hover {
	text-decoration: underline;
}

.checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	background: var(--ivory-dark);
	border-radius: var(--radius-sm);
	margin: 8px 0 16px;
	cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
	cursor: pointer;
}

.checkbox-row-text {
	font-size: 13px;
	line-height: 1.4;
	color: var(--charcoal-soft);
}

.form-group {
	margin-bottom: 14px;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}

.form-row .form-group {
	margin-bottom: 0;
}

.form-error {
	color: var(--red);
	font-size: 13px;
	margin-top: 4px;
}

.form-error-banner {
	background: var(--red);
	color: white;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	margin-bottom: 16px;
	font-size: 14px;
}

.form-success-banner {
	background: var(--green);
	color: white;
	padding: 16px;
	border-radius: var(--radius-md);
	margin: 16px 0;
}

.form-success-banner h3 {
	font-family: var(--serif);
	font-size: 22px;
	margin-bottom: 4px;
	font-weight: 500;
}

/* ==============================================================
   Bottom navigation back button
   ============================================================== */

.btn-back {
	background: transparent;
	border: none;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray);
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
}

.btn-back:hover {
	color: var(--wine);
}

/* ==============================================================
   Confirmation success screen
   ============================================================== */

.confirmation {
	padding: 40px 24px;
	text-align: center;
}

.confirmation-checkmark {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--green);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin: 0 auto 24px;
}

.confirmation-numero {
	font-family: var(--serif);
	font-style: italic;
	font-size: 13px;
	color: var(--gray);
	margin-top: 8px;
}

/* ==============================================================
   ECRAN AUTH (login email + code)
   ============================================================== */

.auth-screen {
	padding: 40px 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.auth-screen h1 {
	font-family: var(--serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.5px;
	color: var(--charcoal);
	margin-bottom: 4px;
}

.auth-screen p {
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	color: var(--charcoal-soft);
	line-height: 1.55;
	margin-bottom: 20px;
}

.auth-screen .input-code {
	letter-spacing: 8px;
	font-size: 24px;
	text-align: center;
	font-family: var(--sans);
	font-weight: 600;
}

.auth-screen .auth-back {
	background: transparent;
	border: none;
	color: var(--gray);
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	padding: 8px;
	align-self: flex-start;
}

.auth-screen .auth-back:hover {
	color: var(--wine);
}

/* ==============================================================
   ECRAN 3 — FICHE DEGUSTATION (notes par vin)
   ============================================================== */

.fiche-header {
	padding: calc(16px + var(--safe-top)) 24px 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--gray-light);
	background: var(--ivory);
}

.fiche-counter {
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wine);
	font-weight: 600;
}

.fiche-hero {
	padding: 24px;
	border-bottom: 1px solid var(--gray-light);
}

.fiche-nom {
	font-family: var(--serif);
	font-size: 36px;
	font-weight: 500;
	letter-spacing: -0.5px;
	line-height: 1;
	color: var(--charcoal);
	margin-bottom: 4px;
}

.fiche-annee-type {
	font-family: var(--serif);
	font-style: italic;
	font-size: 16px;
	color: var(--gray);
	margin-bottom: 12px;
}

.fiche-cepages {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.fiche-prix {
	font-family: var(--serif);
	font-size: 20px;
	font-weight: 500;
	color: var(--wine);
}

.fiche-section {
	padding: 20px 24px;
	border-bottom: 1px solid var(--gray-light);
}

.fiche-section:last-of-type {
	border-bottom: none;
}

.fiche-section-title {
	font-size: 10px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--wine);
	font-weight: 600;
	margin-bottom: 12px;
}

.tags-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tag-toggle {
	background: var(--ivory-dark);
	border: 1px solid var(--gray-light);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	color: var(--charcoal-soft);
	cursor: pointer;
	transition: all 120ms;
	-webkit-tap-highlight-color: transparent;
}

.tag-toggle:hover {
	border-color: var(--charcoal);
}

.tag-toggle.selected {
	background: var(--charcoal);
	color: var(--ivory);
	border-color: var(--charcoal);
}

.tag-add-custom {
	display: flex;
	gap: 6px;
	margin-top: 10px;
	align-items: center;
}

.tag-add-custom input {
	flex: 1;
	padding: 6px 12px;
	font-size: 12px;
	border: 1px dashed var(--gray-light);
	border-radius: 999px;
	background: transparent;
	font-family: var(--sans);
	color: var(--charcoal);
}

.tag-add-custom input:focus {
	outline: none;
	border-color: var(--wine);
	border-style: solid;
}

.tag-add-custom button {
	background: var(--wine);
	color: white;
	border: none;
	border-radius: 999px;
	width: 28px;
	height: 28px;
	font-size: 18px;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fiche-notes {
	width: 100%;
	min-height: 90px;
	padding: 12px;
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	line-height: 1.55;
	border: 1px solid var(--gray-light);
	border-radius: var(--radius-sm);
	background: var(--white);
	resize: vertical;
	color: var(--charcoal);
}

.fiche-notes::placeholder {
	color: var(--gray);
	opacity: 0.7;
}

.fiche-stars {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.fiche-star {
	font-size: 32px;
	color: var(--gray-light);
	cursor: pointer;
	transition: color 120ms, transform 120ms;
	background: transparent;
	border: none;
	padding: 0;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
}

.fiche-star.filled {
	color: var(--gold);
}

.fiche-star:active {
	transform: scale(1.2);
}

.fiche-heart-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.fiche-heart-icon {
	font-size: 28px;
	color: var(--gray-light);
	transition: color 120ms, transform 120ms;
	line-height: 1;
}

.fiche-heart-icon.active {
	color: var(--wine);
}

.fiche-heart-row.active .fiche-heart-icon {
	transform: scale(1.1);
}

.fiche-heart-label {
	font-family: var(--serif);
	font-style: italic;
	font-size: 15px;
	color: var(--charcoal-soft);
}

/* ==============================================================
   "Déguster →" link sur la liste des vins (réactivé)
   ============================================================== */

.vin-deguster {
	margin-left: auto;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--charcoal);
	text-decoration: none;
	font-weight: 600;
	padding: 10px 0;
	border-bottom: 1px solid var(--charcoal);
	cursor: pointer;
	background: transparent;
	border-top: none;
	border-left: none;
	border-right: none;
	border-radius: 0;
}

.vin-deguster:hover {
	color: var(--wine);
	border-bottom-color: var(--wine);
}

.vin-deguster.has-note::before {
	content: '✓ ';
	color: var(--gold);
}

/* ==============================================================
   ECRAN 5 — MON CARNET
   ============================================================== */

.carnet-header {
	padding: calc(24px + var(--safe-top)) 24px 24px;
	background: var(--ivory-dark);
	border-bottom: 1px solid var(--gray-light);
}

.carnet-greeting {
	font-family: var(--serif);
	font-size: 28px;
	font-weight: 500;
	line-height: 1.1;
	color: var(--charcoal);
	margin-bottom: 4px;
}

.carnet-greeting em {
	font-style: italic;
	color: var(--wine);
}

.carnet-stats {
	display: flex;
	gap: 24px;
	margin-top: 14px;
}

.carnet-stat-num {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 500;
	color: var(--charcoal);
	display: block;
	line-height: 1;
}

.carnet-stat-label {
	font-size: 10px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray);
	font-weight: 600;
	margin-top: 4px;
}

.carnet-filters {
	display: flex;
	gap: 8px;
	padding: 12px 24px;
	border-bottom: 1px solid var(--gray-light);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.carnet-filter {
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gray);
	background: transparent;
	border: 1px solid var(--gray-light);
	white-space: nowrap;
	cursor: pointer;
}

.carnet-filter.active {
	background: var(--charcoal);
	color: var(--ivory);
	border-color: var(--charcoal);
}

.carnet-empty {
	padding: 60px 24px;
	text-align: center;
}

.carnet-empty-title {
	font-family: var(--serif);
	font-size: 22px;
	font-style: italic;
	color: var(--charcoal-soft);
	margin-bottom: 12px;
}

.carnet-empty-text {
	font-size: 14px;
	color: var(--gray);
	line-height: 1.55;
}

.carnet-group {
	padding: 16px 24px;
}

.carnet-group-date {
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wine);
	font-weight: 600;
	margin-bottom: 4px;
}

.carnet-group-title {
	font-family: var(--serif);
	font-style: italic;
	font-size: 16px;
	color: var(--charcoal-soft);
	margin-bottom: 16px;
}

.carnet-entry {
	padding: 14px 0;
	border-bottom: 1px solid var(--gray-lighter);
}

.carnet-entry:last-child {
	border-bottom: none;
}

.carnet-entry-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.carnet-entry-nom {
	font-family: var(--serif);
	font-size: 18px;
	font-weight: 500;
	color: var(--charcoal);
}

.carnet-entry-stars {
	color: var(--gold);
	font-size: 14px;
	white-space: nowrap;
}

.carnet-entry-cepages {
	margin: 6px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.carnet-entry-note {
	font-family: var(--serif);
	font-style: italic;
	font-size: 13px;
	color: var(--charcoal-soft);
	line-height: 1.5;
	margin-top: 4px;
}

.carnet-entry-heart {
	color: var(--wine);
	margin-right: 4px;
}

/* ==============================================================
   TAB BAR (bottom navigation)
   ============================================================== */

.tabbar {
	display: flex;
	background: var(--white);
	border-top: 1px solid var(--gray-light);
	padding: 8px 0 calc(8px + var(--safe-bottom));
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.tabbar-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px 0;
	font-size: 10px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--gray);
	text-decoration: none;
	font-weight: 600;
	background: transparent;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.tabbar-item.active {
	color: var(--wine);
}

.tabbar-item-icon {
	font-size: 18px;
	line-height: 1;
}

/* ============================================== */
/* v1.3.1 — Température & Distinctions             */
/* Section discrète sous le hero de la fiche       */
/* ============================================== */

.fiche-enrich {
	margin: 12px 24px 8px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fiche-temperature {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(107, 31, 43, 0.05);
	border-radius: 14px;
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 13px;
	color: var(--gray, #6B6B6B);
	width: fit-content;
	align-self: flex-start;
}

.fiche-temperature-icon {
	font-size: 13px;
	opacity: 0.85;
	line-height: 1;
}

.fiche-temperature-label {
	font-variant-numeric: tabular-nums;
}

.fiche-distinctions {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fiche-distinction-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
	font-size: 12.5px;
	color: var(--gray, #6B6B6B);
	line-height: 1.4;
}

.fiche-distinction-icon {
	font-size: 13px;
	line-height: 1.4;
	flex-shrink: 0;
}

.fiche-distinction-text {
	font-style: italic;
	letter-spacing: 0.1px;
}

/* ============================================== */
/* v1.3.4 — Avis 7aboire (bouton + modal)          */
/* ============================================== */

.fiche-avis-trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 24px 6px;
	padding: 12px 16px;
	background: linear-gradient(135deg, rgba(107, 31, 43, 0.06) 0%, rgba(107, 31, 43, 0.02) 100%);
	border: 1px solid rgba(107, 31, 43, 0.15);
	border-radius: 10px;
	cursor: pointer;
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 14px;
	color: var(--wine, #6B1F2B);
	transition: background 0.15s ease;
}

.fiche-avis-trigger:hover,
.fiche-avis-trigger:active {
	background: linear-gradient(135deg, rgba(107, 31, 43, 0.10) 0%, rgba(107, 31, 43, 0.05) 100%);
}

.fiche-avis-trigger-icon {
	font-size: 18px;
	color: var(--wine, #6B1F2B);
	line-height: 1;
}

.fiche-avis-trigger-label {
	letter-spacing: 0.2px;
}

/* === Modal === */
.avis-overlay {
	position: fixed;
	inset: 0;
	background: rgba(28, 28, 28, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 24px;
	animation: avisOverlayIn 0.18s ease;
}

@keyframes avisOverlayIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.avis-card {
	max-width: 440px;
	width: 100%;
	background: var(--ivory, #FBF7F2);
	border-radius: 14px;
	padding: 28px 24px 20px;
	box-shadow: 0 18px 48px rgba(28, 28, 28, 0.18);
	font-family: var(--serif, Georgia, serif);
	color: var(--charcoal, #1C1C1C);
	max-height: 88vh;
	overflow-y: auto;
	animation: avisCardIn 0.22s ease;
}

@keyframes avisCardIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.avis-emblem {
	text-align: center;
	font-size: 24px;
	color: var(--wine, #6B1F2B);
	margin-bottom: 4px;
}

.avis-eyebrow {
	text-align: center;
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gray, #6B6B6B);
	margin-bottom: 18px;
	font-family: var(--sans, -apple-system, sans-serif);
}

.avis-commentaire {
	font-size: 15.5px;
	line-height: 1.55;
	margin-bottom: 16px;
	color: var(--charcoal, #1C1C1C);
}

.avis-accords-label {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--gray, #6B6B6B);
	margin-top: 14px;
	margin-bottom: 6px;
	font-weight: 600;
	font-family: var(--sans, -apple-system, sans-serif);
}

.avis-accords {
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--charcoal, #1C1C1C);
	font-style: italic;
}

.avis-auteur {
	margin-top: 18px;
	text-align: right;
	font-size: 13.5px;
	color: var(--wine, #6B1F2B);
	font-style: italic;
	letter-spacing: 0.3px;
}

/* v1.3.5 — Actions au pied de la modal */
.avis-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 22px;
}

.avis-action {
	display: block;
	width: 100%;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	font-weight: 600;
	letter-spacing: 0.3px;
	transition: opacity 0.15s ease;
}

.avis-action-primary {
	background: var(--wine, #6B1F2B);
	color: var(--ivory, #FBF7F2);
}

.avis-action-primary:hover,
.avis-action-primary:active {
	opacity: 0.92;
}

.avis-action-secondary {
	background: transparent;
	color: var(--gray, #6B6B6B);
	font-weight: 500;
	letter-spacing: 1px;
	text-transform: uppercase;
	font-size: 12px;
	padding: 8px;
}

.avis-action-secondary:hover,
.avis-action-secondary:active {
	color: var(--charcoal, #1C1C1C);
}

/* v1.3.5 — Highlight visuel quand l'avis est adopté dans les notes */
.fiche-notes-adopted {
	box-shadow: 0 0 0 3px rgba(107, 31, 43, 0.25);
	transition: box-shadow 0.35s ease;
}

/* ============================================== */
/* v1.3.6 — Mode Découverte (UI simplifiée + sage) */
/* ============================================== */

/* Override des accents wine → sage quand on est en mode découverte */
body.mode-decouverte {
	--wine: #7BA47E;        /* sage green */
	--wine-dark: #5C8460;
	--wine-light: #E8F0E9;
}

/* Section verdict (en mode découverte uniquement) */
.fiche-verdict-section {
	margin: 20px 24px;
	padding: 22px 18px;
	background: var(--wine-light, #E8F0E9);
	border-radius: 12px;
	text-align: center;
}

.fiche-verdict-title {
	font-size: 13px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray, #6B6B6B);
	font-weight: 600;
	margin-bottom: 16px;
	font-family: var(--sans, -apple-system, sans-serif);
}

.fiche-verdict-buttons {
	display: flex;
	justify-content: space-around;
	gap: 8px;
	margin-bottom: 8px;
}

.fiche-verdict-btn {
	flex: 1;
	padding: 14px 6px;
	border: 2px solid transparent;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	font-size: 12px;
	color: var(--gray, #6B6B6B);
	transition: all 0.15s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-weight: 500;
}

.fiche-verdict-btn:hover,
.fiche-verdict-btn:active {
	background: rgba(255, 255, 255, 0.9);
}

.fiche-verdict-btn.is-selected {
	background: var(--wine, #7BA47E);
	color: white;
	border-color: var(--wine-dark, #5C8460);
}

.fiche-verdict-btn-emoji {
	font-size: 28px;
	line-height: 1;
}

.fiche-verdict-btn-label {
	font-size: 11.5px;
	letter-spacing: 0.3px;
}

/* Cœur en mode découverte — plus discret, à côté du verdict */
.fiche-coeur-decouverte {
	margin: 14px 24px 4px;
	display: flex;
	justify-content: center;
	gap: 10px;
	align-items: center;
}

.fiche-coeur-decouverte button {
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	padding: 4px 10px;
	transition: transform 0.15s ease;
	color: var(--gray, #6B6B6B);
}

.fiche-coeur-decouverte button:hover { transform: scale(1.1); }
.fiche-coeur-decouverte button.is-active {
	color: var(--wine, #7BA47E);
	transform: scale(1.05);
}

.fiche-coeur-decouverte-label {
	font-size: 13px;
	color: var(--gray, #6B6B6B);
	font-style: italic;
}

/* Cache les éléments du mode amateur quand on est en découverte */
body.mode-decouverte .fiche-section,
body.mode-decouverte .fiche-rating-section {
	display: none;
}

/* Cache le bouton "utiliser comme base" en mode découverte (pas de textarea) */
body.mode-decouverte .avis-action-primary {
	display: none;
}

/* === Toggle "préférence mode plus simple" sur l'accueil === */
.pref-mode-toggle {
	margin: 20px 24px 0;
	padding: 12px 14px;
	background: rgba(123, 164, 126, 0.08);
	border: 1px solid rgba(123, 164, 126, 0.25);
	border-radius: 10px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.pref-mode-toggle-label {
	flex: 1;
	font-size: 13.5px;
	color: var(--gray, #6B6B6B);
	font-style: italic;
	line-height: 1.35;
}

.pref-mode-toggle-switch {
	flex-shrink: 0;
	position: relative;
	width: 44px;
	height: 24px;
	background: #d8d8d8;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s;
	border: none;
}

.pref-mode-toggle-switch::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	transition: transform 0.2s, background 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pref-mode-toggle-switch.is-on {
	background: #7BA47E;
}

.pref-mode-toggle-switch.is-on::after {
	transform: translateX(20px);
}

/* === Carnet : badge mode + verdict === */
.carnet-entry-mode {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	letter-spacing: 0.5px;
	color: var(--gray, #6B6B6B);
	font-family: var(--sans, -apple-system, sans-serif);
	margin-right: 8px;
	text-transform: uppercase;
}

.carnet-entry-verdict {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 8px;
	font-size: 18px;
}

.carnet-entry-verdict-label {
	font-size: 13px;
	color: var(--charcoal, #1C1C1C);
	font-style: italic;
}

/* ============================================== */
/* v1.3.7 — Indicateur d'autosave (discret)        */
/* ============================================== */
.autosave-indicator {
	position: fixed;
	top: 18px;
	right: 18px;
	padding: 6px 12px;
	background: rgba(28, 28, 28, 0.85);
	color: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	font-size: 12px;
	font-family: var(--sans, -apple-system, sans-serif);
	letter-spacing: 0.3px;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
	z-index: 999;
	backdrop-filter: blur(6px);
}

.autosave-indicator.visible {
	opacity: 1;
	transform: translateY(0);
}

.autosave-indicator.pending {
	background: rgba(28, 28, 28, 0.65);
}

.autosave-indicator.saving {
	background: rgba(107, 31, 43, 0.85);
}

.autosave-indicator.saved {
	background: rgba(123, 164, 126, 0.95);
}

.autosave-indicator.error {
	background: rgba(180, 50, 50, 0.95);
}

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

/* Header de groupe (date + titre) cliquable */
.carnet-group-header {
	margin: 0 0 14px;
	padding: 6px 0;
}

.carnet-group-header.is-clickable {
	cursor: pointer;
	position: relative;
	padding-right: 26px;
	transition: opacity 0.15s ease;
}

.carnet-group-header.is-clickable:hover,
.carnet-group-header.is-clickable:active {
	opacity: 0.72;
}

.carnet-group-chevron {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 20px;
	color: var(--wine, #6B1F2B);
	line-height: 1;
	font-family: var(--sans, -apple-system, sans-serif);
	font-weight: 300;
}

/* Banderole "filtre actif" */
.carnet-active-filter {
	margin: 14px 0 0;
	padding: 10px 14px;
	background: var(--wine-light, #F2E6E8);
	border-radius: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--charcoal, #1C1C1C);
}

.carnet-active-filter-label {
	color: var(--gray, #6B6B6B);
	font-size: 11.5px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	font-family: var(--sans, -apple-system, sans-serif);
	font-weight: 600;
}

.carnet-active-filter-value {
	flex: 1;
	font-style: italic;
	font-family: var(--serif, Georgia, serif);
	font-size: 14px;
}

.carnet-active-filter-close {
	background: var(--wine, #6B1F2B);
	color: var(--ivory, #FBF7F2);
	border: none;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--sans, -apple-system, sans-serif);
	font-weight: 300;
}

.carnet-active-filter-close:hover,
.carnet-active-filter-close:active {
	opacity: 0.85;
}

/* ============================================== */
/* v1.3.12 — Sélecteur de soirée (carnet)          */
/* ============================================== */

.carnet-soiree-filter {
	margin: 14px 0 4px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: rgba(107, 31, 43, 0.04);
	border-radius: 10px;
}

.carnet-soiree-filter label {
	font-size: 11px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gray, #6B6B6B);
	font-family: var(--sans, -apple-system, sans-serif);
	flex-shrink: 0;
}

.carnet-soiree-filter select {
	flex: 1;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: transparent;
	border: none;
	padding: 8px 28px 8px 0;
	font-family: var(--serif, Georgia, serif);
	font-size: 15px;
	color: var(--charcoal, #1C1C1C);
	font-style: italic;
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236B1F2B' d='M6 8L0 0h12z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 6px center;
	background-size: 10px 6px;
}

.carnet-soiree-filter select:focus {
	outline: 2px solid rgba(107, 31, 43, 0.3);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ============================================== */
/* v1.3.18 — Détection autofill Chrome/Arc         */
/* Trick : Chrome applique -webkit-autofill quand  */
/* un autofill se produit. On déclenche une        */
/* animation invisible que le JS écoute.           */
/* ============================================== */
@keyframes onAutoFillStart {
	from { /* rien */ }
	to   { /* rien */ }
}
input:-webkit-autofill,
textarea:-webkit-autofill {
	animation-name: onAutoFillStart;
	animation-duration: 0.001s;
}

/* ============================================== */
/* v1.3.19 — Partage & impression                 */
/* ============================================== */

/* Bouton partager sur chaque entrée du carnet */
.carnet-entry-footer {
	margin-top: 8px;
	display: flex;
	justify-content: flex-end;
}
.carnet-share-btn {
	background: transparent;
	border: 1px solid rgba(107, 31, 43, 0.2);
	color: var(--wine, #6B1F2B);
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.3px;
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	transition: background 0.15s ease;
}
.carnet-share-btn:hover,
.carnet-share-btn:active {
	background: var(--wine-light, #F2E6E8);
}

/* Bouton imprimer / PDF (à côté des filtres du carnet) */
.carnet-print-btn {
	margin-left: auto;
	background: transparent;
	border: 1px solid rgba(28, 28, 28, 0.12);
	color: var(--charcoal, #1C1C1C);
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	letter-spacing: 0.3px;
	transition: background 0.15s ease;
}
.carnet-print-btn:hover,
.carnet-print-btn:active {
	background: var(--ivory-dark, #F2EBE0);
}

/* Bottom sheet modal (partage) */
.sheet-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	z-index: 9998;
	transition: background 0.25s ease;
}
.sheet-backdrop.visible {
	background: rgba(0, 0, 0, 0.4);
}
.sheet {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--ivory, #FBF7F2);
	border-radius: 20px 20px 0 0;
	padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0));
	z-index: 9999;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	max-height: 80vh;
	overflow-y: auto;
}
.sheet.visible {
	transform: translateY(0);
}
.sheet-handle {
	width: 40px;
	height: 4px;
	background: rgba(28, 28, 28, 0.2);
	border-radius: 2px;
	margin: 0 auto 16px;
}
.sheet-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 20px;
	font-weight: 500;
	text-align: center;
	margin-bottom: 4px;
}
.sheet-subtitle {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 14px;
	color: var(--gray, #6B6B6B);
	text-align: center;
	margin-bottom: 20px;
}
.sheet-action {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	background: white;
	border: 1px solid rgba(28, 28, 28, 0.08);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	font-size: 14px;
	color: var(--charcoal, #1C1C1C);
	text-decoration: none;
	transition: background 0.15s ease;
}
.sheet-action:hover,
.sheet-action:active {
	background: var(--ivory-dark, #F2EBE0);
}
.sheet-icon {
	font-size: 18px;
	flex-shrink: 0;
}
.sheet-label {
	flex: 1;
	text-align: left;
}
.sheet-arrow {
	color: var(--wine, #6B1F2B);
	font-weight: 500;
}
.sheet-cancel {
	display: block;
	width: 100%;
	background: transparent;
	border: none;
	color: var(--gray, #6B6B6B);
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 15px;
	padding: 12px;
	margin-top: 8px;
	cursor: pointer;
	text-align: center;
}

/* Page publique de partage */
.partage-page {
	padding: 40px 24px 60px;
	text-align: center;
	max-width: 520px;
	margin: 0 auto;
}
.partage-eyebrow {
	font-size: 11px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
	margin-bottom: 20px;
}
.partage-vin-nom {
	font-family: var(--serif, Georgia, serif);
	font-size: 40px;
	font-weight: 500;
	line-height: 1.1;
	margin-bottom: 4px;
}
.partage-vin-meta {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 16px;
	color: var(--gray, #6B6B6B);
	margin-bottom: 28px;
}
.partage-verdict {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: rgba(123, 164, 126, 0.1);
	padding: 20px;
	border-radius: 12px;
	margin: 20px 0;
}
.partage-verdict-emoji {
	font-size: 36px;
}
.partage-verdict-label {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 20px;
	color: var(--charcoal, #1C1C1C);
}
.partage-stars {
	color: var(--gold, #C8A96E);
	font-size: 28px;
	letter-spacing: 4px;
	margin: 20px 0;
}
.partage-heart {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--wine-light, #F2E6E8);
	color: var(--wine, #6B1F2B);
	padding: 8px 18px;
	border-radius: 20px;
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 15px;
	margin: 12px 0;
}
.partage-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 20px 0;
}
.partage-notes {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 17px;
	line-height: 1.5;
	color: var(--charcoal, #1C1C1C);
	padding: 20px 16px;
	margin: 20px 0;
	border-left: 3px solid var(--wine, #6B1F2B);
	background: rgba(107, 31, 43, 0.03);
	text-align: left;
}
.partage-footer {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid rgba(28, 28, 28, 0.08);
}
.partage-signature {
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gray, #6B6B6B);
	margin-bottom: 14px;
}
.partage-cta {
	display: inline-block;
	background: var(--charcoal, #1C1C1C);
	color: var(--ivory, #FBF7F2);
	text-decoration: none;
	padding: 12px 26px;
	border-radius: 24px;
	font-size: 13px;
	letter-spacing: 0.5px;
	font-weight: 500;
}

/* ============================================== */
/* IMPRESSION — @media print                       */
/* ============================================== */
@media print {
	/* Masque tout ce qui n'est pas nécessaire à l'impression */
	.topbar,
	.tabbar,
	.no-print,
	.carnet-filters,
	.carnet-soiree-filter,
	.autosave-indicator,
	.sticky-bottom,
	.sheet,
	.sheet-backdrop {
		display: none !important;
	}

	body {
		background: white !important;
		color: black !important;
	}
	.screen,
	.screen-content {
		padding: 0 !important;
		max-width: 100% !important;
	}
	.carnet-header {
		background: transparent !important;
		padding: 0 0 16px !important;
		border-bottom: 2px solid #1C1C1C;
		margin-bottom: 20px !important;
	}
	.carnet-group {
		page-break-inside: avoid;
		margin-bottom: 24px;
	}
	.carnet-group-date {
		font-weight: 700;
		border-bottom: 1px solid #ccc;
		padding-bottom: 4px;
		margin-bottom: 8px;
	}
	.carnet-entry {
		page-break-inside: avoid;
		padding: 10px 0 !important;
		border-bottom: 1px dotted #ccc !important;
	}
	.chip,
	.carnet-entry-cepages .chip {
		background: transparent !important;
		border: 1px solid #999 !important;
		color: #333 !important;
	}
	/* Impression : ajoute la date + logo en en-tête */
	.carnet-header::before {
		content: "7aboire · carnet de dégustation";
		display: block;
		font-family: var(--serif, Georgia, serif);
		font-size: 14px;
		font-style: italic;
		color: #6B1F2B;
		margin-bottom: 4px;
	}
	@page {
		margin: 1.5cm;
	}
}

/* ============================================== */
/* v1.4.1 — Guide de dégustation (memo permanent) */
/* ============================================== */

/* Bouton 📖 dans les topbars */
.topbar-guide-btn {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
	color: var(--charcoal, #1C1C1C);
	transition: transform 0.15s ease;
}
.topbar-guide-btn:hover,
.topbar-guide-btn:active {
	transform: scale(1.1);
}
/* Ajustement quand le bouton est dans une fiche-header (position droite) */
.fiche-header .topbar-guide-btn {
	margin-left: auto;
}

/* Bouton dans les filtres du carnet */
.carnet-guide-btn {
	margin-left: auto;
	background: transparent;
	border: 1px solid rgba(107, 31, 43, 0.2);
	color: var(--wine, #6B1F2B);
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	font-family: var(--sans, -apple-system, sans-serif);
	letter-spacing: 0.3px;
	transition: background 0.15s ease;
}
.carnet-guide-btn:hover,
.carnet-guide-btn:active {
	background: var(--wine-light, #F2E6E8);
}
/* Enchaînement guide + print dans les filtres : le premier utilise margin-left auto,
   le second garde son propre margin-left auto qui devient sans effet */
.carnet-guide-btn + .carnet-print-btn {
	margin-left: 0;
}

/* Sheet du guide — plus haut que le sheet de partage */
.guide-sheet {
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	padding: 0 !important;
}

/* Header sticky */
.guide-header {
	position: sticky;
	top: 0;
	background: var(--ivory, #FBF7F2);
	padding: 12px 20px 14px;
	border-bottom: 1px solid rgba(28, 28, 28, 0.08);
	z-index: 2;
}
.guide-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 22px;
	font-weight: 500;
	text-align: center;
	color: var(--charcoal, #1C1C1C);
	line-height: 1.1;
}
.guide-title-icon {
	font-size: 18px;
	margin-right: 2px;
}
.guide-subtitle {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 13px;
	color: var(--gray, #6B6B6B);
	text-align: center;
	margin-top: 4px;
}

/* Body scrollable */
.guide-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px 20px 24px;
	-webkit-overflow-scrolling: touch;
}

/* Intro : Impression générale */
.guide-intro {
	background: rgba(107, 31, 43, 0.04);
	border-left: 3px solid var(--wine, #6B1F2B);
	border-radius: 6px;
	padding: 16px 18px;
	margin-bottom: 24px;
}
.guide-intro-eyebrow {
	font-size: 10px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 700;
	margin-bottom: 6px;
}
.guide-intro-baseline {
	font-family: var(--serif, Georgia, serif);
	font-size: 16px;
	font-weight: 500;
	color: var(--charcoal, #1C1C1C);
	margin-bottom: 12px;
	line-height: 1.3;
}
.guide-intro-p {
	font-family: var(--serif, Georgia, serif);
	font-size: 13.5px;
	color: var(--charcoal-soft, #3A3A3A);
	line-height: 1.5;
	margin: 0 0 10px;
}
.guide-intro-p:last-child {
	margin-bottom: 0;
}

/* Séparateur "les 9 dimensions" */
.guide-separator {
	text-align: center;
	font-size: 11px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--gray, #6B6B6B);
	font-weight: 600;
	margin: 8px 0 20px;
	position: relative;
}
.guide-separator::before,
.guide-separator::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 40px;
	height: 1px;
	background: rgba(28, 28, 28, 0.15);
}
.guide-separator::before {
	right: calc(50% + 90px);
}
.guide-separator::after {
	left: calc(50% + 90px);
}

/* Carte d'une dimension */
.guide-card {
	background: white;
	border: 1px solid rgba(28, 28, 28, 0.08);
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 12px;
}
.guide-card-head {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 8px;
}
.guide-card-num {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 24px;
	line-height: 0.9;
	color: var(--wine, #6B1F2B);
	font-weight: 500;
	flex-shrink: 0;
	padding-top: 2px;
}
.guide-card-titles {
	flex: 1;
}
.guide-card-nom {
	font-family: var(--serif, Georgia, serif);
	font-size: 18px;
	font-weight: 500;
	color: var(--charcoal, #1C1C1C);
	line-height: 1.1;
}
.guide-card-alias {
	font-style: italic;
	color: var(--gray, #6B6B6B);
	font-weight: 400;
	font-size: 14px;
}
.guide-card-ou {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12px;
	color: var(--gray, #6B6B6B);
	margin-top: 2px;
}
.guide-card-desc {
	font-size: 13px;
	color: var(--charcoal-soft, #3A3A3A);
	line-height: 1.45;
	margin: 8px 0 12px;
}

/* Échelle avec chips */
.guide-echelle {
	margin-top: 10px;
}
.guide-echelle-label {
	font-size: 10px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
	margin-bottom: 6px;
}
.guide-echelle-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	align-items: center;
}
.guide-chip {
	background: var(--ivory-dark, #F4ECE0);
	color: var(--charcoal, #1C1C1C);
	padding: 3px 9px;
	border-radius: 12px;
	font-size: 11.5px;
	font-weight: 500;
}
.guide-arrow {
	color: var(--gray-light, #D8CFC8);
	font-size: 11px;
	line-height: 1;
	padding: 0 1px;
}

/* Footer du guide */
.guide-footer {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px dashed rgba(28, 28, 28, 0.12);
	text-align: center;
}
.guide-footer-text {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12px;
	color: var(--gray, #6B6B6B);
	line-height: 1.5;
}

/* Empêche scroll du body quand un sheet est ouvert */
body.sheet-open {
	overflow: hidden;
}

/* Mode découverte : accents sage au lieu de wine */
body[data-mode="decouverte"] .guide-intro {
	background: rgba(123, 164, 126, 0.08);
	border-left-color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .guide-intro-eyebrow,
body[data-mode="decouverte"] .guide-card-num,
body[data-mode="decouverte"] .guide-echelle-label {
	color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .carnet-guide-btn {
	border-color: rgba(123, 164, 126, 0.3);
	color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .carnet-guide-btn:hover,
body[data-mode="decouverte"] .carnet-guide-btn:active {
	background: rgba(123, 164, 126, 0.08);
}

/* ================================================== */
/* v1.4.2 — Tags catégorisés nez / bouche / finale    */
/* ================================================== */

/* Icône dans le titre de section */
.fiche-section-icon {
	display: inline-block;
	margin-right: 6px;
	font-size: 0.9em;
	opacity: 0.85;
}

/* Petit hint après le titre */
.fiche-section-hint {
	display: block;
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12px;
	color: var(--gray, #6B6B6B);
	font-weight: 400;
	margin-top: 3px;
	letter-spacing: 0;
	text-transform: none;
}

/* Sections catégorisées : titre en accent bordeaux */
.fiche-section-cat[data-cat="nez"] .fiche-section-title,
.fiche-section-cat[data-cat="bouche"] .fiche-section-title,
.fiche-section-cat[data-cat="finale"] .fiche-section-title {
	color: var(--wine, #6B1F2B);
}

/* v1.4.4 — un tag actif ailleurs est masqué de sa section native (via JS),
   donc plus besoin des classes .moved / .tag-badge-moved */

/* Section "mes mots" */
.fiche-section-mes-mots {
	background: rgba(168, 134, 88, 0.05);
	border-left: 3px solid var(--gold, #A88658);
	border-radius: 4px;
	padding: 12px 14px 14px;
	margin-bottom: 16px;
}
.fiche-section-mes-mots .fiche-section-title {
	color: var(--gold, #A88658);
	margin-bottom: 8px;
}
.tags-wrap-mes-mots {
	gap: 6px;
}
.tag-mes-mots {
	background: white;
	border: 1px solid rgba(168, 134, 88, 0.3) !important;
	color: var(--charcoal, #1C1C1C) !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.tag-mes-mots:hover,
.tag-mes-mots:active {
	background: var(--ivory-dark, #F4ECE0) !important;
}
.tag-badge-cat {
	font-size: 9px;
	letter-spacing: 0.5px;
	color: var(--gold, #A88658);
	font-weight: 600;
	text-transform: uppercase;
	opacity: 0.8;
}

/* Sheet "déplacer un tag" */
.sheet-action-danger {
	border-color: rgba(200, 25, 31, 0.15) !important;
}
.sheet-action-danger .sheet-arrow {
	color: #C8191F !important;
}
.sheet-action-danger:hover,
.sheet-action-danger:active {
	background: #FDECEC !important;
}

/* Mode découverte : sage pour mes mots (au lieu de gold) */
body[data-mode="decouverte"] .fiche-section-mes-mots {
	background: rgba(123, 164, 126, 0.06);
	border-left-color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .fiche-section-mes-mots .fiche-section-title,
body[data-mode="decouverte"] .tag-badge-cat {
	color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .tag-mes-mots {
	border-color: rgba(123, 164, 126, 0.3) !important;
}

/* ================================================== */
/* v1.4.6 — Hub personnel : mes dégustations         */
/* ================================================== */

.me-header {
	padding: 32px 20px 24px;
	text-align: center;
}
.me-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.15;
	margin: 8px 0 0;
	letter-spacing: -0.5px;
}
.me-title em {
	color: var(--wine, #6B1F2B);
	font-style: italic;
}

/* Empty state : aucune dégust */
.me-empty {
	padding: 40px 24px 60px;
	text-align: center;
	max-width: 420px;
	margin: 0 auto;
}
.me-empty-icon {
	font-size: 56px;
	margin-bottom: 16px;
	opacity: 0.7;
}
.me-empty-title {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 22px;
	color: var(--charcoal, #1C1C1C);
	margin-bottom: 12px;
}
.me-empty-text {
	font-family: var(--serif, Georgia, serif);
	font-size: 14.5px;
	color: var(--gray, #6B6B6B);
	line-height: 1.55;
	margin-bottom: 28px;
}

/* Liste des dégustations */
.me-degs-list {
	padding: 8px 16px 40px;
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* Carte dégustation */
.me-deg-card {
	display: flex;
	align-items: stretch;
	background: white;
	border: 1px solid rgba(28, 28, 28, 0.08);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: var(--charcoal, #1C1C1C);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.me-deg-card:hover,
.me-deg-card:active {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(28, 28, 28, 0.06);
}

/* Photo vigneron */
.me-deg-card-photo {
	width: 88px;
	flex-shrink: 0;
	background-size: cover;
	background-position: center;
	background-color: var(--ivory-dark, #F4ECE0);
}
@media (max-width: 480px) {
	.me-deg-card-photo { width: 70px; }
}

/* Body de la carte */
.me-deg-card-body {
	flex: 1;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}
.me-deg-card-date {
	font-size: 10.5px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
}
.me-deg-card-titre {
	font-family: var(--serif, Georgia, serif);
	font-size: 20px;
	font-weight: 500;
	margin: 2px 0 0;
	line-height: 1.15;
	color: var(--charcoal, #1C1C1C);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.me-deg-card-vigneron {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 13px;
	color: var(--gray, #6B6B6B);
}
.me-deg-card-stats {
	font-size: 11.5px;
	color: var(--charcoal-soft, #3A3A3A);
	margin-top: 4px;
}
.me-deg-card-arrow {
	font-size: 11px;
	letter-spacing: 0.5px;
	color: var(--wine, #6B1F2B);
	margin-top: 6px;
	font-weight: 500;
}

/* ================================================== */
/* v1.4.7 — Tags catégorisés dans l'avis 7aboire     */
/* ================================================== */

.avis-tags-section {
	margin-top: 18px;
	padding: 14px 16px 16px;
	background: rgba(107, 31, 43, 0.04);
	border-left: 3px solid var(--wine, #6B1F2B);
	border-radius: 6px;
}
.avis-tags-label {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 13px;
	color: var(--gray, #6B6B6B);
	margin-bottom: 10px;
	text-align: center;
}

.avis-tags-cat {
	margin-bottom: 10px;
}
.avis-tags-cat:last-child {
	margin-bottom: 0;
}

.avis-tags-cat-name {
	display: inline-block;
	font-size: 10.5px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
	margin-bottom: 6px;
}

.avis-tags-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.chip.avis-tag-chip {
	background: white;
	border: 1px solid rgba(107, 31, 43, 0.15);
	color: var(--charcoal, #1C1C1C);
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 12px;
}

/* Mode découverte : sage au lieu de wine (mais tags rarement affichés en découverte) */
body[data-mode="decouverte"] .avis-tags-section {
	background: rgba(123, 164, 126, 0.06);
	border-left-color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .avis-tags-cat-name {
	color: var(--sage, #7BA47E);
}
body[data-mode="decouverte"] .chip.avis-tag-chip {
	border-color: rgba(123, 164, 126, 0.2);
}

/* ================================================== */
/* v1.4.8 — Chip "mes mots" avec suppression         */
/* ================================================== */

.tag-mes-mots-wrap {
	display: inline-flex;
	align-items: stretch;
	background: white;
	border: 1px solid rgba(168, 134, 88, 0.3);
	border-radius: 16px;
	overflow: hidden;
	margin: 0;
}

.tag-mes-mots-add {
	background: transparent !important;
	border: none !important;
	color: var(--charcoal, #1C1C1C) !important;
	padding: 5px 8px 5px 12px !important;
	font-family: var(--sans, -apple-system, sans-serif);
	font-size: 12.5px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	border-radius: 0 !important;
}
.tag-mes-mots-add:hover,
.tag-mes-mots-add:active {
	background: var(--ivory-dark, #F4ECE0) !important;
}

.tag-mes-mots-del {
	background: transparent;
	border: none;
	border-left: 1px solid rgba(168, 134, 88, 0.2);
	color: var(--gray, #6B6B6B);
	padding: 4px 10px;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
	transition: all 0.15s ease;
}
.tag-mes-mots-del:hover,
.tag-mes-mots-del:active {
	background: rgba(200, 25, 31, 0.08);
	color: #C8191F;
	opacity: 1;
}

/* Mode découverte : accents sage au lieu de gold */
body[data-mode="decouverte"] .tag-mes-mots-wrap {
	border-color: rgba(123, 164, 126, 0.3);
}
body[data-mode="decouverte"] .tag-mes-mots-del {
	border-left-color: rgba(123, 164, 126, 0.2);
}

/* ================================================== */
/* v1.4.11 — Tags issus de l'avis 7aboire (or/gold)  */
/* ================================================== */

.tag-toggle.tag-from-avis.selected {
	background: var(--gold, #A88658) !important;
	color: white !important;
	border-color: var(--gold, #A88658) !important;
	position: relative;
	padding-right: 22px !important;
}
.tag-toggle.tag-from-avis.selected::after {
	content: '✦';
	position: absolute;
	right: 7px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 10px;
	opacity: 0.9;
	line-height: 1;
}

/* Mode découverte : rester en sage (mais les avis ne s'affichent pas là en général) */
body[data-mode="decouverte"] .tag-toggle.tag-from-avis.selected {
	background: var(--sage, #7BA47E) !important;
	border-color: var(--sage, #7BA47E) !important;
}

/* Petit indicateur discret dans le titre de section pour rappeler la légende */
.fiche-section-cat .tag-legend {
	display: none;
}

/* ================================================== */
/* v1.5.0 — Hub perso redesigné : tuiles              */
/* ================================================== */
.hub-greeting {
	padding: 44px 20px 24px;
	text-align: center;
}
.hub-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 32px;
	font-weight: 500;
	line-height: 1.18;
	letter-spacing: -0.5px;
	margin: 6px 0 0;
}
.hub-title em {
	color: var(--wine, #6B1F2B);
	font-style: italic;
	font-size: 24px;
	line-height: 1.35;
	display: inline-block;
}
.hub-tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	padding: 8px 16px 20px;
	max-width: 640px;
	margin: 0 auto;
}
@media (max-width: 380px) { .hub-tiles { grid-template-columns: 1fr; } }
.hub-tile {
	position: relative;
	background: white;
	border: 1px solid rgba(28, 28, 28, 0.08);
	border-radius: 12px;
	padding: 22px 20px 20px;
	text-align: left;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	font-family: inherit;
	color: inherit;
}
.hub-tile:hover, .hub-tile:active {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(28, 28, 28, 0.06);
}
.hub-tile-icon {
	font-size: 28px;
	line-height: 1;
	margin-bottom: 12px;
}
.hub-tile-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 19px;
	font-weight: 500;
	color: var(--charcoal, #1C1C1C);
	line-height: 1.1;
	margin-bottom: 4px;
}
.hub-tile-hint {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12.5px;
	color: var(--gray, #6B6B6B);
}
.hub-tile-arrow {
	position: absolute;
	right: 16px;
	bottom: 14px;
	color: var(--wine, #6B1F2B);
	font-size: 14px;
}
.hub-tile-highlight {
	background: linear-gradient(135deg, #FBF7F2 0%, #F2E6E8 100%);
	border-color: rgba(107, 31, 43, 0.15);
}
.hub-tile-highlight .hub-tile-title { color: var(--wine, #6B1F2B); }

.hub-footer {
	padding: 20px 16px 40px;
	text-align: center;
}
.link-quiet {
	background: transparent;
	border: none;
	color: var(--gray, #6B6B6B);
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 13px;
	cursor: pointer;
	padding: 8px 12px;
}
.link-quiet:hover { color: var(--wine, #6B1F2B); }

/* Topbar back universel (sous-pages hub) */
.topbar-back {
	background: transparent;
	border: none;
	color: var(--charcoal, #1C1C1C);
	font-size: 13px;
	cursor: pointer;
	padding: 4px 8px;
	font-family: inherit;
}
.topbar-title-inline {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 15px;
	color: var(--gray, #6B6B6B);
}

/* ================================================== */
/* v1.5.0 — Ma cave                                   */
/* ================================================== */
.cave-header {
	padding: 32px 20px 12px;
	text-align: center;
}
.cave-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 30px;
	font-weight: 500;
	line-height: 1.1;
	margin: 4px 0 8px;
}
.cave-title em { color: var(--wine, #6B1F2B); font-style: italic; }
.cave-substats {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12.5px;
	color: var(--gray, #6B6B6B);
}
.cave-add-row {
	padding: 8px 20px 12px;
	text-align: center;
}
.cave-add-btn {
	font-size: 13px !important;
	padding: 8px 16px !important;
}
.cave-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 16px 12px;
	max-width: 640px;
	margin: 0 auto;
	justify-content: center;
}
.cave-filter {
	background: transparent;
	border: 1px solid var(--gray-light, #D8CFC8);
	border-radius: 16px;
	padding: 5px 12px;
	font-size: 12px;
	color: var(--gray, #6B6B6B);
	cursor: pointer;
	font-family: inherit;
}
.cave-filter.active {
	background: var(--wine, #6B1F2B);
	border-color: var(--wine, #6B1F2B);
	color: white;
}
.cave-filter-empty {
	text-align: center;
	padding: 32px 20px;
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	color: var(--gray, #6B6B6B);
	font-size: 14px;
}
.cave-list {
	padding: 4px 16px 40px;
	max-width: 640px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cave-entry {
	background: white;
	border: 1px solid rgba(28, 28, 28, 0.08);
	border-radius: 10px;
	padding: 14px 16px 12px;
}
.cave-entry-terminee { opacity: 0.55; }
.cave-entry-a_essayer { border-left: 3px solid var(--gold, #A88658); }
.cave-entry-ouverte { border-left: 3px solid var(--wine, #6B1F2B); }
.cave-entry-head { margin-bottom: 8px; }
.cave-entry-titre {
	font-family: var(--serif, Georgia, serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.15;
	color: var(--charcoal, #1C1C1C);
}
.cave-entry-meta {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 12.5px;
	color: var(--gray, #6B6B6B);
	margin-top: 2px;
}
.cave-entry-vigneron {
	font-size: 11.5px;
	color: var(--charcoal-soft, #3A3A3A);
	margin-top: 3px;
}
.cave-entry-badge {
	display: inline-block;
	font-size: 9px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--gold, #A88658);
	border: 1px solid var(--gold, #A88658);
	border-radius: 10px;
	padding: 2px 6px;
	margin-top: 6px;
}
.cave-entry-qty-line {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px dashed rgba(28, 28, 28, 0.1);
	margin-top: 6px;
}
.cave-statut-badge {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
}
.cave-entry-qty {
	font-size: 12px;
	color: var(--charcoal-soft, #3A3A3A);
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
}
.cave-entry-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}
.btn-mini {
	background: white;
	border: 1px solid var(--gray-light, #D8CFC8);
	color: var(--charcoal, #1C1C1C);
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	font-family: inherit;
}
.btn-mini-primary {
	background: var(--wine, #6B1F2B);
	border-color: var(--wine, #6B1F2B);
	color: white;
}
.btn-mini-quiet {
	background: transparent;
	border-color: transparent;
	color: var(--gray, #6B6B6B);
	margin-left: auto;
	padding: 6px 10px;
	font-size: 14px;
}
.btn-mini-quiet:hover { color: #C8191F; background: rgba(200, 25, 31, 0.06); }

/* Formulaire add cave */
.add-cave-intro {
	padding: 32px 20px 20px;
	text-align: center;
	max-width: 480px;
	margin: 0 auto;
}
.add-cave-title {
	font-family: var(--serif, Georgia, serif);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.15;
	margin: 4px 0 12px;
}
.add-cave-hint {
	font-family: var(--serif, Georgia, serif);
	font-style: italic;
	font-size: 14px;
	color: var(--gray, #6B6B6B);
	line-height: 1.5;
}
.add-cave-form {
	padding: 12px 20px 40px;
	max-width: 480px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wine, #6B1F2B);
	font-weight: 600;
}
.form-field input, .form-field select {
	border: 1px solid var(--gray-light, #D8CFC8);
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 15px;
	font-family: inherit;
	background: white;
}
.form-field input:focus, .form-field select:focus {
	outline: none;
	border-color: var(--wine, #6B1F2B);
}
.add-cave-actions {
	display: flex;
	gap: 10px;
	margin-top: 12px;
}
.add-cave-actions .btn { flex: 1; }
