/*
 * BrewRecipes - styles phpBB-native.
 * Liste, fiche recette, import BeerXML, commentaires et navigation.
 */

/* -------------------------------------------------------------------------
   Liste des recettes : en-tête, filtres, actions
   ------------------------------------------------------------------------- */

.brewrecipes-title {
    margin-bottom: 4px;
}

.brewrecipes-description {
    margin: 0 0 4px !important;
    opacity: .75;
}

.brew-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin: 0 !important;
}

.brew-list-header-text h2,
.brew-list-header-text p {
    margin-top: 0;
}

.brew-list-header-actions {
    flex-shrink: 0;
    padding-top: 4px;
}

.brew-import-preview-header--before-analysis {
    margin: 1rem 0 !important;
}

.brew-import-preview-header--before-analysis .brew-list-header-text h2,
.brew-import-preview-header--before-analysis .brew-list-header-text p,
.brew-import-preview-header--before-analysis .brew-list-header-text strong {
    color: #bc2a4d;
}

/* Preview export réparé (v1.7) — couleurs centralisées (repair_export_display.php) */
:root {
    --brew-repair-diff-added-bg: #e8f5e9;
    --brew-repair-diff-added-color: #2a7a2a;
    --brew-repair-diff-modified-bg: #e3f2fd;
    --brew-repair-diff-modified-color: #1565c0;
}

.brew-repair-diff-added,
tr.brew-repair-diff-added td,
.brew-view-stat.brew-repair-diff-added {
    background-color: var(--brew-repair-diff-added-bg);
}

.brew-repair-diff-modified,
tr.brew-repair-diff-modified td,
.brew-view-stat.brew-repair-diff-modified {
    background-color: var(--brew-repair-diff-modified-bg);
}

.brew-repair-diff-legend {
    margin: 0.75rem 0 0;
    font-size: 0.95em;
    color: #000;
}

.brew-repair-diff-legend strong {
    color: #000;
    font-weight: 400;
}

.brew-repair-diff-legend__sample {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.2em 0.55em;
    border-radius: 3px;
    font-weight: 400;
    color: #000;
}

.brew-repair-diff-legend__sample.brew-repair-diff-added {
    background-color: var(--brew-repair-diff-added-bg);
    color: #000;
}

.brew-repair-diff-legend__sample.brew-repair-diff-modified {
    background-color: var(--brew-repair-diff-modified-bg);
    color: #000;
}

.brew-repair-export-preview-panel {
    margin-bottom: 1rem;
}

.brew-repair-export-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.brew-repair-save-as-new-form {
    display: inline;
    margin: 0;
}

.brew-repair-export-applied {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.brewrecipes-toolbar {
    margin-top: 0 !important;
    margin-bottom: 8px;
}

.brewrecipes-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
}

.brewrecipes-toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brewrecipes-toolbar select {
    margin: 0 5px;
}

.brewrecipes-filter-panel {
    display: none;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(128, 128, 128, .18);
}

.brewrecipes-filter-panel.is-open {
    display: block;
}

.brew-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px 18px;
    align-items: end;
}

.brew-filter-grid label {
    display: block;
    font-weight: bold;
}

.brew-filter-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brew-filter-field-title {
    font-weight: bold;
}

.brew-filter-search-everywhere {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    font-weight: normal;
    font-size: 0.9em;
    white-space: nowrap;
}

.brew-filter-search-everywhere-label {
    color: #4a5a66;
}

.brew-filter-search-everywhere-input {
    margin: 0;
    flex-shrink: 0;
}

.brew-filter-grid .inputbox {
    margin-top: 5px;
    width: 100%;
    max-width: none;
}

.brew-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.brewrecipes-toolbar .brew-filter-actions .button,
.brewrecipes-toolbar .brew-filter-actions input.button {
    display: inline-block;
    width: auto;
    min-width: 0;
    margin: 0;
    white-space: nowrap;
}

