/* The home, « Aujourd'hui »: the day's headline and the field to ask, then two columns (what to decide and the
   missions; the figures of Lyrge and the day's appointments). The field (saisie) is shared with « Conversation ». */

.jour {
    display: grid;
    gap: var(--space-10);
}

.jour__tete {
    display: grid;
    gap: var(--space-2);
    max-width: var(--content-prose);
}

.jour__date {
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.jour__titre {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
    text-wrap: balance;
}

.jour__resume { margin-bottom: var(--space-3); color: var(--text-dim); font-size: var(--text-lg); }

.jour__grille,
.jour__colonne {
    display: grid;
    align-content: start;
    gap: var(--space-8);
}

.jour__colonne { min-width: 0; }
.jour__colonne .section + .section { margin-top: 0; }
.jour__absent { color: var(--text-dim); font-size: var(--text-sm); }
.jour__fraicheur { margin-top: var(--space-2); color: var(--text-mute); font-size: var(--text-xs); }
.jour__fraicheur--perime { color: var(--warning-text); font-weight: var(--weight-medium); }

/* — The field ---------------------------------------------------------------------------------------------------- */
.saisie {
    display: grid;
    gap: var(--space-2);
}

.saisie__champ {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    border: var(--border-width) solid var(--border-strong);
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.saisie__champ:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), var(--ring-focus); }

.saisie__zone {
    flex: 1;
    min-width: 0;
    padding: var(--space-2) 0;
    border: 0;
    background: none;
    color: var(--text);
    font-family: inherit;
    font-size: var(--text-base);
    line-height: var(--leading-base);
    resize: none;
}

.saisie__zone::placeholder { color: var(--text-mute); }
/* the frame around the field shows the focus (focus-within above), not the text area inside it */
.saisie__zone:focus-visible { outline: 0; box-shadow: none; }
.saisie__envoyer { flex: none; border-radius: var(--radius-full); }
.saisie__aide { padding: 0 var(--space-4); color: var(--text-mute); font-size: var(--text-xs); }

.saisie__suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.saisie__suggestion {
    min-height: var(--touch-min);
    padding: var(--space-2) var(--space-4);
    border: var(--border-width) solid var(--border-subtle);
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-soft);
    font-family: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.saisie__suggestion:hover { border-color: var(--border); color: var(--text); }

/* — The figures of Lyrge ------------------------------------------------------------------------------------------- */
.indicateurs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.indicateur {
    display: grid;
    align-content: start;
    gap: var(--space-1);
    min-width: 0;
    padding: var(--space-4);
    border: var(--border-width) solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
}

.indicateur__libelle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-dim);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}

.indicateur__valeur {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: var(--leading-tight);
}

.indicateur__detail { overflow-wrap: anywhere; font-size: var(--text-xs); }
.indicateur__detail--neutre { color: var(--text-dim); }
.indicateur__detail--bon { color: var(--success-text); }
.indicateur__detail--alerte { color: var(--warning-text); font-weight: var(--weight-medium); }

/* — The day's appointments and the missions ------------------------------------------------------------------------ */
.journee,
.nuit {
    display: grid;
    overflow: hidden;
    border: var(--border-width) solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
}

.journee:empty,
.nuit:empty { display: none; }

.journee__ligne,
.nuit__ligne {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
}

.journee__ligne + .journee__ligne,
.nuit__ligne + .nuit__ligne { border-top: var(--border-width) solid var(--border-subtle); }

.journee__heure { flex: none; color: var(--accent-text); font-family: var(--font-mono); }

.journee__nom,
.nuit__nom {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-weight: var(--weight-semibold);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nuit__detail { flex: none; color: var(--text-mute); font-size: var(--text-xs); }

@media (min-width: 1024px) {
    .jour__grille { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-8); }
}
