/* Mise en page sobre de l'administration (plan 00) ; espace participant : espace.css. */
:root {
    --couleur-texte: #222;
    --couleur-fond: #fafaf7;
    --couleur-accent: #7b1e3a;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--couleur-texte);
    background: var(--couleur-fond);
}

body {
    margin: 0;
}

.page {
    max-width: 60rem;
    margin: 0 auto;
    padding: 1rem;
}

h1 {
    color: var(--couleur-accent);
}

h2 {
    margin-top: 2rem;
}

a {
    color: var(--couleur-accent);
}

.discret {
    color: #666;
}

/* En-tête de l'administration */
.entete {
    background: var(--couleur-accent);
}

.entete-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-block: 0.6rem;
}

.entete-nav a,
.entete-nav .lien {
    color: #fff;
}

.entete-texte {
    color: #fff;
}

.entete-nav a[aria-current="page"] {
    font-weight: bold;
    text-decoration-thickness: 2px;
}

.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.entete-titre {
    color: #fff;
    font-weight: bold;
    margin-right: auto;
    text-decoration: none;
}

.en-ligne {
    display: inline;
}

.lien {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* Messages */
.alerte {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alerte-succes { background: #e8f5e9; border-color: #2e7d32; }
.alerte-info { background: #e3f2fd; border-color: #1565c0; }
.alerte-erreur { background: #fdecea; border-color: #c62828; }

/* Boutons */
.bouton {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--couleur-accent);
    border-radius: 4px;
    background: var(--couleur-accent);
    color: #fff;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.bouton-secondaire {
    background: #fff;
    color: var(--couleur-accent);
}

.bouton-danger {
    background: #c62828;
    border-color: #c62828;
}

.titre-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Formulaires (rendu par défaut de Symfony : div > label + input) */
.formulaire > div,
.formulaire .champ {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.8rem;
}

.formulaire > div > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.8rem;
}

.formulaire input:not([type="hidden"], [type="checkbox"]),
.formulaire select {
    padding: 0.45rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font: inherit;
    max-width: 30rem;
}

.formulaire .help-text,
.formulaire [id$="_help"] {
    font-size: 0.85rem;
    color: #666;
}

.formulaire ul {
    margin: 0;
    padding-left: 1rem;
    color: #c62828;
}

/* Tableaux et fiches */
.tableau {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.tableau th,
.tableau td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

.fiche {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.3rem 1rem;
}

.fiche dd {
    margin: 0;
}

.statut {
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    background: #eee;
    font-size: 0.85rem;
}

.statut-ouverte, .statut-validee { background: #e8f5e9; }
.statut-en_cours { background: #e3f2fd; }
.statut-close, .statut-envoyee { background: #fff3e0; }

.colonnes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.carte {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.carte h3 {
    margin-top: 0;
}

/* Participants (plan 06) */
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.menu summary {
    cursor: pointer;
    padding: 0.3rem 0.6rem;
}

.menu[open] {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.liens-documents {
    padding-left: 1.2rem;
    line-height: 1.8;
}

/* Ma commande (plan 07) : styles dans espace.css */
.alerte-avertissement { background: #fff3e0; border-color: #ef6c00; }

.onglets {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.onglets [aria-current="page"] {
    font-weight: bold;
    text-decoration: none;
}

.bouton[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.avertissement {
    margin: 0.4rem 0 0;
    color: #b45309;
}

/* Administration : récapitulatif, suivi et paramètres (plan 08) */
.onglets-admin {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.nombre {
    text-align: right;
    white-space: nowrap;
}

.tableau th.nombre,
.tableau td.nombre {
    text-align: right;
}

.incomplet {
    color: #c62828;
}

.filtres,
.formulaire-ligne {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.8rem;
    margin: 1rem 0;
}

.formulaire-ligne label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recap .cellule {
    width: 4.5rem;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    text-align: right;
}

.recap-categorie th {
    background: #f3f0ea;
}

.recap-incomplet td {
    background: #fdecea;
}

.recap tfoot th,
.recap tfoot td {
    border-top: 2px solid #bbb;
}

.formulaire textarea {
    padding: 0.45rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font: inherit;
    max-width: 30rem;
    min-height: 4rem;
}

.suivi .menu[open] {
    min-width: 14rem;
}

.totaux dd {
    text-align: right;
    max-width: 8rem;
}

/* Paiement et export de la commande */
.paiement-texte {
    white-space: pre-line;
}

@media print {
    .entete,
    .ecran-seulement,
    .alerte {
        display: none;
    }

    :root {
        background: #fff;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .export h1 {
        color: #000;
    }
}

/* Catalogue : aperçus des pages (plan 05) */
.vignette-page {
    display: block;
    width: 120px;
    height: auto;
    border: 1px solid #ddd;
}

.catalogue-admin .cellule {
    width: 5em;
}

.statut-page-trouvee, .statut-page-manuelle { background: #e8f5e9; }
.statut-page-a_verifier, .statut-page-introuvable { background: #fff3e0; }

/* Bordereau (plan 09) */
.bordereau-incomplets ul {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.actions-bordereau {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1rem 0 0.5rem;
}

.ligne-surlignee td {
    background: #e8f5e9;
}
