/* =====================================================================
   urgence.jimajin.fr — styles
   Objectif : lisible par tous (gros texte, bon contraste, utilisable sur téléphone)
   ===================================================================== */

:root {
    --urg-red: #b02a37;
    --urg-red-dark: #8a1f2a;
}

body {
    font-size: 1.075rem;
    background: #f5f6f8;
}

/* --- Barre de navigation ------------------------------------------------ */
.app-nav { background: var(--urg-red); }
.app-nav .nav-link { color: rgba(255, 255, 255, .9); }
.app-nav .nav-link.active,
.app-nav .nav-link:hover { color: #fff; text-decoration: underline; }

/* --- Pages de connexion -------------------------------------------------- */
.auth-page { background: linear-gradient(160deg, #fff 0%, #f3e3e5 100%); min-height: 100vh; }
.auth-box { max-width: 460px; margin: 2rem auto; }
.auth-logo { font-size: 3.5rem; color: var(--urg-red); }
.code-input { font-size: 2rem; letter-spacing: .5rem; font-weight: 600; }

/* Étapes numérotées (mot de passe oublié) */
.steps { padding-left: 1.4rem; color: #6c757d; }
.steps li { margin-bottom: .25rem; }
.steps li.active { color: #212529; font-weight: 600; }
.steps li.done { text-decoration: line-through; }

/* --- Arborescence des pages ---------------------------------------------- */
.page-tree { list-style: none; padding-left: 0; margin: 0; }
.page-tree .page-tree { padding-left: 1.4rem; border-left: 2px solid #e9ecef; margin-left: .55rem; }
.page-tree a {
    display: block;
    padding: .45rem .5rem;
    border-radius: .375rem;
    color: #212529;
    text-decoration: none;
}
.page-tree a:hover { background: #f1f3f5; }
.page-tree a.active { background: #f8d7da; font-weight: 600; }
.page-tree .bi-folder2-open { color: #d4a017; }
.page-tree .bi-file-earmark-text { color: #6c757d; }

/* --- Contenu Markdown ----------------------------------------------------- */
.md-content { line-height: 1.65; overflow-wrap: anywhere; }
.md-content h1, .md-content h2, .md-content h3 { margin-top: 1.4rem; margin-bottom: .6rem; }
.md-content h1:first-child, .md-content h2:first-child, .md-content h3:first-child { margin-top: 0; }
.md-content h2 { font-size: 1.45rem; border-bottom: 1px solid #dee2e6; padding-bottom: .3rem; }
.md-content ol li, .md-content ul li { margin-bottom: .3rem; }
.md-content code { background: #f1f3f5; color: #a61e4d; padding: .1rem .3rem; border-radius: .25rem; }
.md-code { background: #212529; color: #f8f9fa; padding: .8rem 1rem; border-radius: .375rem; }
.md-code code { background: none; color: inherit; padding: 0; }
.md-quote {
    border-left: 5px solid var(--urg-red);
    background: #fdf1f2;
    padding: .7rem 1rem;
    margin: 1rem 0;
    border-radius: 0 .375rem .375rem 0;
}
.md-quote p:last-child { margin-bottom: 0; }
.md-tasks { list-style: none; padding-left: .2rem; }
.md-tasks .md-box { font-size: 1.25rem; margin-right: .3rem; }
.md-tasks li.done { color: #6c757d; text-decoration: line-through; }

/* Liens internes [[…]] */
.md-internal { font-weight: 600; text-decoration: none; }
.md-internal:hover { text-decoration: underline; }
.md-missing { color: #dc3545; text-decoration: line-through; cursor: help; }
.page-link-menu { max-height: 18rem; overflow-y: auto; }

.urgent-card .md-content { font-size: 1.15rem; }

/* --- Éditeur --------------------------------------------------------------- */
.md-editor { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 1rem; border: 0; }
.md-editor:focus { box-shadow: none; }
#pagePreview { min-height: 20rem; }

/* --- Impression : uniquement le contenu de la page ----------------------- */
@media print {
    body { background: #fff; font-size: 12pt; }
    .card { border: 0 !important; box-shadow: none !important; }
    .col-lg-8 { width: 100% !important; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