.brew-my-recipes-row {
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Filtres sliders
   ------------------------------------------------------------------------- */

.brew-slider-filter {
    padding: 10px 12px;
    border: 1px solid rgba(128, 128, 128, .18);
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
}

.brew-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.brew-slider-value {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(128, 128, 128, .12);
    font-size: .9em;
    white-space: nowrap;
}

.brew-slider-filter input[type="range"] {
    width: 100%;
    margin: 2px 0 6px;
}

.brew-slider-ebc-layout {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.brew-slider-control {
    min-width: 0;
}

.brew-slider-glass-image {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 50px;
    overflow: hidden;
    justify-self: center;
    opacity: 1;
    transition: opacity .12s ease;
}

.brew-slider-glass-image.is-disabled {
    opacity: .32;
}

.brew-slider-glass-image .brew-glass-color,
.brew-slider-glass-image .brew-glass-mask {
    position: absolute;
    display: block;
}

.brew-slider-glass-image .brew-glass-color {
    left: 1px;
    right: 1px;
    top: 4px;
    bottom: 2px;
    background-image: url("/forum/images/beer_color.jpg");
    background-repeat: no-repeat;
    background-size: 620px 50px;
    background-position: var(--ebc-position, 0%) center;
    clip-path: polygon(2% 0%, 98% 0%, 86% 100%, 14% 100%);
    z-index: 1;
}

.brew-slider-glass-image .brew-glass-mask {
    inset: 0;
    background-image: url("/forum/images/beer_glass.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    z-index: 2;
}

.brew-slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: .85em;
    opacity: .75;
}

/* -------------------------------------------------------------------------
   Liste des recettes : grille
   ------------------------------------------------------------------------- */

.brewrecipes-grid-list .inner {
    padding: 0;
}

.brew-grid-header,
.brew-grid-row {
    display: grid;
    grid-template-columns:
        72px
        2.05fr
        1fr
        .62fr
        .95fr
        1.05fr
        70px
        70px
        38px;
    align-items: center;
}

.brew-grid-header {
    font-weight: bold;
    text-transform: uppercase;
}

.brew-grid-header .brew-cell {
    padding: 10px 12px;
}

.brew-grid-row {
    min-height: 74px;
    border-top: 1px solid rgba(128, 128, 128, .18);
}

.brew-grid-row:hover {
    filter: brightness(.985);
}

.brew-cell {
    box-sizing: border-box;
    padding: 12px;
    min-width: 0;
}

.brew-cell-ebc,
.brew-cell-date,
.brew-cell-rating,
.brew-cell-ibu,
.brew-cell-abv {
    text-align: center;
}

.brew-cell-ebc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.brew-cell-recipe,
.brew-cell-brewer,
.brew-cell-style {
    text-align: left;
}

.brew-cell-rating {
    white-space: nowrap;
}

.brew-sort-link {
    color: inherit;
    text-decoration: none;
}

.brew-sort-link:hover {
    text-decoration: underline;
}

.brew-sort-link span {
    font-size: .9em;
    opacity: .85;
}

.brew-recipe-title {
    font-weight: bold;
}

.brew-recipe-list-ai-icon {
    width: 16px;
    height: 16px;
    margin-left: .35rem;
    margin-right: 0;
    vertical-align: -2px;
}

.brew-recipe-list-repair-emoji {
    margin-left: .25rem;
    font-size: .95em;
    line-height: 1;
    vertical-align: -1px;
    cursor: help;
}

.brew-recipe-list-header {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
}

.brew-recipe-list-inline-legends {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
}

.brew-grid-header .brew-recipe-list-ai-legend,
.brew-grid-header .brew-recipe-list-repair-legend,
.brew-mobile-list-legends .brew-recipe-list-ai-legend,
.brew-mobile-list-legends .brew-recipe-list-repair-legend {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: none;
    color: #4a5a66;
    white-space: nowrap;
}

.brew-grid-header .brew-recipe-list-ai-legend .brew-recipe-list-ai-icon {
    width: 14px;
    height: 14px;
    margin: 0;
    vertical-align: 0;
}

.brew-mobile-list-legends .brew-recipe-list-ai-legend .brew-recipe-list-ai-icon {
    width: 14px;
    height: 14px;
    margin: 0;
    vertical-align: 0;
}

.brew-recipe-notes {
    margin-top: 4px;
    font-size: .92em;
    line-height: 1.35;
    opacity: .72;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brew-matched-ingredients {
    margin-top: 5px;
    font-size: .86em;
    line-height: 1.35;
    color: inherit;
    opacity: 1;
}

.brew-matched-ingredients strong {
    font-weight: 600;
}

.brew-cell-style span {
    opacity: .85;
}

/* -------------------------------------------------------------------------
   Verres EBC : miniature liste / filtres
   ------------------------------------------------------------------------- */

.brew-glass-image {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 44px;
    overflow: hidden;
}

.brew-glass-color,
.brew-glass-mask {
    position: absolute;
    inset: 0;
    display: block;
}

.brew-glass-color {
    left: 1px;
    right: 1px;
    top: 4px;
    bottom: 2px;
    background-image: url("/forum/images/beer_color.jpg");
    background-repeat: no-repeat;
    background-size: 540px 42px;
    background-position: var(--ebc-position) center;
    clip-path: polygon(2% 0%, 98% 0%, 86% 100%, 14% 100%);
    z-index: 1;
}

.brew-glass-mask {
    background-image: url("/forum/images/beer_glass.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    z-index: 2;
}

.brew-ebc-value {
    font-size: .85em;
    line-height: 1;
    opacity: .85;
}

/* -------------------------------------------------------------------------
   Utilisateurs / avatars
   ------------------------------------------------------------------------- */

.brew-user {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.brew-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(128, 128, 128, .12);
    font-size: .85em;
    font-weight: bold;
}

.brew-user-avatar img {
    width: 28px !important;
    height: 28px !important;
    object-fit: cover;
    border-radius: 50%;
}

.brew-user-avatar-fallback {
    opacity: .85;
}

.brew-mobile-details {
    display: none;
    margin-top: 4px;
    opacity: .8;
}

/* -------------------------------------------------------------------------
   Footer liste / pagination
   ------------------------------------------------------------------------- */

.brewrecipes-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brewrecipes-pagination {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.brewrecipes-count {
    min-width: 0;
}

/* -------------------------------------------------------------------------
   Fiche recette
   ------------------------------------------------------------------------- */

.brewrecipe-view-page .breadcrumbs {
    margin-bottom: 10px;
}

.brew-view-header {
    margin: 4px 0 16px;
}

.brew-view-header h1 {
    margin: 0 0 4px;
    font-size: 2.1em;
    line-height: 1.1;
    color: inherit;
}

.brew-view-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
}

.brew-view-header-main .brew-view-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 8px;
    width: 100%;
    margin: 0 0 4px;
}

.brew-view-header-main .brew-view-title-row .brew-view-recipe-name {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 2.1em;
    line-height: 1.1;
}

.brew-view-header-main .brew-view-title-row .brew-favorite-title-form {
    flex: 0 0 auto;
    order: -1;
    margin: 0;
}

.brew-view-header-main .brew-view-title-row .brew-favorite-title-button {
    flex: 0 0 auto;
    order: -1;
}

.brew-view-header-main .brew-view-title-row .brew-view-title-actions {
    flex: 0 0 auto;
    margin-left: auto;
}

.brew-view-header-top .brew-view-header-main {
    grid-column: 1;
    justify-self: start;
    align-self: start;
}

.brew-view-header-top .brew-view-mode-select,
.brew-recipe-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.brew-view-header-top .brew-view-mode-select {
    grid-column: 2;
    justify-self: center;
    align-self: center;
}

.brew-view-header-top .brew-view-header-actions {
    grid-column: 3;
    justify-self: end;
    align-self: start;
    margin-left: 0;
}

.brew-view-mode-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 6px;
}

.brew-view-mode-item--active {
    cursor: default;
}

.brew-view-mode-item--link {
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.brew-view-mode-item--link:hover,
.brew-view-mode-item--link:focus {
    background-color: rgba(0, 89, 179, 0.08);
    outline: none;
}

.brew-view-mode-icon {
    display: block;
    width: 32px;
    height: 32px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 28px 28px;
}

.brew-view-mode-icon--recipe {
    background-image: url("./images/icon-recipe-muted.svg");
}

.brew-view-mode-item--active .brew-view-mode-icon--recipe {
    background-image: url("./images/icon-recipe-active.svg");
}

.brew-view-mode-icon--timeline {
    background-image: url("./images/icon-timeline-muted.svg");
}

.brew-view-mode-item--active .brew-view-mode-icon--timeline {
    background-image: url("./images/icon-timeline-active.svg");
}

.brewrecipe-timeline-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: visible;
}

.brew-timeline-print-logo img {
    max-height: 48px;
    width: auto;
    height: auto;
}

/* Autoriser le débordement du panneau chart hors colonne phpBB */
#wrap:has(.brew-timeline-bleed),
#page-body:has(.brew-timeline-bleed),
#page-body:has(.brew-timeline-bleed) > .inner,
#page-body:has(.brew-timeline-bleed) .content,
.post:has(.brew-timeline-bleed),
.brewrecipe-timeline-page:has(.brew-timeline-bleed) {
    overflow-x: visible;
}

/* Panneau chart (fond blanc .panel) : pleine largeur viewport */
.brewrecipe-timeline-page .brewrecipe-timeline-panel--chart.brew-timeline-bleed {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: clamp(10px, 1.5vw, 20px);
    padding-right: clamp(10px, 1.5vw, 20px);
    box-sizing: border-box;
    overflow: visible;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel--chart.brew-timeline-bleed > .inner {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel .inner {
    padding: 12px 16px 16px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel--chart .inner {
    padding: 12px 12px 16px 10px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brew-timeline-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 14px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel--legend,
.brewrecipe-timeline-page .brewrecipe-timeline-panel--summary {
    margin: 0;
    min-width: 0;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel--legend .inner,
.brewrecipe-timeline-page .brewrecipe-timeline-panel--summary .inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 18px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.brewrecipe-timeline-page .brewrecipe-timeline-panel--summary .inner {
    gap: 14px;
}

.brewrecipe-timeline-page h2.brew-timeline-block-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid rgba(74, 90, 102, 0.22);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    flex-shrink: 0;
}

.brew-timeline-block-icon {
    flex-shrink: 0;
    display: inline-block;
    width: 26px;
    height: 26px;
    background-color: #0059b3;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.brew-timeline-block-icon--palette {
    mask-image: url("./images/icon-palette.svg");
    -webkit-mask-image: url("./images/icon-palette.svg");
}

.brew-timeline-block-icon--fourquet {
    mask-image: url("./images/icon-fourquet-opt.svg");
    -webkit-mask-image: url("./images/icon-fourquet-opt.svg");
}

.brew-timeline-block-icon--notes {
    mask-image: url("./images/icon-notes.svg");
    -webkit-mask-image: url("./images/icon-notes.svg");
}

.brewrecipe-timeline-page .brew-timeline-block-body {
    min-height: 2rem;
    margin: 0;
    padding: 0;
}

.brewrecipe-timeline-page .brew-timeline-summary-body {
    padding-top: 4px;
}

.brew-timeline-summary-layout {
    display: grid;
    grid-template-columns: auto minmax(10.5rem, max-content) minmax(0, 1fr);
    align-items: start;
    gap: 18px 22px;
    min-width: 0;
    margin-top: 0;
}

.brew-timeline-summary-glass {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.brew-timeline-summary-glass-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    margin: 0;
    padding: 5px;
    border-radius: 7px;
    box-shadow:
        0 0 0 3px #f9f9f9,
        0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Timeline summary glass — voir bloc après .brew-big-glass-mask (spécificité cascade) */

.brew-timeline-summary-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brew-timeline-summary-people {
    padding-right: 4px;
    border-right: 1px solid rgba(74, 90, 102, 0.14);
}

.brew-timeline-summary-stats {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
}

.brew-timeline-summary-stat {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.brew-timeline-summary-stat--author {
    align-items: start;
}

.brew-timeline-summary-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    justify-self: center;
}

.brew-timeline-summary-avatar img {
    width: 38px !important;
    height: 38px !important;
}

.brew-timeline-summary-stat-text {
    min-width: 0;
}

.brew-timeline-summary-stat-text em a.brew-author-profile {
    color: inherit;
    text-decoration: none;
    font-style: normal;
}

.brew-timeline-summary-stat-text em a.brew-author-profile:hover {
    text-decoration: underline;
}

.brew-timeline-summary-stat .brew-view-icon {
    justify-self: center;
}

.brew-timeline-summary-stat--assistant .brew-view-icon {
    width: 26px;
    height: 26px;
}

.brew-timeline-summary-stat strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.brew-timeline-summary-stat em {
    display: block;
    font-style: normal;
    opacity: .95;
}

.brew-timeline-summary-people .brew-timeline-summary-calendar.brew-view-calendar-action {
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
}

.brew-timeline-summary-calendar:hover,
.brew-timeline-summary-calendar:focus {
    color: #900;
}

.brew-timeline-summary-calendar:hover .brew-view-icon,
.brew-timeline-summary-calendar:focus .brew-view-icon {
    background-color: #d31141;
}

.brew-timeline-summary-calendar:hover strong,
.brew-timeline-summary-calendar:focus strong {
    text-decoration: underline;
    outline: none;
}

.brew-timeline-legend-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.brew-timeline-legend-scale {
    min-width: 0;
}

.brew-timeline-legend-scale-title {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4a5a66;
    line-height: 1.2;
}

.brew-timeline-legend-gradient-frame {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(74, 90, 102, 0.12);
}

.brew-timeline-legend-gradient {
    display: block;
    width: 100%;
    height: 24px;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.brew-timeline-legend-labels {
    position: relative;
    height: 1.25em;
    margin-top: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #5a6a76;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.brew-timeline-legend-labels span {
    position: absolute;
    top: 0;
    white-space: nowrap;
    transform: translateX(-50%);
}

.brew-timeline-legend-labels span.is-edge-min {
    transform: translateX(0);
}

.brew-timeline-legend-labels span.is-edge-max {
    transform: translateX(-100%);
}

.brew-timeline-legend-swatches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(74, 90, 102, 0.18);
}

.brew-timeline-legend-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #3d4d58;
}

.brew-timeline-legend-swatch-icon {
    flex-shrink: 0;
    width: 28px;
    height: 20px;
    border: 1px solid rgba(74, 90, 102, 0.22);
    border-radius: 3px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.brew-timeline-legend-swatch-icon--water {
    border: none;
    box-shadow: none;
    width: 32px;
    height: 22px;
    background-color: #4a9fd4;
    mask-image: url("./images/icon-drop.svg");
    -webkit-mask-image: url("./images/icon-drop.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.brew-timeline-legend-swatch-label {
    min-width: 0;
}

/* Bandeau phases timeline (T4) — PNG icon_tl_*.png, alignés par la base */
.brew-tl-phase-icon-slot {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 4.5rem;
    min-height: 4.5rem;
}

.brew-tl-phase-icon {
    display: block;
    flex-shrink: 0;
    width: 3.25rem;
    height: 100%;
    max-height: 4.5rem;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
}

.brew-tl-phase-icon--brassage { background-image: url("./images/icon_tl_brassage.png"); }
.brew-tl-phase-icon--filtration { background-image: url("./images/icon_tl_filtration.png"); }
.brew-tl-phase-icon--ebullition { background-image: url("./images/icon_tl_ebullition.png"); }
.brew-tl-phase-icon--refroidissement { background-image: url("./images/icon_tl_refroidissement.png"); }
.brew-tl-phase-icon--fermentation { background-image: url("./images/icon_tl_fermentation.png"); }
.brew-tl-phase-icon--conditionnement { background-image: url("./images/icon_tl_conditionnement.png"); }
.brew-tl-phase-icon--garde { background-image: url("./images/icon_tl_garde.png"); }

.brew-timeline-svg .brew-tl-bar-packaging-icon {
    pointer-events: none;
}

/* Barres timeline — jalon 2 (couleur fill = attribut inline selon EBC de chaque malt) */
.brew-tl-bar-malt {
    stroke: rgba(74, 90, 102, 0.35);
}

.brew-tl-bar-malt--texture {
    stroke: none;
    pointer-events: none;
}

.brew-tl-bar-malt--tint {
    stroke: rgba(74, 90, 102, 0.35);
}

.brew-timeline-svg .brew-tl-bar-malt-label {
    font-size: 10px;
    font-weight: 600;
    fill: #1f2933;
    stroke: none;
    pointer-events: none;
}

.brew-timeline-svg .brew-tl-bar-malt-label--light {
    fill: #fff;
}

.brew-tl-bar-value {
    font-size: 10px;
    font-weight: 600;
    fill: #3d4d58;
    pointer-events: none;
}

/* Couleurs barres timeline */
.brew-tl-bar-misc {
    fill: #f2c4a0;
}

.brew-tl-bar-ferm {
    fill: #0059b3;
}

.brew-tl-bar-ferm--primary {
    fill: #0059b3;
}

.brew-tl-bar-ferm--secondary {
    fill: #4c9add;
}

.brew-tl-bar-ferm--tertiary {
    fill: #70b4e6;
}

.brew-tl-bar-ferm--aging {
    fill: #94c5ee;
}

.brew-timeline-svg .brew-tl-bar-ferm-label {
    font-size: 10px;
    font-weight: 600;
    fill: #fff;
    stroke: none;
    pointer-events: none;
    white-space: nowrap;
}

.brew-timeline-svg .brew-tl-bar-ferm-label--stacked {
    white-space: normal;
}

.brew-tl-bar-yeast {
    fill: #f0e6a8;
    stroke: rgba(74, 90, 102, 0.35);
}

.brew-timeline-svg .brew-tl-yeast-label,
.brew-timeline-svg .brew-tl-yeast-bar-label {
    font-size: 10px;
    font-weight: 600;
    fill: #1f2933;
    stroke: none;
    pointer-events: none;
}

/* Température : #d93025 (timeline_config::TEMP_COLOR) */
.brew-tl-temp-line {
    stroke: #d93025;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: none;
    pointer-events: none;
}

.brew-timeline-svg .brew-tl-temp-point-label {
    fill: #d93025;
    font-size: 10px;
    font-weight: 600;
    stroke: none;
    pointer-events: none;
}

.brew-tl-bar-hop {
    stroke: rgba(40, 90, 55, 0.4);
}

.brew-tl-bar-hop--texture {
    stroke: none;
    pointer-events: none;
}

.brew-tl-bar-hop--tint {
    stroke: rgba(40, 90, 55, 0.4);
}

.brew-timeline-svg .brew-tl-bar-hop--narrow {
    stroke: rgba(40, 90, 55, 0.45);
}

.brew-timeline-svg .brew-tl-bar-hop--narrow.brew-tl-bar-hop--tint {
    stroke: rgba(40, 90, 55, 0.45);
}

.brew-timeline-svg .brew-tl-bar-hop-label,
.brew-timeline-svg .brew-tl-bar-hop-label--light,
.brew-timeline-svg .brew-tl-bar-hop-label--above,
.brew-timeline-svg .brew-tl-bar-hop-label--outside-left,
.brew-timeline-svg .brew-tl-bar-hop-label--boil-end,
.brew-timeline-svg .brew-tl-bar-hop-label--boil-end-overflow,
.brew-timeline-svg .brew-tl-bar-hop-label--vertical {
    font-size: 10px;
    font-weight: 600;
    fill: #fff;
    stroke: none;
    pointer-events: none;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.brew-timeline-svg .brew-tl-bar-hop-label-border {
    stroke: #fff;
    pointer-events: none;
}

@media (max-width: 768px) {
    .brew-timeline-legend-swatches {
        grid-template-columns: 1fr;
    }

    .brewrecipe-timeline-page .brew-timeline-footer {
        grid-template-columns: 1fr;
    }

    .brew-timeline-summary-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .brew-timeline-summary-glass {
        justify-self: center;
    }

    .brew-timeline-summary-people {
        width: 100%;
        max-width: 22rem;
        padding-right: 0;
        border-right: 0;
        border-bottom: 1px solid rgba(74, 90, 102, 0.14);
        padding-bottom: 12px;
    }

    .brew-timeline-summary-glass-frame {
        height: auto;
    }

    .brew-timeline-summary-big-glass.brew-big-glass {
        width: 64px;
        height: 112px;
    }

    .brew-timeline-summary-stats {
        width: 100%;
    }

    .brew-tl-phase-icon-slot {
        height: 3.25rem;
        min-height: 3.25rem;
    }

    .brew-tl-phase-icon {
        width: 2.5rem;
        max-height: 3.25rem;
    }

    .brew-tl-phase-label {
        font-size: 0.62rem;
    }
}

.brew-timeline-chart-stack {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Bandeau phases — aligné sur les durées (positions X via JS + layout.phaseBand) */
.brew-tl-phase-band {
    position: relative;
    margin: 20px 0 10px;
    padding: 0 0 1.35rem;
    box-sizing: border-box;
}

.brew-tl-phase-band-track {
    position: relative;
    width: 100%;
    min-height: 4.5rem;
    overflow: visible;
    /* Inset plot : positions % via JS (PAD_L + xNorm × plotW), pas de marges ici */
}

.brew-tl-phase-item {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    max-width: 8.5rem;
    text-align: center;
    transform: translateX(-50%);
    overflow: visible;
}

.brew-tl-phase-caption {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.brew-tl-phase-item--refroidissement {
    max-width: 5.5rem;
}

.brew-tl-phase-stats {
    position: absolute;
    top: 100%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: 2px;
    transform: translateX(-50%);
    min-height: 0;
    pointer-events: none;
}

.brew-tl-phase-stats[hidden] {
    display: none;
}

.brew-tl-phase-stat-line {
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.brew-tl-phase-stats--brassage .brew-tl-phase-stat-line {
    color: #e8941a;
}

.brew-tl-phase-stats--ebullition .brew-tl-phase-stat-line {
    color: #EA5027;
}

.brew-tl-phase-stats--fermentation .brew-tl-phase-stat-line {
    color: #70b4e6;
}

.brew-tl-phase-stats--garde .brew-tl-phase-stat-line {
    color: #94c5ee;
}

.brew-tl-phase-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    color: #3d4d58;
    hyphens: auto;
}

.brew-timeline-plot {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 500px;
    min-height: 500px;
    overflow-x: visible;
    overflow-y: hidden;
    box-sizing: border-box;
}

.brew-timeline-plot .error {
    margin: 1rem;
}

.brew-timeline-plot .brew-tl-empty-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    margin: 0;
    padding: 1.5rem;
    text-align: center;
    color: #4a5a66;
    font-size: 1.05rem;
    line-height: 1.45;
}

.brew-tl-missing-ferm-message {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 1rem 1.25rem;
    text-align: center;
    color: #c62828;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.brew-timeline-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 500px;
    margin: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 11px;
    overflow: visible;
}

.brew-tl-bg {
    fill: #fff;
}

/* Fonds zone de tracé — chaud (gauche) / froid (droite) ; voir timeline_config::PLOT_*_FILL */
.brew-tl-plot-hot {
    fill: #fdeee8;
    stroke: none;
}

.brew-tl-plot-cold {
    fill: #e8f2fa;
    stroke: none;
}

.brew-tl-water-fill {
    stroke: none;
    pointer-events: none;
}

.brew-tl-water-fill:not(.brew-tl-water-fill--image) {
    fill: rgba(26, 127, 212, 0.15);
}

.brew-tl-water-line {
    stroke: #1a7fd4;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    fill: none;
    pointer-events: none;
}

.brew-timeline-svg .brew-tl-water-point-label {
    fill: #1a7fd4;
    font-size: 10px;
    font-weight: 600;
    stroke: none;
    pointer-events: none;
}

.brew-tl-baseline {
    stroke: #4a5a66;
    stroke-width: 2;
}

.brew-tl-separator {
    stroke: #8a9aa8;
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
}

.brew-tl-axis-spine {
    stroke: #c5ced6;
    stroke-width: 1;
}

.brew-tl-axis-spine-left {
    stroke: #8a9aa8;
    stroke-width: 1.25;
}

.brew-tl-tick-mark-vol {
    color: #1a7fd4;
}

.brew-tl-axis-spine-center {
    stroke: #9ab0a0;
    stroke-width: 1.25;
}

.brew-tl-axis-spine-right {
    stroke: #8a9aa8;
    stroke-width: 1.25;
}

.brew-tl-tick-mark-hop,
.brew-tl-tick-mark-yeast,
.brew-tl-tick-mark-temp,
.brew-tl-tick-mark-grain {
    stroke: currentColor;
    stroke-width: 1;
}

/* Échelles : eau (L), malt (kg), houblon / levure (g), température (°C) */
.brew-tl-tick-mark-grain {
    color: #e8941a;
}

.brew-tl-tick-mark-hop {
    color: #2f8f45;
}

.brew-tl-tick-mark-yeast {
    color: #d4bc62;
}

.brew-tl-tick-mark-temp {
    color: #d93025;
}

.brew-tl-grid-h-vol {
    stroke: #c5dff5;
}

.brew-tl-half-title {
    font-size: 11px;
    font-weight: 700;
}

.brew-tl-half-title-hot {
    fill: #b85c1a;
}

.brew-tl-half-title-cold {
    fill: #2a7a8b;
}

.brew-tl-grid-h {
    stroke: #e8edf1;
    stroke-width: 1;
}

.brew-tl-grid-v {
    stroke: #eef2f5;
    stroke-width: 1;
}

.brew-tl-grid-v-hot {
    stroke: rgba(234, 80, 39, 0.12);
}

.brew-tl-grid-v-cold {
    stroke: rgba(26, 127, 212, 0.14);
}

.brew-tl-label {
    fill: #4a5a66;
    font-size: 11px;
}

.brew-tl-tick-x {
    fill: #4a5a66;
    font-size: 11px;
}

.brew-tl-tick-x-boil {
    fill: #5c4a3d;
}

.brew-tl-zone-divider {
    stroke: rgba(74, 90, 102, 0.32);
    stroke-width: 1;
    stroke-dasharray: 4 3;
    pointer-events: none;
}

.brew-timeline-svg .brew-tl-tick-vol,
.brew-timeline-svg .brew-tl-axis-title-vol {
    fill: #1a7fd4;
    font-size: 11px;
}

.brew-timeline-svg .brew-tl-tick-grain,
.brew-timeline-svg .brew-tl-axis-title-grain {
    fill: #e8941a;
    font-size: 11px;
}

.brew-timeline-svg .brew-tl-tick-hop,
.brew-timeline-svg .brew-tl-axis-title-hop {
    fill: #2f8f45;
    font-size: 11px;
}

.brew-timeline-svg .brew-tl-tick-yeast,
.brew-timeline-svg .brew-tl-axis-title-yeast {
    fill: #d4bc62;
    font-size: 11px;
}

.brew-timeline-svg .brew-tl-tick-temp,
.brew-timeline-svg .brew-tl-axis-title-temp {
    fill: #d93025;
    font-size: 11px;
}

.brew-tl-axis-title {
    font-size: 10px;
    font-weight: 700;
}

.brew-tl-axis-unit {
    fill: #5a6a75;
    font-size: 11px;
    font-weight: 600;
}

.brew-tl-axis-unit-hot {
    fill: #b85c1a;
}

.brew-tl-axis-unit-cold {
    fill: #2a7a8b;
}

.brew-tl-axis-unit-end {
    fill: #5a6a75;
    font-size: 10px;
    font-weight: 400;
}

.brew-tl-zone-label {
    fill: #5a6a75;
    font-size: 10px;
    font-weight: 600;
}

.brew-view-header-main {
    flex: 1;
    min-width: 0;
}

.brew-view-header-actions {
    margin-left: 15px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.brew-recipe-back-link {
    white-space: nowrap;
}

.brew-delete-photo-form {
    margin-top: 10px;
    text-align: center;
}

.brew-delete-photo-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #b30000;
    font-weight: 600;
    cursor: pointer;
}

.brew-delete-photo-label input {
    margin: 0;
}

.brew-edit-shortcut {
    white-space: nowrap;
}

.brew-style-subtitle {
    font-size: 1.15em;
    opacity: .82;
}

.brew-view-top-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.brew-view-visual {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 0;
}

.brew-main-photo {
    max-width: 100%;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

.brew-photo-actions {
    margin-top: 12px;
}

/* Grand verre de fiche recette */
.brew-big-glass-frame {
    display: inline-block;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    background: #f9f9f9;
    box-shadow:
        0 0 0 8px #f9f9f9,
        0 2px 8px rgba(0,0,0,.08);
}

/* Fiche recette desktop : cadre gris du verre — moins large, décalé à droite */
.brew-desktop-view .brew-view-visual .brew-big-glass-frame {
    margin-left: 12px;
    padding: 12px 8px;
    box-shadow:
        0 0 0 6px #f9f9f9,
        0 2px 8px rgba(0,0,0,.08);
}

.brew-big-glass {
    position: relative;
    width: 160px;
    height: 280px;
    margin: 0 auto;
    overflow: hidden;
}

.brew-big-glass-color {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 10px;
    bottom: 8px;
    background-image: url("/forum/images/beer_color_big.jpg");
    background-repeat: no-repeat;
    background-size: 1700px 280px;
    background-position: var(--ebc-position) center;
    z-index: 1;
}

.brew-big-glass-mask {
    position: absolute;
    inset: 0;
    background-image: url("/forum/images/beer_glass_big.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    z-index: 2;
}

/* 40 % du grand verre fiche (160×280 → 64×112) — après .brew-big-glass pour gagner la cascade */
.brew-timeline-summary-big-glass.brew-big-glass {
    width: 64px;
    height: 112px;
    margin: 0;
}

.brew-timeline-summary-big-glass.brew-big-glass .brew-big-glass-color {
    inset: 0;
    background-size: 680px 112px;
}

.brew-timeline-summary-big-glass.brew-big-glass .brew-big-glass-mask {
    background-size: 64px 112px;
}

.brew-view-meta-grid {
    display: grid;
    grid-template-columns: minmax(170px, .75fr) minmax(340px, 1.45fr) minmax(250px, .9fr);
    border: 1px solid rgba(128, 128, 128, .18);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
}

.brew-view-meta-block {
    padding: 22px;
    border-right: 1px solid rgba(128, 128, 128, .18);
}

.brew-view-meta-block:last-child {
    border-right: 0;
}

.brew-view-meta-item {
    margin-bottom: 18px;
}

.brew-view-meta-item:last-child {
    margin-bottom: 0;
}

.brew-view-meta-item strong,
.brew-view-stat strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.brew-view-meta-item em,
.brew-view-stat em {
    display: block;
    font-style: normal;
    opacity: .95;
}

.brew-view-author-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brew-view-author-line .brew-user-avatar {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
}

.brew-view-author-line .brew-user-avatar img {
    width: 34px !important;
    height: 34px !important;
}

.brew-author-profile {
    font-weight: 700;
    text-decoration: none;
}

.brew-author-profile:hover {
    text-decoration: underline;
}

.brew-view-muted {
    display: block;
    color: #666;
    font-size: .9em;
    opacity: .7;
    margin-bottom: 8px;
}

.brew-view-separator {
    height: 1px;
    margin: 22px 0;
    background: rgba(128, 128, 128, .18);
}

.brew-view-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
}

.brew-view-stat {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 76px;
    border-bottom: 1px solid rgba(128, 128, 128, .16);
}

.brew-view-stat:nth-last-child(-n+2) {
    border-bottom: 0;
}

.brew-view-date-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.brew-view-download {
    display: block;
    margin-top: 4px;
    font-weight: 700;
}

.brew-bbcode-box {
    margin-top: 18px;
}

.brew-bbcode-input {
    margin: 7px 0;
    font-family: monospace;
    max-width: 100%;
}

.brew-view-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: stretch;
}

.brew-recipe-import-gaps-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
}

.brew-recipe-import-gaps-notice__title {
    margin: 0 0 6px;
}

.brew-recipe-import-gaps {
    margin: 0;
    padding-left: 1.25rem;
}

.brew-recipe-import-gaps li {
    margin: 0.15rem 0;
}

.brew-import-misc-correction-notice {
    margin: 0 0 12px;
}

.brew-button-repair {
    color: #2a7a2a !important;
}

.brew-button-repair:hover,
.brew-button-repair:focus {
    color: #1e5c1e !important;
    text-decoration: none;
}

.brew-view-actions-grid > form {
    margin: 0;
    display: flex;
    min-width: 0;
    align-self: stretch;
}

.brew-view-actions-grid a.button,
.brew-view-actions-grid button.button {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    text-align: center;
}

.brew-btn-with-icon {
    gap: 0.35em;
}

.brew-btn-with-icon .brew-btn-icon {
    flex-shrink: 0;
}

.brew-view-actions-grid a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: 100%;
}

.brew-view-actions-grid button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 100%;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica;
    color: #b00000;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.brew-view-actions-grid button.button:hover,
.brew-view-actions-grid button.button:focus {
    color: #900;
}

.brew-view-action-card {
    display: block;
    padding: 14px;
    border: 1px solid rgba(128, 128, 128, .22);
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
}

.brew-view-action-card:hover {
    text-decoration: none;
    filter: brightness(.985);
}

.brew-view-danger {
    border-color: rgba(190, 0, 0, .5);
    color: #b00000;
}

.brew-view-notes-panel div {
    line-height: 1.5;
}

.brew-view-notes-panel .brew-recipe-notes-content {
    line-height: 1.5;
}

.brew-recipe-notes-content.brew-repair-diff-added,
.brew-recipe-notes-content.brew-repair-diff-modified {
    padding: .65rem .75rem;
    border-radius: 4px;
}

.brew-notes-author + .brew-notes-repair {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.brew-notes-repair-meta {
    margin: 0 0 .45em;
}

.brew-notes-repair-meta:last-of-type {
    margin-bottom: .65em;
}

.brew-notes-repair-changes {
    margin: 0;
    padding: 0;
    list-style: none;
}

.brew-notes-repair-change {
    margin: 0 0 1rem;
    padding: .65rem .75rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, .45);
}

.brew-notes-repair-change:last-child {
    margin-bottom: 0;
}

.brew-notes-repair-change-title {
    margin: 0 0 .4em;
}

.brew-notes-repair-removed,
.brew-notes-repair-added,
.brew-notes-repair-reason {
    margin: .2em 0;
}

.brew-notes-repair-removed {
    color: #8a1f1f;
}

.brew-notes-repair-added {
    color: var(--brew-repair-diff-added-color, #2a7a2a);
}

.brew-notes-repair-reason {
    margin-top: .35em;
    padding-left: 1.1rem;
    color: #444;
    font-size: .95em;
}

.brew-notes-repair-sign {
    display: inline-block;
    min-width: 1.1em;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.brew-view-notes-panel a.brew-forum-link {
    word-break: break-word;
}

.brew-recipe-analysis {
    border-left: 4px solid #0059b3;
}

.brewrecipe-view-page .brew-view-header-top + .brew-recipe-analysis {
    margin-top: 0;
}

.brew-recipe-analysis-ai {
    margin-top: 1rem;
    border-left-color: #0059b3;
}

.brew-recipe-analysis-onclick {
    margin-top: 1rem;
    border-left: 4px solid rgba(0, 89, 179, .45);
}

.brew-recipe-analysis-ai .brew-recipe-analysis-section h3 {
    color: #0059b3;
}

.brew-recipe-analysis-detail .brew-recipe-analysis-section h3,
#brew-recipe-analysis .brew-recipe-analysis-section h3,
#brew-recipe-analysis-ai .brew-recipe-analysis-section h3 {
    font-weight: normal;
    text-transform: none !important;
    letter-spacing: normal;
}

.brew-recipe-analysis-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    margin-bottom: .75rem;
    font-weight: normal;
    text-transform: none;
}

.brew-recipe-analysis-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(0, 89, 179, .12);
    color: #0059b3;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.brew-recipe-analysis-badge-ai {
    background: rgba(0, 89, 179, .12);
    color: #0059b3;
}

.brew-recipe-analysis-ai-actions {
    margin: 0 0 1rem;
}

.brew-recipe-analysis-ai-btn[disabled] {
    opacity: .7;
    cursor: wait;
}

.brew-recipe-analysis-ai-status {
    margin: .5rem 0 0;
    font-size: .9rem;
    color: #555;
}

.brew-recipe-analysis-ai-status-error {
    color: #a94442;
}

.brew-recipe-analysis-disclaimer {
    margin: 0 0 1rem;
    font-size: .85rem;
    line-height: 1.45;
    color: #666;
    font-style: italic;
}

.brew-recipe-analysis-summary {
    margin: 0 0 1rem;
    line-height: 1.55;
    font-size: 1.05rem;
}

.brew-recipe-analysis-persist {
    margin: 0 0 1rem;
    padding: .75rem 1rem;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 4px;
    background: rgba(0, 89, 179, .04);
}

.brew-recipe-analysis-persist legend,
.brew-recipe-analysis-persist-legend {
    padding: 0 .35rem;
    font-size: .9rem;
    font-weight: 600;
    color: #333;
}

.brew-recipe-analysis-persist-legend {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.brew-recipe-analysis-persist-icon {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0;
    flex-shrink: 0;
}

.brew-recipe-analysis-persist-option {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: .4rem 0;
    line-height: 1.45;
    cursor: pointer;
}

.brew-recipe-analysis-persist-option input.radio {
    margin: 0;
    flex-shrink: 0;
    vertical-align: -.1em;
}

.brew-recipe-analysis-persist-option-text {
    flex: 1;
    min-width: 0;
}

.brew-recipe-analysis-insufficient {
    border-left-color: rgba(0, 89, 179, .35);
}

.brew-recipe-analysis-insufficient-message {
    margin-bottom: 0;
    color: #555;
}

.brew-recipe-analysis-persist--edit {
    margin-top: 1rem;
}

.brew-recipe-analysis-edit-delete {
    margin: .75rem 0 0;
}

.brew-recipe-analysis-ai-wiki-link {
    color: #0059b3;
    font-weight: 600;
    text-decoration: underline;
}

.brew-recipe-analysis-ai-wiki-link:hover,
.brew-recipe-analysis-ai-wiki-link:focus {
    color: #003d7a;
}

.brew-recipe-analysis-ai-title-link {
    font-weight: inherit;
    font-size: inherit;
}

.brew-recipe-analysis-ia-select-row {
    margin: .4rem 0 0;
    line-height: 1.45;
}

.brew-recipe-analysis-ia-select-row label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.brew-recipe-analysis-ia-provider-select {
    display: inline-block;
    width: auto;
    min-width: 9rem;
    max-width: 100%;
    margin: 0;
    vertical-align: baseline;
}

.brew-recipe-analysis-ia-select-row .brew-recipe-analysis-ai-wiki-link {
    margin-left: .15rem;
}

.brew-recipe-analysis-toggle {
    margin-bottom: .5rem;
}

.brew-recipe-analysis-detail {
    margin-top: 1rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

#brew-recipe-analysis .brew-recipe-analysis-detail,
#brew-recipe-analysis-ai .brew-recipe-analysis-detail {
    margin-top: .65rem;
    padding-top: 0;
    border-top: none;
}

.brew-recipe-analysis-detail[hidden] {
    display: none;
}

.brew-recipe-analysis-section + .brew-recipe-analysis-section {
    margin-top: 1.25rem;
}

.brew-recipe-analysis-section h3 {
    margin: 0 0 .5rem;
    font-size: 1rem;
    font-weight: normal;
    color: #0059b3;
}

.brew-recipe-analysis-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.brew-recipe-analysis-section li {
    margin-bottom: .45rem;
    line-height: 1.45;
}

.brew-recipe-analysis-section li:last-child {
    margin-bottom: 0;
}

#brew-recipe-analysis .brew-recipe-analysis-section:last-child {
    margin-bottom: 1.25rem;
}

#brew-recipe-analysis .brew-recipe-analysis-section:last-child li:last-child {
    margin-bottom: .5rem;
}

#brew-recipe-analysis-ai .brew-recipe-analysis-section:last-child {
    margin-bottom: 1.25rem;
}

#brew-recipe-analysis-ai .brew-recipe-analysis-section:last-child li:last-child {
    margin-bottom: .5rem;
}

.brew-import-save-btn.is-loading,
.brew-edit-submit-btn.is-loading {
    opacity: .85;
    cursor: wait;
    pointer-events: none;
}

.brew-import-save-btn .brew-btn-spinner,
.brew-edit-submit-btn .brew-btn-spinner {
    display: none;
    width: .95em;
    height: .95em;
    margin-left: .45em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -.12em;
    will-change: transform;
}

.brew-import-save-btn.is-loading .brew-btn-spinner,
.brew-edit-submit-btn.is-loading .brew-btn-spinner {
    display: inline-block;
    animation: brew-btn-spin .75s linear infinite;
}

@keyframes brew-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Icônes de fiche recette */
.brew-view-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: #0059b3;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.brew-icon-volume { mask-image: url("./images/icon-volume.svg"); -webkit-mask-image: url("./images/icon-volume.svg"); }
.brew-icon-boil { mask-image: url("./images/icon-boil.svg"); -webkit-mask-image: url("./images/icon-boil.svg"); }
.brew-icon-efficiency { mask-image: url("./images/icon-efficiency.svg"); -webkit-mask-image: url("./images/icon-efficiency.svg"); }
.brew-icon-percent { mask-image: url("./images/icon-percent.svg"); -webkit-mask-image: url("./images/icon-percent.svg"); }
.brew-icon-di { mask-image: url("./images/icon-drop.svg"); -webkit-mask-image: url("./images/icon-drop.svg"); }
.brew-icon-df { mask-image: url("./images/icon-drop.svg"); -webkit-mask-image: url("./images/icon-drop.svg"); }
.brew-icon-ibu,
.brew-icon-hop { mask-image: url("./images/icon-hop.svg"); -webkit-mask-image: url("./images/icon-hop.svg"); }
.brew-icon-misc { mask-image: url("./images/icon-misc.svg"); -webkit-mask-image: url("./images/icon-misc.svg"); }
.brew-icon-cooling { mask-image: url("./images/icon-cooling.svg"); -webkit-mask-image: url("./images/icon-cooling.svg"); }
.brew-icon-airlock { mask-image: url("./images/icon-airlock.svg"); -webkit-mask-image: url("./images/icon-airlock.svg"); }
.brew-icon-erlenmeyer { mask-image: url("./images/icon-erlenmeyer.svg"); -webkit-mask-image: url("./images/icon-erlenmeyer.svg"); }
.brew-icon-beerglass { mask-image: url("./images/icon-beerglass.svg"); -webkit-mask-image: url("./images/icon-beerglass.svg"); }
.brew-icon-notes { mask-image: url("./images/icon-notes.svg"); -webkit-mask-image: url("./images/icon-notes.svg"); }
.brew-icon-color { mask-image: url("./images/icon-palette.svg"); -webkit-mask-image: url("./images/icon-palette.svg"); }
.brew-icon-calendar { mask-image: url("./images/icon-calendar.svg"); -webkit-mask-image: url("./images/icon-calendar.svg"); }
.brew-icon-clock { mask-image: url("./images/icon-clock.svg"); -webkit-mask-image: url("./images/icon-clock.svg"); }
.brew-icon-file { mask-image: url("./images/icon-file.svg"); -webkit-mask-image: url("./images/icon-file.svg"); }
.brew-icon-palette { mask-image: url("./images/icon-palette.svg"); -webkit-mask-image: url("./images/icon-palette.svg"); }
.brew-icon-fourquet { mask-image: url("./images/icon-fourquet-opt.svg"); -webkit-mask-image: url("./images/icon-fourquet-opt.svg"); }
.brew-icon-print { mask-image: url("./images/icon-print.svg"); -webkit-mask-image: url("./images/icon-print.svg"); }
.brew-icon-addtocalendar { mask-image: url("./images/icon-addtocalendar.svg"); -webkit-mask-image: url("./images/icon-addtocalendar.svg"); }
.brew-icon-beerlabel,
.brew-icon-bottle { mask-image: url("./images/icon-bottle.svg"); -webkit-mask-image: url("./images/icon-bottle.svg"); }
.brew-icon-qrcode { mask-image: url("./images/icon-qrcode.svg"); -webkit-mask-image: url("./images/icon-qrcode.svg"); }
.brew-icon-share { mask-image: url("./images/icon-share.svg"); -webkit-mask-image: url("./images/icon-share.svg"); }
.brew-icon-whatsapp { mask-image: url("./images/icon-whatsapp.svg"); -webkit-mask-image: url("./images/icon-whatsapp.svg"); background-color: #25d366; }

.brew-view-label-chatgpt-link,
.brew-view-label-ia-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.brew-view-label-chatgpt-link:hover,
.brew-view-label-chatgpt-link:focus,
.brew-view-label-ia-link:hover,
.brew-view-label-ia-link:focus {
    color: #900;
    text-decoration: none;
}

.brew-view-label-chatgpt-link:hover .brew-view-icon,
.brew-view-label-chatgpt-link:focus .brew-view-icon,
.brew-view-label-ia-link:hover .brew-view-icon,
.brew-view-label-ia-link:focus .brew-view-icon {
    background-color: #d31141;
}

.brew-view-label-chatgpt-link .brew-view-icon,
.brew-view-label-ia-link .brew-view-icon {
    flex-shrink: 0;
}

/* viewBox icon-bottle.svg ≈ 207×468 — boîte calée sur le ratio, pas 96×96 (sinon large vide à droite) */
.brew-view-label-chatgpt-link .brew-icon-bottle,
.brew-view-label-ia-link .brew-icon-bottle {
    width: 44px;
    height: 96px;
}

.brew-view-label-ia-caption {
    line-height: 1.25;
}

.brew-view-label-chatgpt-item,
.brew-view-label-ia-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.brew-view-recipe-qr-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em;
    margin-top: 0.75rem;
    margin-left: 5px;
}

.brew-view-recipe-qr-view {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-size: 0.95em;
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.brew-view-recipe-qr-view:hover,
.brew-view-recipe-qr-view:focus {
    color: #900;
    text-decoration: none;
}

.brew-view-recipe-qr-view:hover .brew-view-icon,
.brew-view-recipe-qr-view:focus .brew-view-icon {
    background-color: #d31141;
}

.brew-view-recipe-qr-view .brew-view-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.brew-recipe-label-prompt-source {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brew-label-prompt-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.brew-label-prompt-dialog-panel {
    width: 100%;
    max-width: min(90vw, 440px);
    padding: 20px 22px 18px;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.brew-label-prompt-dialog-message {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
}

.brew-label-prompt-dialog-recommended {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.4;
    color: #444;
}

.brew-label-prompt-dialog-actions {
    display: flex;
    justify-content: flex-end;
}

.brew-label-prompt-dialog-ok.button {
    min-width: 5em;
}

.brew-recipe-qr-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.45);
}

.brew-recipe-qr-dialog-panel {
    width: 100%;
    max-width: min(92vw, 360px);
    padding: 20px 22px 18px;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.brew-recipe-qr-dialog-image-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
}

.brew-recipe-qr-dialog-help {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.45;
    color: #333;
}

.brew-recipe-qr-dialog-download {
    font-weight: 700;
    text-decoration: none;
}

.brew-recipe-qr-dialog-download:hover,
.brew-recipe-qr-dialog-download:focus {
    text-decoration: underline;
}

.brew-recipe-qr-dialog-image {
    display: block;
    width: min(280px, 100%);
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.brew-recipe-qr-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

.brew-recipe-qr-dialog-actions .brew-recipe-qr-dialog-ok.button {
    align-self: flex-end;
}

.brew-recipe-qr-dialog-ok.button {
    min-width: 5em;
}

.brew-misc-use-for {
    display: block;
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: normal;
}

.brew-table-title-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    vertical-align: -4px;
    background-color: #0059b3;

    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.brew-table-icon-grains {
    mask-image: url("./images/icon-grains.svg");
    -webkit-mask-image: url("./images/icon-grains.svg");
}

.brew-table-icon-hop {
    mask-image: url("./images/icon-hop.svg");
    -webkit-mask-image: url("./images/icon-hop.svg");
}

.brew-table-icon-yeast {
    mask-image: url("./images/icon-erlenmeyer.svg");
    -webkit-mask-image: url("./images/icon-erlenmeyer.svg");
}

.brew-table-icon-misc {
    mask-image: url("./images/icon-misc.svg");
    -webkit-mask-image: url("./images/icon-misc.svg");
}

.brew-table-icon-water {
    mask-image: url("./images/icon-drop.svg");
    -webkit-mask-image: url("./images/icon-drop.svg");
}

.brew-table-icon-mash {
    mask-image: url("./images/icon-fourquet-opt.svg");
    -webkit-mask-image: url("./images/icon-fourquet-opt.svg");
}

.brew-table-icon-fermentation {
    mask-image: url("./images/icon-airlock.svg");
    -webkit-mask-image: url("./images/icon-airlock.svg");
}

.brew-table-icon-comments {
    mask-image: url("./images/icon-comments.svg");
    -webkit-mask-image: url("./images/icon-comments.svg");
}

.brew-table-icon-notes {
    mask-image: url("./images/icon-notes.svg");
    -webkit-mask-image: url("./images/icon-notes.svg");
}

.brew-table-icon-beerglass {
    mask-image: url("./images/icon-beerglass.svg");
    -webkit-mask-image: url("./images/icon-beerglass.svg");
}

.brew-table-icon-idea {
    mask-image: url("./images/icon-idea.svg");
    -webkit-mask-image: url("./images/icon-idea.svg");
}

.brew-table-icon-ai {
    mask-image: url("./images/icon-ai.svg");
    -webkit-mask-image: url("./images/icon-ai.svg");
}

/* -------------------------------------------------------------------------
   Tableaux recette et formulaires
   ------------------------------------------------------------------------- */

.table1.responsive th,
.table1 thead th {
    white-space: nowrap;
    text-align: left !important;
}

.brewrecipe-view-page table.table1 thead th,
.brewrecipe-view-page table.table1 thead th a,
.brewrecipe-view-page table.table1 thead th span {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.brewrecipe-view-page table.table1 thead th {
    background: rgba(128, 128, 128, .12) !important;
    font-weight: 700 !important;
}

.brew-view-edit-form textarea.inputbox {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.brew-view-edit-form dl {
    margin-bottom: 18px;
}

.brew-view-edit-form dt label {
    font-weight: 700;
}

.brew-view-edit-form input[type="file"] {
    margin: 6px 0;
}

.brew-view-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
}

/* -------------------------------------------------------------------------
   Import, messages, navigation, commentaires
   ------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

.panel .inner .brew-import-tested-soft {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.panel .inner .brew-import-tested-soft p {
    margin: 0 0 3px;
    padding: 0;
}

.brew-import-tested-ok {
    margin-right: 0.35em;
}

.brew-import-tested-repair {
    margin-right: 0.35em;
}

.brew-import-tested-pending {
    color: #6b7c8a;
    margin-right: 0.35em;
}

.brew-import-tested-fail {
    color: #b30000;
    margin-right: 0.35em;
}

.brew-import-tested-note {
    color: #5a6a75;
    font-size: 0.95em;
}

.panel .inner .brew-import-tested-more {
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.95em;
    color: #5a6a75;
}

.brew-import-file-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.brew-import-file-name {
	font-style: italic;
	color: var(--brew-muted, #666);
}

.brew-import-file-input {
	position: absolute;
	width: 0.1px;
	height: 0.1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.brew-import-checklist {
    margin-left: 0;
    padding-left: 20px;
}

.brew-import-checklist li {
    margin-bottom: 3px;
}

.brew-import-success {
    display: inline-block;
    margin-left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dff0d8;
    color: #3c763d;
    font-size: .55em;
    font-weight: 700;
    vertical-align: middle;
}

.brew-import-ia-timeout {
    display: inline-block;
    margin-left: 12px;
    color: #b30000;
    font-size: .55em;
    font-weight: 700;
    vertical-align: middle;
}

.brewrecipes-help-toolbar {
	margin-bottom: 12px;
}

.brewrecipes-help-toolbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.brewrecipes-help-toolbar__random {
	margin-left: auto;
}

.brewrecipes-view-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35em 0.75em;
}

.brewrecipes-view-breadcrumbs__langs {
    margin-left: auto;
}

.brewrecipes-view-breadcrumbs__langs .brewrecipes-help-toolbar__langs {
    margin: 0;
}

.brewrecipes-help-toolbar__langs {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

.brewrecipes-help-toolbar__lang {
	min-width: 2.25em;
	text-align: center;
}

.brewrecipes-help-toolbar__lang--active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25em;
	padding: 0.35em 0.65em;
	font-size: inherit;
	line-height: inherit;
	border: 1px solid transparent;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.06);
}

.brewrecipes-admin-toolbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.brewrecipes-admin-toolbar__form {
	margin: 0;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.brew-resync-report {
	margin-bottom: 12px;
}

.brew-resync-report__success {
	margin: 0 0 0.75em;
	padding: 0.65em 0.85em;
	border-left: 4px solid #3d8b40;
	color: #2d6a2f;
}

.brew-resync-report__success p {
	margin: 0;
	font-weight: 600;
}

.brew-resync-report__warnings {
	margin: 0 0 0.75em;
	padding: 0.65em 0.85em;
	border-left: 4px solid #d9822b;
	color: #9a5b14;
}

.brew-resync-report__warnings p {
	margin: 0 0 0.35em;
	font-weight: 600;
}

.brew-resync-report__failures {
	margin: 0 0 0.75em;
	padding: 0.65em 0.85em;
	border-left: 4px solid #b94a48;
	color: #a94442;
}

.brew-resync-report__failures p {
	margin: 0 0 0.35em;
	font-weight: 600;
}

.brew-resync-report__list {
	margin: 0;
	padding-left: 1.2em;
}

.brew-resync-report__list li {
	margin: 0.35em 0;
}

.brew-resync-report__summary li {
	list-style: disc;
}

.brew-resync-report__detail,
.brew-resync-report__meta {
	display: block;
	margin-top: 0.2em;
	font-size: 0.95em;
}

.brew-resync-report__log {
	margin: 0.75em 0 0;
}

.brew-delete-success {
    color: #a94442;
    margin: 0;
}

.brew-average-rating {
    margin-top: 6px;
    font-weight: 600;
}

.brew-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.brew-comment-avatar img {
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
}

.brew-comment-body {
    flex: 1;
}

.brew-comment-meta {
    font-weight: 600;
    margin-bottom: 8px;
}

.brew-comment-stars {
    color: #d9a300;
    margin-left: 6px;
    white-space: nowrap;
}

.brew-comment-text {
    line-height: 1.5;
}

.brew-comment-form textarea {
    width: 100%;
    max-width: 700px;
}

/* Calendrier de brassage — même ligne que dates / BeerXML */
.brew-view-calendar-item {
	margin-top: 18px;
}

.brew-view-calendar-action {
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	width: 100%;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: left;
	text-decoration: none;
}

.brew-view-calendar-action:hover,
.brew-view-calendar-action:focus {
	color: #900;
}

.brew-view-calendar-action:hover .brew-view-icon,
.brew-view-calendar-action:focus .brew-view-icon {
	background-color: #d31141;
}

.brew-view-calendar-action:hover strong,
.brew-view-calendar-action:focus strong {
	text-decoration: underline;
	outline: none;
}

/* Page calendrier de brassage (v1.9) */
.brew-brew-calendar-panel .inner {
	max-width: 980px;
}

.brew-brew-calendar-title {
	margin: 0 0 1.25rem;
	font-size: 1.15rem;
}

.brew-brew-calendar-layout {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.brew-brew-calendar-picker-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.brew-brew-calendar-month {
	margin: 0;
	font-weight: 700;
	font-size: 0.95rem;
	text-align: center;
	flex: 1;
}

.brew-brew-calendar-nav {
	width: 2rem;
	height: 2rem;
	border: 1px solid #c8d0d6;
	border-radius: 4px;
	background: #fff;
	color: #333;
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
}

.brew-brew-calendar-nav:hover,
.brew-brew-calendar-nav:focus {
	border-color: #900;
	color: #900;
}

.brew-brew-calendar-weekdays {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-bottom: 4px;
	font-size: 0.72rem;
	font-weight: 700;
	text-align: center;
	color: #5a6670;
}

.brew-brew-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.brew-brew-calendar-day {
	min-height: 2.1rem;
	border: 1px solid #e2e8ec;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 0.88rem;
}

.brew-brew-calendar-day--outside {
	opacity: 0.45;
}

.brew-brew-calendar-day.is-selected,
.brew-brew-calendar-day.is-selected:hover {
	background: #900;
	border-color: #900;
	color: #fff;
	font-weight: 700;
}

.brew-brew-calendar-day:hover,
.brew-brew-calendar-day:focus {
	border-color: #d31141;
	color: #900;
}

.brew-brew-calendar-time-label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 16px;
	font-weight: 700;
}

.brew-brew-calendar-time {
	max-width: 8rem;
}

.brew-brew-calendar-preview-title {
	margin: 0 0 12px;
	font-size: 1rem;
}

.brew-brew-calendar-intro {
	margin: 0 0 10px;
	font-size: 0.72rem;
	line-height: 1.38;
	color: #5a6670;
}

.brew-brew-calendar-intro p {
	margin: 0 0 6px;
}

.brew-brew-calendar-intro p:last-child {
	margin-bottom: 0;
}

.brew-brew-calendar-extrapolations {
	margin: 0 0 1rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid #e57373;
	border-radius: 4px;
	background: #ffebee;
	color: #b71c1c;
}

.brew-brew-calendar-extrapolations-intro {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 600;
}

.brew-brew-calendar-extrapolations-list {
	margin: 0.4rem 0 0;
	padding-left: 1.25rem;
	font-size: 0.86rem;
}

.brew-brew-calendar-preview-group {
	margin-bottom: 18px;
}

.brew-brew-calendar-preview-group-title {
	margin: 0 0 8px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #4a5a66;
}

.brew-brew-calendar-preview-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.brew-brew-calendar-preview-list-item {
	border-top: 1px solid #e6ebef;
}

.brew-brew-calendar-preview-list-item:first-child {
	border-top: none;
}

.brew-brew-calendar-preview-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
}

.brew-brew-calendar-preview-icon.brew-view-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	margin-top: 2px;
	background-color: #0059b3;
}

.brew-brew-calendar-preview-item-body {
	flex: 1;
	min-width: 0;
}

.brew-brew-calendar-preview-list-item:first-child .brew-brew-calendar-preview-item {
	padding-top: 0;
}

.brew-brew-calendar-preview-when {
	display: block;
	font-size: 0.82rem;
	color: #5a6670;
	margin-bottom: 2px;
}

.brew-brew-calendar-preview-summary {
	display: block;
	font-size: 0.95rem;
}

.brew-brew-calendar-preview-desc {
	margin: 4px 0 0;
	font-size: 0.88rem;
	line-height: 1.4;
	color: #333;
}

.brew-brew-calendar-preview-desc-note {
	font-size: 0.75rem;
	color: #6b7280;
}

.brew-brew-calendar-preview-loading,
.brew-brew-calendar-preview-empty {
	margin: 0;
	color: #5a6670;
	font-style: italic;
}

.brew-brew-calendar-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 10px;
	margin-top: 18px;
}

.brew-brew-calendar-download-block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	max-width: 28rem;
}

.brew-brew-calendar-download-desc {
	margin: 0;
	color: #5a6670;
	font-size: 0.92rem;
	line-height: 1.45;
}

.brew-view-beerxml-download-count {
	display: block;
	margin-top: 4px;
	color: #5a6670;
	font-size: 0.75rem;
	line-height: 1.4;
	font-weight: normal;
}

.brew-brew-calendar-download.is-disabled,
.brew-brew-calendar-download[aria-disabled="true"] {
	pointer-events: none;
	opacity: 0.55;
	cursor: not-allowed;
}

@media (max-width: 860px) {
	.brew-brew-calendar-layout {
		grid-template-columns: 1fr;
	}
}

.brewrecipes-print-footer-block {
	display: none;
}

.brewrecipes-copyright {
    margin-top: 20px;
    text-align: center;
    font-size: .85em;
    opacity: .7;
}

.brewrecipes-copyright .brewrecipes-code-name {
    font-style: italic;
}

.brewrecipes-copyright .brewrecipes-code-names-legend {
    font-size: 0.92em;
    opacity: 0.85;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .brew-grid-header,
	.brew-grid-row {
		grid-template-columns:
			68px
			1.8fr
			.9fr
			.58fr
			.9fr
			.95fr
			65px
			65px
			34px;
	}

    .brew-filter-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 1100px) {
    .brew-view-top-grid {
        grid-template-columns: 1fr;
    }

    .brew-view-visual {
        text-align: center;
    }

    .brew-big-glass-frame {
        margin: 0 auto;
    }

    .brew-view-meta-grid {
        grid-template-columns: 1fr;
    }

    .brew-view-meta-block {
        border-right: 0;
        border-bottom: 1px solid rgba(128, 128, 128, .18);
    }

    .brew-view-meta-block:last-child {
        border-bottom: 0;
    }
}

.brew-timeline-narrow-notice {
    display: none;
}

@media screen and (max-width: 980px) {
    .brew-recipe-view-toggle .brew-view-mode-item--timeline {
        display: none;
    }

    .brew-timeline-desktop-only {
        display: none !important;
    }

    .brew-timeline-narrow-notice {
        display: block;
    }

    .brewrecipes-toolbar-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .brewrecipes-toolbar-right {
        flex-wrap: wrap;
    }

    .brew-grid-header {
        display: none;
    }

    .brew-grid-row {
        grid-template-columns: 64px minmax(0, 1fr);
        min-height: 64px;
    }

    .brew-cell-brewer,
    .brew-cell-rating,
    .brew-cell-date,
    .brew-cell-style,
    .brew-cell-ibu,
    .brew-cell-abv {
        display: none;
    }
	.brew-cell-favorite {
		display: none;
	}

    .brew-cell-recipe {
        padding-left: 4px;
    }

    .brew-mobile-details {
        display: block;
    }

    .brewrecipes-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .brewrecipes-pagination {
        margin-left: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .brew-filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .brew-view-stats-grid {
        grid-template-columns: 1fr;
    }

    .brew-view-stat:nth-last-child(-n+2) {
        border-bottom: 1px solid rgba(128, 128, 128, .16);
    }

    .brew-view-stat:last-child {
        border-bottom: 0;
    }
}

.profile-brewrecipes {
    margin-top: 3px;
	font-weight: normal;
}

.brew-view-stat .brew-icon-hop {
    width: 45px;
    height: 45px;
}

.brew-favorite-button:not(.brew-mobile-favorite-btn) {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.brew-view-title-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 8px;
    vertical-align: middle;
}

.brew-favorite-title-button,
.brew-share-title-button {
    font-size: 16px;
    line-height: 1;
    vertical-align: middle;
}

.brew-share-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.brew-share-copy-toast {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 51;
    padding: 0.35rem 0.6rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #fff;
    background: #2d6a4f;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    pointer-events: none;
}

.brew-share-title-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #1f5ea8;
}

.brew-share-title-button .brew-view-icon {
    width: 20px;
    height: 20px;
    background-color: currentColor;
}

.brew-share-title-button:hover,
.brew-share-title-button:focus {
    color: #900;
}

.brew-share-title-button:hover .brew-view-icon,
.brew-share-title-button:focus .brew-view-icon {
    background-color: #d31141;
}

.brew-share-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    z-index: 50;
    min-width: 12rem;
    padding: 0.35rem 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-size: 0.875rem;
    line-height: 1.35;
    font-weight: normal;
}

.brew-share-menu__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    color: #105289;
    text-decoration: none;
    font-size: inherit;
    white-space: nowrap;
    box-sizing: border-box;
}

button.brew-share-menu__item {
    border: 0;
    margin: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.brew-share-menu__item:hover,
.brew-share-menu__item:focus {
    background: #f3f6fa;
    color: #900;
    text-decoration: none;
}

.brew-favorite-heart-empty {
    display: inline-block;
    color: #1f5ea8;
    font-size: 1em;
    transform: translateY(-2px);
    line-height: 1;
}

.brew-favorite-heart-full {
    display: inline-block;
    color: #d61f2c;
    font-size: 1em;
    transform: translateY(-2px);
    line-height: 1;
}

.is-hidden {
    display: none;
}

.brew-cell-favorite {
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

.brew-favorite-filter-link {
    text-decoration: none;
}

.brew-list-heart-empty {
    color: #105289;
    font-size: 1.15em;
    line-height: 1;
}

.brew-list-heart-full {
    font-size: 1.05em;
    line-height: 1;
}

.brew-recipe-favorites {
    margin-top: 8px;
    font-size: .92em;
    opacity: .92;
}
.brew-import-queue {
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #f5f7fa;
    border: 1px solid #d7dde6;
    border-radius: 6px;
    font-size: .92em;
}

.brew-import-queue ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.brew-view-edit-form dl {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.brew-view-edit-form dt {
    width: 100%;
    margin-bottom: 6px;
}

.brew-view-edit-form dd {
    margin-left: 0;
    width: 100%;
}

.brew-view-edit-form textarea,
.brew-view-edit-form input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}
.brew-preview-style-box {
    background: #f7f9fb;
    border: 1px solid #d8dde3;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 12px 0 16px;
}

.brew-preview-style-box dl {
    display: flex;
    flex-direction: column;
    margin: 0 0 12px;
}

.brew-preview-style-box dt {
    font-weight: bold;
    margin-bottom: 5px;
}

.brew-preview-style-box dd {
    margin-left: 0;
}

.brew-preview-style-box select {
    min-width: 280px;
}

.brew-hidden {
    display: none;
}

.brew-import-style-selects.is-disabled {
    opacity: 0.55;
}

.brew-preview-style-field {
    margin-bottom: 12px;
}

.brew-preview-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* -------------------------------------------------------------------------
   FAQ intégrée (content/faq/fr.bbcode)
   ------------------------------------------------------------------------- */

.brew-faq-page {
    margin-bottom: 1.5rem;
}

.brew-faq-toolbar {
    margin-bottom: 12px;
}

.brew-faq-toolbar .inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.brew-faq-body .inner {
    padding-top: 1.25rem;
}

.brew-faq-body .postbody .content {
    max-width: 52rem;
    margin: 0 auto;
    line-height: 1.55;
    overflow: visible;
}

/* Titre FAQ (premier bloc BBCode [size=150]) */
.brew-faq-body .postbody .content > :first-child {
    display: block;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.brew-faq-body .content img {
    max-width: 100%;
    height: auto;
}

.brew-faq-body .content .brew-faq-mobile-screens {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    justify-content: center;
    align-items: flex-end;
    margin: 1rem 0 1.25rem;
    max-width: 100%;
}

.brew-faq-body .content .brew-faq-mobile-screen {
    flex: 0 1 auto;
    max-width: 100%;
    margin: 0;
    text-align: center;
}

.brew-faq-body .content .brew-faq-mobile-screen img {
    display: block;
    /* Même hauteur : portrait ~moitié de l’affichage pleine largeur, timeline agrandie */
    height: clamp(11rem, 22vw, 18rem);
    width: auto;
    max-width: none;
    margin: 0 auto;
    object-fit: contain;
    border: 1px solid #c9c9c9;
    border-radius: 4px;
}

.brew-faq-body .content .brew-faq-mobile-screen figcaption {
    margin-top: 0.45rem;
    font-size: 0.9em;
    color: #555;
}

@media (max-width: 640px) {
    .brew-faq-body .content .brew-faq-mobile-screens {
        flex-direction: column;
        align-items: center;
    }

    .brew-faq-body .content .brew-faq-mobile-screen img {
        height: auto;
        max-height: clamp(10rem, 42vw, 14rem);
        max-width: min(100%, 20rem);
    }

    .brew-faq-body .content .brew-faq-mobile-screen:last-child img {
        max-width: min(100%, 100%);
        max-height: clamp(9rem, 38vw, 12rem);
    }
}

.brew-faq-body .content h2,
.brew-faq-body .content h3,
.brew-faq-body .content h4 {
    clear: both;
    margin-top: 1.25em;
}

.brew-faq-body .content ul,
.brew-faq-body .content ol {
    margin: 0.5em 0 0.75em 1.5em;
}

.brew-faq-anchor {
    display: block;
    position: relative;
    top: -4rem;
    visibility: hidden;
}

.brew-faq-body .content hr.brew-faq-hr {
    margin: 1.25em 0;
    border: 0;
    border-top: 1px solid #c9c9c9;
}

/* v1.7 — astuce du jour (liste + fiche) — sans .panel (évite bordure / ligne horizontale phpBB) */
.brew-tip-of-the-day {
    margin: 0 0 1rem;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.brewrecipes-help-toolbar:has(+ .brew-tip-of-the-day) {
    margin-bottom: 0;
    border-bottom-width: 0;
}

.brewrecipes-help-toolbar + .brew-tip-of-the-day {
    margin-top: 0.75rem;
}

.brew-tip-of-the-day__kicker {
    margin: 0 0 0.35rem;
    font-weight: bold;
}

.brew-tip-of-the-day__body {
    margin: 0;
    line-height: 1.45;
}

.brew-tip-of-the-day__body a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.brew-tip-of-the-day__beer {
    margin-right: 0.35em;
}

/* Cloche phpBB — notifications BrewRecipes : titre fluide (inline, pas un mot par ligne). */
#notification_list p.notification-title,
.notification_list p.notification-title {
	margin: 0;
}

#notification_list .brewrecipes-notification-inline,
#notification_list .brewrecipes-notification-inline a,
#notification_list .brewrecipes-notification-inline strong,
#notification_list .brewrecipes-notification-inline span,
.notification_list .brewrecipes-notification-inline,
.notification_list .brewrecipes-notification-inline a,
.notification_list .brewrecipes-notification-inline strong,
.notification_list .brewrecipes-notification-inline span {
	display: inline;
}
