/*
 * Brassages live. Tout derive des presets du theme : sur lescitesdorge.com,
 * "contrast" est l'orange de la marque et "base" le creme du fond. Le texte
 * secondaire est un orange assombri et non un gris, qui jurerait ; plus
 * fonce et pas plus pale, car l'orange sur creme est deja peu contraste.
 */
.lcdo-phase,
.lcdo-video,
.lcdo-note,
.lcdo-recipe,
.lcdo-list {
    --lcdo-text: var(--wp--preset--color--contrast, #111);
    --lcdo-muted: color-mix(in srgb, var(--lcdo-text) 68%, #000);
    --lcdo-line: color-mix(in srgb, var(--lcdo-text) 22%, transparent);
    --lcdo-surface: var(--wp--preset--color--base-2, #f6f6f6);
    --lcdo-live: #c62828;
}

/* Statut ---------------------------------------------------------------- */

.lcdo-phase {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-block: 0 1rem;
    color: var(--lcdo-muted);
    font-size: var(--wp--preset--font-size--small, 0.9rem);
    letter-spacing: 0.02em;
}

.lcdo-phase::first-letter {
    text-transform: uppercase;
}

.lcdo-phase--live {
    color: var(--lcdo-live);
    font-weight: 600;
}

.lcdo-dot {
    width: 0.6em;
    height: 0.6em;
    border-radius: 50%;
    background: currentColor;
    animation: lcdo-pulse 1.6s ease-in-out infinite;
}

@keyframes lcdo-pulse {
    50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .lcdo-dot { animation: none; }
}

/* Videos ---------------------------------------------------------------- */

.lcdo-video {
    margin-block: 0 1.5rem;
}

.lcdo-video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
}

.lcdo-video figcaption {
    margin-top: 0.75rem;
    color: var(--lcdo-muted);
    font-size: var(--wp--preset--font-size--small, 0.9rem);
}

.lcdo-prep {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.lcdo-prep .lcdo-video {
    margin: 0;
}

.lcdo-note {
    color: var(--lcdo-muted);
    font-size: var(--wp--preset--font-size--small, 0.9rem);
}

/* Recette --------------------------------------------------------------- */

.lcdo-recipe {
    margin-top: var(--wp--preset--spacing--50, 3rem);
}

.lcdo-style {
    margin-top: -0.5rem;
    color: var(--lcdo-muted);
}

/* Flex et non grille : une case seule en fin de ligne s'etire au lieu de
   laisser un trou. Les filets viennent d'un debord de chaque case, rogne par
   le cadre. */
.lcdo-share {
    margin: 1rem 0;
}

.lcdo-share .wp-element-button {
    display: inline-block;
    text-decoration: none;
}

.lcdo-stats {
    display: flex;
    flex-wrap: wrap;
    margin: 1.25rem 0;
    padding: 0;
    border: 1px solid var(--lcdo-line);
    border-radius: 6px;
    overflow: hidden;
    background: var(--lcdo-surface);
}

.lcdo-stats > div {
    flex: 1 1 90px;
    margin: 0 -1px -1px 0;
    padding: 0.75rem 0.9rem;
    border-right: 1px solid var(--lcdo-line);
    border-bottom: 1px solid var(--lcdo-line);
}

.lcdo-stats dt {
    color: var(--lcdo-muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lcdo-stats dd {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin: 0.15rem 0 0;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lcdo-swatch {
    width: 0.9em;
    height: 0.9em;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}

/* Calcul du volume */

.lcdo-scaler {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    border-radius: 6px;
    background: var(--lcdo-surface);
    border: 1px solid var(--lcdo-line);
}

.lcdo-scaler[hidden] {
    display: none;
}

.lcdo-scaler label {
    font-weight: 600;
}

.lcdo-scaler__input {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.lcdo-scaler input {
    width: 6.5em;
    padding: 0.4rem 0.5rem;
    font: inherit;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--lcdo-muted);
    border-radius: 4px;
    background: transparent;
    color: inherit;
}

.lcdo-scaler__reset {
    padding: 0.35rem 0.75rem;
    font: inherit;
    font-size: 0.9rem;
    border: 1px solid var(--lcdo-line);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.lcdo-scaler__reset[hidden] {
    display: none;
}

.lcdo-scaler__help {
    flex-basis: 100%;
    margin: 0;
    color: var(--lcdo-muted);
    font-size: 0.85rem;
}

.lcdo-recipe.is-scaled .lcdo-amt {
    font-weight: 600;
}

/* Tableaux */

/* Largeurs fixes : les colonnes s'alignent d'un tableau a l'autre. */
.lcdo-table {
    width: 100%;
    margin-block: 0.5rem 1.5rem;
    border-collapse: collapse;
    table-layout: fixed;
}

.lcdo-table td.lcdo-num {
    width: 6.5rem;
}

.lcdo-table td:nth-child(3) {
    width: 36%;
}

.lcdo-table th,
.lcdo-table td {
    padding: 0.55rem 0.5rem 0.55rem 0;
    border-bottom: 1px solid var(--lcdo-line);
    text-align: left;
    vertical-align: baseline;
}

.lcdo-table th {
    font-weight: 400;
}

.lcdo-table td:last-child {
    padding-right: 0;
}

.lcdo-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.lcdo-table .lcdo-num {
    padding-right: 1.25rem;
}

.lcdo-muted {
    color: var(--lcdo-muted);
}

.lcdo-table td.lcdo-muted {
    font-size: 0.9rem;
}

.lcdo-steps {
    padding-left: 1.25rem;
}

.lcdo-steps li {
    margin-bottom: 0.3rem;
}

/* Telephone : nom et quantite sur une ligne, l'utilisation dessous. */
@media (max-width: 560px) {
    .lcdo-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 1rem;
        padding: 0.55rem 0;
        border-bottom: 1px solid var(--lcdo-line);
    }
    .lcdo-table th,
    .lcdo-table td,
    .lcdo-table td.lcdo-num,
    .lcdo-table td:nth-child(3) {
        width: auto;
        padding: 0;
        border: 0;
    }
    .lcdo-table td:nth-child(3) {
        grid-column: 1 / -1;
    }
    .lcdo-table td:empty {
        display: none;
    }
}

/* Liste ----------------------------------------------------------------- */

.lcdo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    margin: 1rem 0 3rem;
    padding: 0;
    list-style: none;
}

.lcdo-cards--upcoming {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

.lcdo-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--lcdo-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--lcdo-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s;
}

.lcdo-card__link:hover,
.lcdo-card__link:focus-visible {
    border-color: var(--lcdo-text);
}

.lcdo-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: color-mix(in srgb, var(--lcdo-text) 8%, transparent);
}

/* Positionnee en absolu pour ne pas etirer la boite : la vignette YouTube
   est en 4:3 avec des bandes noires, que le recadrage 16:9 fait tomber. */
.lcdo-card__img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lcdo-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--lcdo-text);
    color: var(--lcdo-surface);
    font-size: 0.8rem;
    font-weight: 600;
}

.lcdo-card--live .lcdo-card__badge {
    background: var(--lcdo-live);
    color: #fff;
}

.lcdo-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem 1.2rem;
}

.lcdo-card__date {
    color: var(--lcdo-muted);
    font-size: 0.85rem;
}

.lcdo-card__date::first-letter {
    text-transform: uppercase;
}

/* Meme police que les titres du site : sur lescitesdorge.com, la police de
   texte, pas le preset "heading" de Twenty Twenty-Four. */
.lcdo-card__title {
    font-size: 1.35rem;
    line-height: 1.2;
}

/* Carte sans image : la date du live sur la teinte de la biere. */
.lcdo-card__date-big {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--lcdo-tint, var(--lcdo-text)), color-mix(in srgb, var(--lcdo-tint, var(--lcdo-text)) 55%, #000));
    color: #fff;
    text-shadow: 0 1px 8px rgb(0 0 0 / 0.25);
    line-height: 1;
}

.lcdo-card__day {
    font-size: clamp(3.5rem, 9vw, 5.5rem);
    font-weight: 300;
}

.lcdo-card__month {
    margin-top: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.lcdo-card__facts {
    font-size: 0.9rem;
}

.lcdo-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.lcdo-card__tags span {
    padding: 0.1rem 0.5rem;
    border: 1px solid var(--lcdo-line);
    border-radius: 999px;
    color: var(--lcdo-muted);
    font-size: 0.75rem;
}
