/**
 * BrewRecipes mobile v1.8 — liste + fiche résumé (< 768 px).
 * Maquette : docs/design/brewrecipes-mobile-v1.8-mockup.html
 */

.brew-mobile-details-nav,
.brew-mobile-details-back,
.brew-mobile-view-target,
.brew-mobile-view-breadcrumb-top,
.brew-mobile-view-breadcrumb-footer {
	display: none;
}

@media (min-width: 768px) {
	.brew-mobile-shell,
	.brew-mobile-view-shell {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.phpbb-ads-center {
		display: none !important;
	}

	.brew-mobile-shell {
		display: block;
		box-sizing: border-box;
		padding: 0 14px 1rem;
		margin: 0 0 1rem;
	}

	/* Shell mobile + grille existante (une seule boucle recipes) */
	.brew-desktop-list .brew-list-header,
	.brew-desktop-list > form.brewrecipes-toolbar,
	.brew-desktop-list .brewrecipes-help-toolbar,
	.brew-desktop-list .brewrecipes-admin-toolbar,
	.brew-desktop-list > .brew-tip-of-the-day {
		display: none !important;
	}

	.brew-desktop-list .brew-grid-header {
		display: none;
	}

	/* Admin toolbar masqué sur mobile — pas de cases à cocher orphelines */
	.brew-desktop-list label.brew-admin-select,
	.brew-desktop-list label.brew-admin-select-all {
		display: contents;
	}

	.brew-desktop-list label.brew-admin-select input[type="checkbox"],
	.brew-desktop-list label.brew-admin-select-all input[type="checkbox"] {
		display: none !important;
	}

	.brew-desktop-list .brewrecipes-footer {
		margin-top: 0;
	}

	.brew-mobile-list-heading {
		margin-bottom: 12px;
	}

	.brew-mobile-list-heading .brewrecipes-title {
		margin: 0;
		font-size: 1.15rem;
		line-height: 1.35;
	}

	.brew-mobile-list-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 14px;
	}

	.brew-mobile-list-actions .button {
		flex: 1 1 auto;
		min-width: calc(50% - 4px);
		text-align: center;
	}

	.brew-mobile-filter-form .brew-mobile-field {
		margin-bottom: 10px;
	}

	.brew-mobile-filter-form label {
		display: block;
		font-size: 12px;
		color: #5a6570;
		margin-bottom: 4px;
	}

	.brew-mobile-filter-form .inputbox {
		width: 100%;
		box-sizing: border-box;
		font-size: 15px;
		padding: 10px;
		border-radius: 8px;
		min-height: 44px;
	}

	/* Boutons mobile — même hauteur tactile que les champs filtre liste */
	.brew-mobile-shell .button,
	.brew-mobile-view-shell .button,
	.brew-mobile-details-nav .button,
	.brew-mobile-details-back .button,
	.brew-desktop-list .brewrecipes-footer .button,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-edit-form .button,
	.brewrecipe-view-page.brew-mobile-recipe-ui .brew-recipe-comments-section .button {
		min-height: 44px;
		padding: 10px 12px;
		font-size: 15px;
		line-height: 1.25;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.brew-mobile-filter-submit {
		width: 100%;
		margin-bottom: 8px;
	}

	.brew-mobile-filter-show-all {
		display: block;
		width: 100%;
		margin-bottom: 14px;
		text-align: center;
		box-sizing: border-box;
	}

	.brew-mobile-shell .brew-tip-of-the-day {
		margin-bottom: 10px;
		padding: 10px 12px;
		border-radius: 8px;
		font-size: 13px;
		line-height: 1.45;
	}

	.brew-mobile-shell .brew-tip-of-the-day__kicker {
		margin: 0 0 6px;
	}

	.brew-mobile-shell .brew-tip-of-the-day__body {
		margin: 0;
	}

	.brew-mobile-list-legends {
		margin-bottom: 12px;
	}

	.brew-mobile-list-legends .brew-recipe-list-inline-legends {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px 14px;
	}

	.brew-desktop-list .forabg.brewrecipes-grid-list {
		margin-top: 0;
		border-radius: 10px;
		overflow: hidden;
	}

	.brew-desktop-list .brewrecipes-footer {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.brew-desktop-list .brewrecipes-pagination {
		justify-content: center;
	}

	/* Carte liste : toute la ligne ouvre la fiche (lien titre étiré sur la row) */
	.brew-desktop-list .brew-grid-row {
		position: relative;
		cursor: pointer;
	}

	.brew-desktop-list .brew-recipe-title::after {
		content: '';
		position: absolute;
		inset: 0;
		z-index: 1;
	}

	.brew-desktop-list .brew-grid-row:has(.brew-recipe-title:hover) {
		filter: brightness(0.985);
	}

	/* ——— Fiche recette : résumé mobile ——— */
	.brew-mobile-view-shell {
		display: block;
		box-sizing: border-box;
		padding: 0 14px 1.25rem;
		margin: 0 0 1rem;
	}

	.brewrecipe-view-page:has(.brew-mobile-view-shell) .brew-desktop-view {
		display: none !important;
	}

	.brewrecipe-view-page:has(.brew-mobile-view-shell) .brew-desktop-view > .brewrecipes-view-breadcrumbs {
		display: none !important;
	}

	.brewrecipe-view-page:has(.brew-mobile-view-shell) .brew-view-header-top .brew-view-mode-select {
		display: none !important;
	}

	/* Sous-vues mobile : détails, notes, analyses */
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-mobile-view-shell,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-mobile-view-shell {
		display: none !important;
	}

	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-recipe-comments-section,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-recipe-comments-section {
		display: none !important;
	}

	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view {
		display: block !important;
		padding: 0 14px 1rem;
	}

	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brewrecipes-view-breadcrumbs:not(.brew-mobile-view-breadcrumb),
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brew-view-header-top,
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brew-import-preview-header,
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brewrecipe-main-panel,
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brew-view-edit-form,
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-desktop-view .brewrecipes-print-footer,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brewrecipes-view-breadcrumbs:not(.brew-mobile-view-breadcrumb),
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brew-view-header-top,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brew-import-preview-header,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brewrecipe-main-panel,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brew-view-edit-form,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-desktop-view .brewrecipes-print-footer {
		display: none !important;
	}

	.brew-mobile-details-back {
		margin: 0 0 12px;
		font-size: 14px;
	}

	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-mobile-details-back,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-mobile-details-back {
		display: block;
	}

	.brew-page:has(.brew-mobile-view-shell):has(#brew-mobile-recipe-notes:target) .brew-mobile-details-back,
	.brew-page:has(.brew-mobile-view-shell):has(#brew-mobile-recipe-analysis:target) .brew-mobile-details-back,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="notes"] .brew-mobile-details-back,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="analysis"] .brew-mobile-details-back {
		display: none !important;
	}

	.brew-mobile-view-target {
		display: block;
		height: 0;
		overflow: hidden;
		scroll-margin-top: 0;
	}

	/* ——— Détail recette ——— */
	.brew-page:has(#brew-mobile-recipe-details:target) .brew-desktop-view .panel:not(.brew-recipe-detail-panel),
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-desktop-view .panel:not(.brew-recipe-detail-panel) {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-desktop-view .brew-recipe-analysis,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-desktop-view .brew-recipe-analysis {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-mobile-details-nav,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-mobile-details-nav {
		display: flex;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-desktop-view .brew-recipe-detail-panel,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-desktop-view .brew-recipe-detail-panel {
		border-radius: 10px;
		margin-bottom: 10px;
		overflow: hidden;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-desktop-view .brew-recipe-detail-panel h2,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-desktop-view .brew-recipe-detail-panel h2 {
		font-size: 14px;
	}

	/* ——— Notes ——— */
	.brew-page:has(#brew-mobile-recipe-notes:target) .brew-desktop-view .panel:not(.brew-recipe-mobile-notes-panel),
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="notes"] .brew-desktop-view .panel:not(.brew-recipe-mobile-notes-panel) {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-notes:target) .brew-desktop-view .brew-recipe-analysis,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="notes"] .brew-desktop-view .brew-recipe-analysis {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-notes:target) .brew-desktop-view .brew-recipe-mobile-notes-panel,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="notes"] .brew-desktop-view .brew-recipe-mobile-notes-panel {
		border-radius: 10px;
		margin-bottom: 10px;
		overflow: hidden;
	}

	/* ——— Analyses ——— */
	.brew-page:has(#brew-mobile-recipe-analysis:target) .brew-desktop-view .panel:not(.brew-recipe-analysis),
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="analysis"] .brew-desktop-view .panel:not(.brew-recipe-analysis) {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-analysis:target) .brew-desktop-view .brew-recipe-analysis,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="analysis"] .brew-desktop-view .brew-recipe-analysis {
		border-radius: 10px;
		margin-bottom: 10px;
		overflow: hidden;
	}

	.brew-mobile-view-breadcrumb {
		font-size: 12px;
		line-height: 1.45;
		word-break: break-word;
	}

	.brew-mobile-view-breadcrumb-top {
		margin: 0 0 12px;
		padding-bottom: 0.75rem;
		border-bottom: 1px solid rgba(128, 128, 128, 0.2);
	}

	.brew-mobile-view-breadcrumb-footer {
		margin-top: 1rem;
		padding-top: 0.75rem;
		border-top: 1px solid rgba(128, 128, 128, 0.2);
	}

	.brew-mobile-view-shell .brew-mobile-view-breadcrumb-footer,
	.brew-page:has(.brew-mobile-view-shell):has(.brew-mobile-view-target:target) .brew-mobile-view-breadcrumb-footer,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview] .brew-mobile-view-breadcrumb-footer {
		display: block !important;
	}

	.brew-recipe-mobile-empty-state .brew-recipe-mobile-empty-message {
		margin: 0;
		font-size: 14px;
		line-height: 1.5;
		color: inherit;
		opacity: 0.85;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-mobile-details-back,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-mobile-details-back {
		display: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-recipe-detail-panel .table1.responsive tbody td.brew-recipe-ingredient-name-cell,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-recipe-detail-panel .table1.responsive tbody td.brew-recipe-ingredient-name-cell {
		font-size: 1.0625rem;
		font-weight: 700;
		line-height: 1.35;
		padding-top: 10px;
		padding-bottom: 10px;
		text-align: left;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-recipe-detail-panel .table1.responsive tbody td.brew-recipe-ingredient-name-cell::before,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-recipe-detail-panel .table1.responsive tbody td.brew-recipe-ingredient-name-cell::before {
		display: none !important;
		content: none !important;
	}

	.brew-page:has(#brew-mobile-recipe-details:target) .brew-recipe-detail-panel .table1.responsive tbody tr + tr td.brew-recipe-ingredient-name-cell,
	.brew-page.brew-mobile-recipe-ui[data-brew-mobile-subview="details"] .brew-recipe-detail-panel .table1.responsive tbody tr + tr td.brew-recipe-ingredient-name-cell {
		margin-top: 4px;
	}

	.brew-mobile-details-nav .brew-mobile-view-nav-btn {
		flex: 1 1 calc(50% - 4px);
		min-width: calc(50% - 4px);
		text-align: center;
		box-sizing: border-box;
		white-space: normal;
	}

	.brew-mobile-view-title {
		margin: 10px 0 8px;
		font-size: 1.2rem;
		line-height: 1.35;
		text-align: center;
		font-weight: 700;
		color: #0059b3;
	}

	.brew-mobile-view-style {
		margin: 0 0 12px;
		font-size: 13px;
		text-align: center;
		line-height: 1.4;
	}

	.brew-mobile-view-style-code {
		font-weight: 600;
	}

	.brew-mobile-view-hero {
		display: flex;
		justify-content: center;
		margin: 0 0 14px;
	}

	.brew-mobile-view-glass-frame {
		margin: 0 auto;
	}

	.brew-mobile-view-author {
		margin: 0 0 22px;
		padding: 0 4px;
		border: none;
	}

	.brew-mobile-view-author.brew-view-meta-block {
		border-right: none;
		border-bottom: none;
		padding: 0 4px;
	}

	.brew-mobile-view-author .brew-view-meta-item {
		text-align: center;
	}

	.brew-mobile-view-author-label {
		display: block;
		width: 100%;
		font-size: 11px;
		font-weight: 600;
		margin-bottom: 8px;
		opacity: 0.85;
		text-align: center;
	}

	.brew-mobile-view-author-body {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
	}

	.brew-mobile-view-author .brew-view-author-line {
		justify-content: center;
	}

	.brew-mobile-view-author-meta {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
	}

	.brew-mobile-view-author-meta .brew-author-profile {
		display: block;
		text-align: center;
	}

	.brew-mobile-view-author .brew-view-muted,
	.brew-mobile-view-author .brew-mobile-view-author-recipes {
		display: block;
		margin-bottom: 0;
		text-align: center;
		color: #666;
		font-size: 0.9em;
		opacity: 0.7;
		line-height: 1.35;
	}

	.brew-mobile-view-author-recipes {
		text-decoration: none;
	}

	.brew-mobile-view-author-recipes:hover {
		text-decoration: underline;
	}

	.brew-mobile-view-photo {
		max-width: 100%;
		height: auto;
		border-radius: 10px;
	}

	.brew-mobile-view-stats.brew-view-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 12px;
		margin-bottom: 14px;
	}

	.brew-mobile-view-stats .brew-view-stat {
		min-height: 64px;
		grid-template-columns: 32px minmax(0, 1fr);
		gap: 8px;
	}

	.brew-mobile-view-stats .brew-view-stat strong {
		font-size: 11px;
	}

	.brew-mobile-view-stats .brew-view-stat em {
		font-size: 14px;
	}

	.brew-mobile-view-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 10px;
	}

	.brew-mobile-view-actions .button,
	.brew-mobile-view-actions .brew-mobile-delete-form {
		flex: 1 1 calc(50% - 4px);
		min-width: calc(50% - 4px);
		margin: 0;
		text-align: center;
		box-sizing: border-box;
	}

	.brew-mobile-view-actions--author .brew-mobile-delete-form {
		display: flex;
	}

	.brew-mobile-view-actions--author .brew-mobile-delete-form .button {
		width: 100%;
	}

	.brew-mobile-favorite-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		flex: 1 1 100%;
		min-width: 100%;
	}

	.brew-mobile-favorite-form {
		flex: 1 1 100%;
		min-width: 100%;
		margin: 0;
	}

	.brew-mobile-favorite-form .brew-mobile-favorite-btn {
		width: 100%;
	}

	.brew-mobile-favorite-label {
		color: inherit;
	}

	.brew-mobile-favorite-btn .brew-mobile-favorite-heart {
		font-size: 1.1rem;
		line-height: 1;
		transform: none;
	}

	.brew-mobile-favorite-btn .brew-favorite-heart-empty {
		color: #0059b3;
	}

	.brew-mobile-favorite-btn .brew-favorite-heart-full {
		color: #d61f2c;
	}

	.brew-mobile-share-btn,
	.brew-mobile-edit-recipe-btn,
	.brew-mobile-calendar-link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 6px;
		text-decoration: none;
	}

	.brew-mobile-calendar-link {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.brew-mobile-share-btn .brew-mobile-share-icon {
		width: 18px;
		height: 18px;
		flex-shrink: 0;
	}

	.brew-mobile-view-details-link {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 44px;
		margin-top: 8px;
		padding: 10px 12px;
		text-align: center;
		text-decoration: none;
		line-height: 1.35;
		box-sizing: border-box;
		white-space: normal;
	}

	.brew-mobile-view-details-main {
		display: block;
		font-size: 1rem;
		font-weight: 600;
	}

	.brew-mobile-view-details-sub {
		display: block;
		margin-top: 4px;
		font-weight: 400;
		font-size: 12px;
		opacity: 0.85;
	}

	.brew-recipe-comments-section {
		box-sizing: border-box;
		padding: 0 14px 1.25rem;
		margin-top: 4px;
	}

	.brew-recipe-comments-section .brew-recipe-comments-panel {
		border-radius: 10px;
		overflow: hidden;
	}

	.brew-recipe-comments-section .brew-comment-form textarea,
	.brew-recipe-comments-section .brew-comment-form select {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.brew-recipe-comments-section .brew-comment-form .inputbox {
		font-size: 15px;
	}

	/* ——— Édition recette mobile ——— */
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-desktop-view {
		display: block !important;
		box-sizing: border-box;
		padding: 0 14px 1.25rem;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-desktop-view > .brewrecipes-view-breadcrumbs,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-header-top,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-desktop-view > .panel:not(.brew-view-edit-form),
	.brewrecipe-view-page.brew-mobile-edit-ui .brewrecipes-print-footer,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-details-back,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-view-target,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-details-nav,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-view-breadcrumb-footer {
		display: none !important;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-edit-form {
		display: block !important;
		border-radius: 10px;
		margin: 0 0 10px;
		overflow: hidden;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-edit-form textarea.inputbox,
	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-edit-form input[type="text"] {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		font-size: 15px;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-form-actions {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-view-form-actions .button {
		flex: 1 1 calc(50% - 4px);
		min-width: calc(50% - 4px);
		margin: 0;
		text-align: center;
		box-sizing: border-box;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-edit-footer {
		display: flex;
		margin: 0;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-edit-footer .brew-mobile-delete-form {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.brewrecipe-view-page.brew-mobile-edit-ui .brew-mobile-edit-footer .brew-mobile-delete-form .button {
		width: 100%;
	}
}

/* ——— Timeline mobile (shell smartphone, paysage requis) ———
 * Hors @media max-width : en paysage la largeur dépasse souvent 768 px (ex. iPhone ~844 px).
 */

.brew-mobile-timeline-portrait-gate,
.brew-mobile-timeline-nav {
	display: none;
}

.brew-mobile-timeline-shell .brew-mobile-timeline-content[hidden] {
	display: none !important;
}

.brew-mobile-timeline-shell .brew-mobile-timeline-portrait-gate[hidden] {
	display: none !important;
}

.brew-mobile-timeline-shell {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	box-sizing: border-box;
}

.brew-mobile-timeline-shell .brew-mobile-timeline-nav {
	display: block;
	flex-shrink: 0;
	box-sizing: border-box;
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
	margin-top: auto;
	background: #fff;
	border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-mobile-timeline-nav {
	padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
}

.brew-mobile-timeline-breadcrumb-footer {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

@media (orientation: portrait) {
	.brew-mobile-timeline-shell .brew-mobile-timeline-portrait-gate:not([hidden]) {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		padding: 24px 20px;
		background: #fff;
		text-align: center;
	}

	.brew-mobile-timeline-shell .brew-mobile-timeline-portrait-gate__message {
		margin: 0;
		max-width: 18rem;
		font-size: 1rem;
		line-height: 1.45;
		color: #2c3e50;
	}
}

/* Paysage : classe posée par brewrecipes_mobile_timeline.js (plus fiable que seul orientation: landscape). */
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape.brew-page {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-mobile-timeline-content:not([hidden]) {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	padding: 4px 0 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .breadcrumbs,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-view-header-top,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-footer,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-recipe-analysis,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-page-extras,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-narrow-notice {
	display: none !important;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart.brew-timeline-bleed,
.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart.brew-timeline-desktop-only {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100vw;
	max-width: 100vw;
	margin-top: 0;
	margin-bottom: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0;
	box-sizing: border-box;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart .inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	padding: 4px 5px 8px;
	box-sizing: border-box;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-chart-stack {
	width: 100%;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-plot {
	margin-top: 0;
	flex: 1 1 auto;
	height: auto;
	min-height: 260px;
	max-height: none;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-timeline-plot .brew-timeline-svg {
	height: auto;
	max-height: none;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-tl-phase-band {
	margin: 0;
	padding: 10px 0 0;
	flex-shrink: 0;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-tl-phase-band-track {
	min-height: 2rem;
	overflow: visible;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-tl-phase-icon-slot {
	height: 2rem;
	min-height: 2rem;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-tl-phase-icon {
	width: 1.55rem;
	max-height: 2rem;
}

.brew-mobile-timeline-shell.brew-mobile-timeline-landscape .brew-tl-phase-label {
	font-size: 0.5rem;
	line-height: 1.1;
}

body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-header,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-footer,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) .phpbb-ads-center,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-body > .forabg,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-body > .panel,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #information,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #phpbb_announcement {
	display: none !important;
}

/* Prosilver : .wrap limite à 1152px + padding 15px — neutraliser en paysage mobile. */
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #wrap,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #wrap {
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	box-sizing: border-box;
	overflow-x: visible;
}

body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-body,
body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) #page-body > .inner,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-body,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-body > .inner {
	width: 100%;
	max-width: none;
	min-width: 0;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow-x: visible;
}

body:has(.brew-mobile-timeline-shell.brew-mobile-timeline-landscape) .brewrecipes-copyright {
	display: none !important;
}

/* ——— Fiche mobile : résumé (portrait) ↔ timeline (paysage), même URL ——— */

.brew-mobile-recipe-timeline-embed {
	display: none !important;
	position: fixed;
	inset: 0;
	z-index: 200;
	box-sizing: border-box;
	pointer-events: none;
	visibility: hidden;
}

/* Pré-rendu paysage : layout invisible (pas de flash blanc), le résumé reste visible. */
.brew-page.brew-mobile-recipe-timeline-prerender .brew-mobile-recipe-timeline-embed {
	display: flex !important;
	flex-direction: column;
	min-height: 100dvh;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 0;
}

.brew-page.brew-mobile-recipe-timeline-prerender .brew-mobile-view-shell {
	position: relative;
	z-index: 1;
}

.brew-page.brew-mobile-recipe-timeline-prerender .brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-mobile-timeline-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	padding: 4px 0 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

.brew-page.brew-mobile-recipe-timeline-prerender .brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart.brew-timeline-desktop-only {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
}

.brew-mobile-timeline-orientation-hint {
	margin: 12px 0 0;
	padding: 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #5a6570;
	text-align: center;
}

/* Paysage smartphone (>767 px de large) : même logique que @media max-width, sans impacter le desktop. */
.brew-page.brew-mobile-recipe-ui:has(.brew-mobile-view-shell):not(:has(.brew-mobile-view-target:target)):not([data-brew-mobile-subview]) .brew-desktop-view {
	display: none !important;
}

.brew-page.brew-mobile-recipe-landscape-timeline .brew-mobile-view-shell,
.brew-page.brew-mobile-recipe-landscape-timeline .brew-desktop-view,
.brew-page.brew-mobile-recipe-landscape-timeline .brew-recipe-comments-section {
	display: none !important;
}

.brew-page.brew-mobile-recipe-landscape-timeline .brew-mobile-recipe-timeline-embed {
	display: flex !important;
	flex-direction: column;
	position: fixed;
	inset: 0;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100vw;
	min-width: 100%;
	min-height: 100dvh;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	pointer-events: auto;
	visibility: visible;
	z-index: 200;
	background: #fff;
	overflow: hidden;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-mobile-timeline-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	padding: 4px 0 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart.brew-timeline-bleed,
.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart.brew-timeline-desktop-only,
.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-recipe-timeline-mobile-panel {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brewrecipe-timeline-panel--chart .inner {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	max-width: none;
	padding: 4px 5px 8px;
	box-sizing: border-box;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-tl-phase-band {
	margin: 0;
	padding: 10px 0 0;
	flex-shrink: 0;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-tl-phase-band-track {
	min-height: 2rem;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-tl-phase-icon-slot {
	height: 2rem;
	min-height: 2rem;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-tl-phase-icon {
	width: 1.55rem;
	max-height: 2rem;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-tl-phase-label {
	font-size: 0.5rem;
	line-height: 1.1;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-timeline-plot .brew-tl-empty-message {
	min-height: 0;
	height: 100%;
	padding: 1rem;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-timeline-chart-stack {
	width: 100%;
	max-width: none;
	margin: 0;
	box-sizing: border-box;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-timeline-plot {
	margin-top: 0;
	flex: 1 1 auto;
	height: auto;
	min-height: 260px;
	max-height: none;
	overflow: visible;
}

.brew-mobile-recipe-timeline-embed.brew-mobile-timeline-landscape .brew-timeline-plot .brew-timeline-svg {
	height: auto;
	max-height: none;
}

.brew-mobile-recipe-timeline-embed .brew-mobile-timeline-nav {
	display: none;
}

.brew-page.brew-mobile-recipe-landscape-timeline .brew-mobile-recipe-timeline-embed .brew-mobile-timeline-nav {
	display: block;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

body:has(.brew-page.brew-mobile-recipe-landscape-timeline) {
	overflow: hidden;
}

body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-header,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-footer,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) .phpbb-ads-center,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-body > .forabg,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #page-body > .panel,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #information,
body:has(.brew-page.brew-mobile-recipe-landscape-timeline) #phpbb_announcement {
	display: none !important;
}


body:has(.brew-page.brew-mobile-recipe-landscape-timeline) .brewrecipes-copyright {
	display: none !important;
}

/* Page calendrier mobile (v1.9) */
.brew-mobile-calendar-shell {
	box-sizing: border-box;
	padding: 0 14px 1.25rem;
}

.brew-mobile-calendar-shell .brew-brew-calendar-panel {
	margin-top: 8px;
	border-radius: 10px;
	overflow: hidden;
}

.brew-mobile-calendar-shell .brew-brew-calendar-panel .inner {
	max-width: none;
	padding: 14px 12px 16px;
}

.brew-mobile-calendar-shell .brew-brew-calendar-title {
	font-size: 1.05rem;
	margin-bottom: 1rem;
}

.brew-mobile-calendar-shell .brew-brew-calendar-layout {
	display: block;
}

.brew-mobile-calendar-shell .brew-brew-calendar-preview-wrap {
	margin-top: 1.25rem;
}

.brew-mobile-calendar-shell .brew-brew-calendar-actions {
	flex-direction: column;
	align-items: stretch;
}

.brew-mobile-calendar-shell .brew-brew-calendar-actions .button {
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

.brew-mobile-calendar-shell .brew-brew-calendar-time {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

.brew-mobile-calendar-shell .brew-mobile-view-breadcrumb {
	margin-bottom: 0.5rem;
}

