html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* Tuiles du tableau de bord (comme dans le programme Windows : bande de couleur à gauche) */
.tuiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .75rem;
}
.tuile {
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid var(--couleur-tuile);
    border-radius: .375rem;
    padding: .6rem .9rem;
}
.tuile-titre { font-size: .85rem; color: #6c757d; }
.tuile-valeur { font-size: 1.3rem; font-weight: 700; color: var(--couleur-tuile); white-space: nowrap; }
.tuile-bleu { --couleur-tuile: #3478dc; }
.tuile-vert { --couleur-tuile: #147832; }
.tuile-rouge { --couleur-tuile: #b41e1e; }
.tuile-orange { --couleur-tuile: #d27814; }

.bilan td, .bilan th { font-size: .85rem; }

/* Inventaire : couleur de chaque section (comme dans le programme Windows) */
.sec-en_reparation { background-color: #ffe2be; }
.sec-a_vendre { background-color: #cde0fa; }
.sec-reserve { background-color: #e8dcf8; }
.sec-vendu { background-color: #ceecce; }
.sec-personnel { background-color: #faeebe; }
.sec-stock { background-color: #d6ecec; }
.sec-donne { background-color: #fadeec; }
.section-active { box-shadow: 0 0 0 2px #495057 inset; }

.liste-objets .miniature { width: 48px; height: 48px; object-fit: cover; border-radius: .25rem; }
.photo-cadre {
    height: 160px; border: 1px solid #dee2e6; border-radius: .375rem; background: #f8f9fa;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-cadre img { max-width: 100%; max-height: 158px; object-fit: contain; }
@media (min-width: 1200px) {
    .fiche-colonne { position: sticky; top: 4rem; max-height: calc(100vh - 5rem); overflow-y: auto; }
}

/* Clients : bon client en vert, client en alerte en rouge (comme dans le programme Windows) */
.client-bon, tr.client-bon > td { background-color: #e2f5e2 !important; }
.client-alerte, tr.client-alerte > td { background-color: #fddede !important; }
.row.client-bon, .row.client-alerte { padding: .25rem 0 .5rem; }

/* Blocs repliables de la fiche d'un objet */
.blocs-fiche details { border: 1px solid #dee2e6; border-radius: .375rem; padding: .4rem .75rem; margin-bottom: .5rem; background: #fff; }
.blocs-fiche summary { font-weight: 600; cursor: pointer; }
.blocs-fiche summary small { font-weight: normal; margin-left: .4rem; }

/* Si demain : couleurs du classeur (vert, crème) */
.rubriques-sd .list-group-item { padding: .4rem .75rem; font-size: .9rem; }
.rubriques-sd .list-group-item.active { background-color: #2e7d52; border-color: #2e7d52; }
.rubriques-sd .separation-sd { border-top: 2px solid #cdd6d0; }
.code-sd { font-weight: 700; color: #2e7d52; width: 1.8rem; }
.rubriques-sd .active .code-sd { color: #fff; }
.code-titre-sd { font-size: 2.2rem; font-weight: 700; color: #6cb684; line-height: 1; }
.intro-sd { font-size: 1.05rem; }
.encadre-sd { background: #f7f2e8; border-radius: .375rem; padding: .75rem 1rem; }
.tableau-sd thead th { background: #e7f2ea; color: #2e7d52; font-size: .75rem; text-transform: uppercase; }

/* Sécurité : code QR et codes de secours */
.qr-securite svg { width: 180px; height: 180px; }
.codes-secours { display: grid; grid-template-columns: repeat(2, max-content); gap: .4rem 1.5rem; font-size: 1.1rem; }
.codes-secours code { color: #1e2432; background: #f2f2f2; padding: .15rem .5rem; border-radius: .25rem; }

/* Dossier médical : onglets sur plusieurs lignes (téléphone) */
.onglets-sante .nav-link { border: 1px solid #dee2e6; }

/* Graphique du carnet de mesures (palette de référence : bleu puis orange, encre neutre pour le texte) */
.graphique-mesures {
    --surface: #ffffff; --serie-1: #2a78d6; --serie-2: #eb6834;
    --encre: #0b0b0b; --encre-2: #52514e; --discret: #898781; --grille: #e1e0d9; --base: #c3c2b7;
    width: 100%; max-width: 820px; height: auto; display: block; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.graphique-mesures .grille { stroke: var(--grille); stroke-width: 1; }
.graphique-mesures .base { stroke: var(--base); stroke-width: 1; }
.graphique-mesures .axe { fill: var(--discret); font-size: 11px; font-variant-numeric: tabular-nums; }
.graphique-mesures .etiquette { fill: var(--encre-2); font-size: 12px; font-weight: 600; }
.graphique-mesures .courbe { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphique-mesures .courbe-1 { stroke: var(--serie-1); }
.graphique-mesures .courbe-2 { stroke: var(--serie-2); }
.graphique-mesures .point { stroke: var(--surface); stroke-width: 2; }
.graphique-mesures .point-1 { fill: var(--serie-1); }
.graphique-mesures .point-2 { fill: var(--serie-2); }
.graphique-mesures .zone { fill: transparent; }
.graphique-mesures .survol .repere, .graphique-mesures .survol .bulle, .graphique-mesures .survol .bulle-texte { opacity: 0; pointer-events: none; }
.graphique-mesures .survol:hover .repere, .graphique-mesures .survol:hover .bulle, .graphique-mesures .survol:hover .bulle-texte { opacity: 1; }
.graphique-mesures .repere { stroke: var(--base); stroke-width: 1; }
.graphique-mesures .bulle { fill: var(--surface); stroke: rgba(11, 11, 11, 0.15); }
.graphique-mesures .bulle-texte { fill: var(--encre); font-size: 11px; }
.graphique-legende .cle { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.graphique-legende .cle-1 { background: #2a78d6; }
.graphique-legende .cle-2 { background: #eb6834; }
