/* SyStory — skin par défaut (sobre, en attendant l'identité). Le skin ne touche jamais aux droits. */


* { box-sizing: border-box; }

body {
    margin: 0;
    font: 15px/1.5 var(--police);
    color: var(--encre);
    background: var(--fond);
}

a { color: var(--accent); }
code, .code { font-family: var(--mono); font-size: 0.9em; }

.entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--carte);
    border-bottom: 1px solid var(--trait);
}
.marque { font-weight: 700; font-size: 1.1rem; color: var(--encre); text-decoration: none; letter-spacing: 0.01em; }
.marque small { font-weight: 400; color: var(--doux); font-size: 0.75rem; }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { text-decoration: none; font-weight: 500; }
.nav form { margin: 0; }

.page { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

.bloc {
    background: var(--carte);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.bloc.etroit { max-width: 420px; margin-left: auto; margin-right: auto; }

h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 1.25rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.bloc > h2:first-child { margin-top: 0; }

.chapeau { color: var(--doux); margin: 0 0 1rem; }
.discret { color: var(--doux); font-weight: 400; }
.ok { color: var(--vert); font-weight: 600; }
.ko { color: var(--rouge); font-weight: 600; }

.etat { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; margin: 0 0 1rem; }
.etat dt { color: var(--doux); }
.etat dd { margin: 0; }

.bouton {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.bouton:hover { filter: brightness(1.1); }
.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--doux); cursor: pointer; }
.lien:hover { color: var(--encre); }

.formulaire { display: grid; gap: 0.9rem; }
.formulaire label, .filtres label { display: grid; gap: 0.3rem; font-weight: 500; }
input, select {
    font: inherit;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--trait);
    border-radius: 8px;
    background: #fff;
    color: var(--encre);
}
.filtres { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.filtres select { min-width: min(22rem, 100%); max-width: 100%; }
.filtres label { max-width: 100%; }

.bilan { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pastille { padding: 0.25rem 0.7rem; border-radius: 999px; font-weight: 600; font-size: 0.9rem; }
.pastille.vert { background: var(--vert-clair); color: var(--vert); }
.pastille.rouge { background: var(--rouge-clair); color: var(--rouge); }
.pastille.neutre { background: var(--fond); color: var(--doux); }

.scenarios { display: grid; gap: 0.4rem; }
.scenario { border: 1px solid var(--trait); border-left-width: 4px; border-radius: 8px; padding: 0.5rem 0.9rem; }
.scenario.vert { border-left-color: var(--vert); }
.scenario.rouge { border-left-color: var(--rouge); background: var(--rouge-clair); }
.scenario.attente { border-left-color: var(--trait); color: var(--doux); }
.scenario summary { cursor: pointer; }
.scenario summary .code { display: inline-block; min-width: 2.6rem; color: var(--doux); }
.scenario ul { margin: 0.5rem 0 0.25rem; padding-left: 1.2rem; list-style: none; }
.scenario li { margin: 0.2rem 0; font-weight: 400; }
.scenario li.ok { color: var(--encre); }
.scenario li.ok::first-letter { color: var(--vert); }

.defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
thead th { background: var(--fond); font-weight: 600; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.grille td { min-width: 7.5rem; font-size: 0.82rem; }
.grille tbody th { white-space: nowrap; }

.maillon { display: inline-block; padding: 0.05rem 0.35rem; border-radius: 5px; background: var(--fond); }
.maillon.moi { background: var(--accent-clair); color: var(--accent); font-weight: 600; }
.maillon.declaree { border: 1px dashed var(--ambre); color: var(--ambre); background: transparent; }
.fleche { color: var(--doux); margin: 0 0.2rem; }
.etiquette { font-size: 0.75rem; padding: 0 0.35rem; border-radius: 4px; background: var(--rouge-clair); color: var(--rouge); }

.repertoire { columns: 2 18rem; margin: 0; padding-left: 1.2rem; }
.integrite { text-align: right; }

/* Messages (une fois, à la page suivante) */
.message { padding: 0.7rem 1rem; border-radius: 8px; margin: 0 0 1rem; font-weight: 500; }
.message.ok { background: var(--vert-clair); color: var(--vert); }
.message.ko { background: var(--rouge-clair); color: var(--rouge); }
.message.info { background: var(--accent-clair); color: var(--accent); }

/* Outils de développement : formulaires simples et résultats */
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.9rem; }
.champs label { display: grid; gap: 0.3rem; font-weight: 500; }
.resultat { margin-top: 0.5rem; padding: 0.8rem 1rem; border-radius: 8px; background: var(--fond); }
.resultat p { margin: 0.3rem 0; }
.liste-simple { list-style: none; margin: 0.4rem 0; padding: 0; }
.liste-simple li { padding: 0.35rem 0; }
.motif { display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; margin-right: 0.35rem; }
.motif.meme_personne { background: var(--vert-clair); color: var(--vert); }
.motif.meme_coordonnee { background: #fff3d6; color: var(--ambre); }
.motif.meme_nom { background: var(--accent-clair); color: var(--accent); }
.bloc.etroit { max-width: 560px; }
.formulaire { display: grid; gap: 0.8rem; max-width: 560px; }
.formulaire label { display: grid; gap: 0.3rem; font-weight: 500; }
form.refuser { margin-top: 1.2rem; }
.message-journal pre { white-space: pre-wrap; word-break: break-word; margin: 0.5rem 0 0; font-size: 0.88rem; background: var(--fond); padding: 0.8rem; border-radius: 8px; }
form.en-ligne { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
form.en-ligne input[type=text] { min-width: 14rem; }
details summary { cursor: pointer; margin: 0.8rem 0 0.4rem; font-weight: 500; }
.cases { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.cases label { font-weight: 400; }
.roles { border: 0; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.roles legend { font-weight: 600; padding: 0; margin-bottom: 0.2rem; }
.roles label { font-weight: 400; }
.sous-titre { display: block; font-size: 0.9em; color: var(--doux); font-weight: 400; }
.champs select, .champs input { width: 100%; max-width: 100%; box-sizing: border-box; }
.informatif li { color: var(--texte-discret, #6b7280); }

/* Écrans étroits : l'en-tête passe à la ligne plutôt que de déborder. */
.entete, .nav { flex-wrap: wrap; }

/* Locataire (plan 024) : repère de signalement, notes codées. */
.signal { font-size: 0.8em; }
.signal-bienvenu { color: var(--vert); }
.signal-attention { color: var(--ambre); }
.signal-refuser { color: var(--rouge); }
.notes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem 1rem; }
.notes-grille label { display: flex; flex-direction: column; gap: 0.2rem; }
.notes-grille input { width: 4.5rem; }
.codes { white-space: nowrap; font-family: var(--mono); font-size: 0.9em; }

/* Équipes (plan 025) : « À décider », planning, page de l'intervenant. */
.compteur { display: inline-block; min-width: 1.4em; padding: 0 0.35em; border-radius: 999px; background: var(--rouge); color: #fff; font-size: 0.8em; text-align: center; }
h2.jour { margin: 1.5rem 0 0.5rem; font-size: 1rem; color: var(--doux); text-transform: none; }
.situation { border-left: 4px solid var(--accent); }
.situation-b, .situation-h, .situation-j, .situation-i, .situation-g { border-left-color: var(--rouge); }
.situation-e, .situation-f, .situation-k, .situation-t { border-left-color: var(--ambre); }
.gestes { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; margin-right: 0.4rem; }
table.planning td { vertical-align: top; min-width: 7.5rem; }
table.planning td.absent { background: var(--fond); }
.carte-tache { display: block; padding: 0.3rem 0.4rem; margin-bottom: 0.3rem; border-radius: 6px; background: var(--accent-clair); color: var(--encre); text-decoration: none; font-size: 0.85em; }
.carte-tache.etat-a_faire, .carte-tache.etat-probleme { background: var(--rouge-clair); }
.carte-tache.etat-termine { background: var(--vert-clair); }
.carte-tache.etat-affecte { background: #fff6e0; }
.tache-intervenant .gros { font-size: 1.1rem; }
.boutons-intervenant form { margin-bottom: 0.75rem; }
.bouton.large { display: block; width: 100%; padding: 0.9rem; font-size: 1.05rem; text-align: center; box-sizing: border-box; }
summary.bouton { list-style: none; cursor: pointer; }
.bouton.secondaire { background: var(--carte); color: var(--encre); border: 1px solid var(--trait); }
label.choix { display: block; padding: 0.5rem 0; }
.case-controle button.case { display: block; width: 100%; text-align: left; padding: 0.6rem 0; color: var(--encre); font-size: 1.05rem; text-decoration: none; border-bottom: 1px solid var(--trait); }
.boutons-intervenant input[type=file] { max-width: 100%; }
.case-controle button.cochee { color: var(--doux); text-decoration: line-through; }
.liste-raisons form.en-ligne input[type=text] { min-width: 20rem; }
