body {
    margin: 0;
    background-color: #0f172a;
    color: #e2e8f0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.hint {
    margin: 0 0 2rem;
    color: #94a3b8;
    line-height: 1.6;
}

.hint code {
    background: #1e293b;
    padding: 0.1em 0.4em;
    border-radius: 0.25rem;
}

.product {
    display: grid;
    grid-template-columns: 7rem 1fr 6rem 5rem 9rem 8rem;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #1e293b;
    margin-bottom: 0.5rem;
}

.product__ref {
    font-family: ui-monospace, monospace;
    color: #94a3b8;
}

.product__price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.product__state {
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

.product time {
    text-align: right;
    font-size: 0.8rem;
    color: #64748b;
}

/* Turbo remplace l'élément entier : l'animation se rejoue donc à chaque
   arrivée d'un turbo-stream, ce qui signale visuellement le champ touché. */
.is-changed {
    animation: flash 1.4s ease-out;
    border-radius: 0.25rem;
}

@keyframes flash {
    from {
        background-color: #fbbf24;
        color: #0f172a;
    }
    to {
        background-color: transparent;
    }
}

/* ---------------------------------------------------------------------------
   CRUD — formulaires, fiche, boutons et messages
   --------------------------------------------------------------------------- */

.product__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    font-size: 0.8rem;
}

.product__actions a,
.breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
}

.product__actions a:hover,
.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.breadcrumb span {
    margin: 0 0.35rem;
}

.form {
    max-width: 34rem;
}

.form__row {
    margin-bottom: 1.1rem;
}

.form__row--inline {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
}

.form__check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.55rem;
}

.form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.form__check label {
    margin: 0;
}

.form input[type="text"],
.form input[type="number"],
.form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem;
    border: 1px solid #334155;
    border-radius: 0.4rem;
    background: #1e293b;
    color: #e2e8f0;
    font: inherit;
}

.form input:focus,
.form textarea:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

.form .help-text,
.form small {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #64748b;
}

/* Le thème de formulaire par défaut de Symfony rend les erreurs en <ul>. */
.form ul,
.form .form-error-message {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    color: #fca5a5;
    font-size: 0.85rem;
}

.form__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 1.5rem 0;
}

.btn {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border: 1px solid #334155;
    border-radius: 0.4rem;
    background: #1e293b;
    color: #e2e8f0;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    border-color: #475569;
}

.btn--primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #f8fafc;
}

.btn--danger {
    background: transparent;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.btn--danger:hover {
    background: #7f1d1d;
    color: #fee2e2;
}

.fiche {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.6rem 1rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    background: #1e293b;
}

.fiche dt {
    color: #94a3b8;
    font-size: 0.85rem;
}

.fiche dd {
    margin: 0;
}

.mono {
    font-family: ui-monospace, monospace;
}

.flash {
    margin-bottom: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 0.4rem;
    border: 1px solid;
}

.flash--succes {
    background: #052e16;
    border-color: #166534;
    color: #bbf7d0;
}

.flash--erreur {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fecaca;
}

/* ---------------------------------------------------------------------------
   CHAT — salons et messages
   --------------------------------------------------------------------------- */

.salons {
    display: grid;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.salon {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #1e293b;
    color: #e2e8f0;
    text-decoration: none;
}

.salon:hover {
    background: #273449;
}

.salon__meta {
    font-size: 0.8rem;
    color: #64748b;
}

.pseudo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: none;
    margin-bottom: 1.5rem;
}

.pseudo label {
    margin: 0;
}

.pseudo input[type="text"] {
    width: auto;
    padding: 0.4rem 0.6rem;
    border: 1px solid #334155;
    border-radius: 0.4rem;
    background: #1e293b;
    color: #e2e8f0;
    font: inherit;
}

.pseudo__actuel {
    font-size: 0.85rem;
    color: #64748b;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 26rem;
    overflow-y: auto;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #111c30;
}

.message {
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    background: #1e293b;
}

.message header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.message__author {
    font-weight: 600;
    font-size: 0.85rem;
    color: #60a5fa;
}

.message header time {
    font-size: 0.75rem;
    color: #64748b;
}

.message__body {
    margin: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.envoi {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-top: 1rem;
    max-width: none;
}

.envoi textarea {
    flex: 1;
    padding: 0.55rem 0.7rem;
    border: 1px solid #334155;
    border-radius: 0.4rem;
    background: #1e293b;
    color: #e2e8f0;
    font: inherit;
    resize: vertical;
}

.vide {
    color: #64748b;
    font-style: italic;
}

.suppression {
    margin-top: 1.5rem;
    max-width: none;
}
