/* =====================================================================
   Espace client MD Webdesigner — styles de base
   ===================================================================== */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1f2430;
    --muted: #5b6170;
    --border: #e3e5ea;
    --primary: #2b3a8f;
    --primary-hover: #223076;
    --primary-soft: #eef0fa;
    --success: #13795b;
    --success-soft: #e6f4ee;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --warning: #9a6700;
    --warning-soft: #fff4d6;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

h1, h2 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* --- Marque ---------------------------------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
}
.brand-center { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: .85rem;
    letter-spacing: .02em;
}

/* --- Pages de connexion ---------------------------------------------- */

body.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}
.auth-card h1 { font-size: 1.35rem; text-align: center; }
.auth-card > p { text-align: center; }
.auth-foot { margin-top: 1.25rem; font-size: .85rem; color: var(--muted); }

/* --- Formulaires ----------------------------------------------------- */

.form { display: grid; gap: .5rem; margin-top: 1.25rem; }
.form label { font-weight: 600; font-size: .9rem; margin-top: .5rem; }
.form input {
    width: 100%;
    font: inherit;
    padding: .7rem .85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .btn { margin-top: 1rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font: inherit;
    font-weight: 600;
    padding: .7rem 1.2rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: .35rem .75rem; font-size: .875rem; }

/* --- Alertes --------------------------------------------------------- */

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error   { background: var(--danger-soft);  color: var(--danger); }
.alert-info    { background: var(--primary-soft); color: var(--primary); }

/* --- Barre supérieure ------------------------------------------------ */

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: .75rem 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.mainnav { display: flex; gap: 1rem; flex: 1; }
.mainnav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: .25rem 0; }
.mainnav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.topbar-user { display: flex; align-items: center; gap: .75rem; }
.user-name { display: flex; flex-direction: column; text-align: right; font-size: .9rem; font-weight: 600; line-height: 1.2; }
.user-name small { color: var(--muted); font-weight: 400; }
.topbar-user form { margin: 0; }
body.is-admin .brand-mark { background: #1f2430; }

/* --- Contenu --------------------------------------------------------- */

.page { max-width: 1100px; margin: 0 auto; padding: 28px 16px 64px; }
.page-head { margin-bottom: 1.5rem; }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 1rem;
}
.card.empty { text-align: center; padding: 40px 22px; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }

.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* --- Projets --------------------------------------------------------- */

.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.badge { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.badge-en_cours { background: var(--primary-soft); color: var(--primary); }
.badge-en_pause { background: var(--warning-soft); color: var(--warning); }
.badge-livre    { background: var(--success-soft); color: var(--success); }

/* Barre native <progress> (pas de style inline : compatible avec la CSP) */
.progress {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--bg);
    overflow: hidden;
    color: var(--primary);
}
.progress::-webkit-progress-bar   { background: var(--bg); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
.progress::-moz-progress-bar      { background: var(--primary); border-radius: 999px; }

.todo {
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: var(--warning-soft);
    border-radius: 8px;
}
.todo p { margin: .25rem 0 0; }

/* --- Mobile ---------------------------------------------------------- */

@media (max-width: 640px) {
    h1 { font-size: 1.35rem; }
    .topbar-inner { gap: .75rem; }
    .mainnav { order: 3; flex-basis: 100%; }
    .topbar-user { margin-left: auto; }
    .user-name small { display: none; }
}

/* =====================================================================
   Étape 2 — back-office et page projet
   ===================================================================== */

h3 { font-size: 1rem; margin: 0 0 .5rem; }
.subhead { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.text-danger { color: var(--danger); }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { color: var(--primary); }
.pad { padding: 20px 22px; margin: 0; }

.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.breadcrumb { margin: 0 0 .35rem; font-size: .875rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions form { margin: 0; }

.card-flush { padding: 0; overflow-x: auto; }
.card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-link { margin-top: 1rem; }
.narrow { max-width: 480px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.grid-2-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-2 > div > .card:first-child { margin-top: 0; }

a.stat { text-decoration: none; color: inherit; transition: box-shadow .15s; }
a.stat:hover { box-shadow: 0 0 0 2px var(--primary-soft), var(--shadow); }

.table .num { text-align: right; white-space: nowrap; }
.table td { vertical-align: top; }
.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }

.tabs { display: flex; gap: 1rem; margin-top: .25rem; }
.tabs a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding-bottom: .2rem; }
.tabs a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }

/* --- Formulaires du back-office ------------------------------------- */

.form select, .form textarea {
    width: 100%;
    font: inherit;
    padding: .65rem .8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
.form textarea { resize: vertical; }
.form select:focus, .form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .btn { justify-self: start; }

.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; row-gap: .5rem; margin-top: 0; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .field legend { margin-top: .5rem; font-weight: 600; font-size: .9rem; }
.field-full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hint { margin: 0; font-size: .8rem; color: var(--muted); }
.field-error { margin: 0; font-size: .85rem; color: var(--danger); font-weight: 600; }
.form-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.form-actions .btn { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-row > div { display: grid; gap: .35rem; }

.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.form-inline input:not([type="checkbox"]) { width: auto; flex: 1 1 140px; padding: .5rem .7rem; }
.form-inline .btn { margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.check input { width: auto; margin: 0; }

.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .25rem; }
.choice { display: flex; gap: .6rem; align-items: flex-start; padding: .85rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { width: auto; margin-top: .2rem; }
.choice-body { display: flex; flex-direction: column; gap: .2rem; }

.todo-field { margin-top: .75rem; padding: .75rem; background: var(--warning-soft); border-radius: 8px; display: grid; gap: .4rem; }
.todo-field legend { font-size: .85rem; font-weight: 600; padding: 0; float: left; width: 100%; margin-bottom: .4rem; }

/* --- Badges supplémentaires ----------------------------------------- */

.badge-brouillon      { background: var(--bg); color: var(--muted); border: 1px dashed var(--border); }
.badge-archive        { background: var(--bg); color: var(--muted); }
.badge-off            { background: var(--danger-soft); color: var(--danger); font-size: .75rem; }
.badge-attente_client,
.badge-step-attente_client { background: var(--warning-soft); color: var(--warning); }
.badge-step-a_venir   { background: var(--bg); color: var(--muted); }
.badge-step-en_cours  { background: var(--primary-soft); color: var(--primary); }
.badge-step-terminee  { background: var(--success-soft); color: var(--success); }
.tag-muted { font-size: .7rem; background: var(--bg); padding: .05rem .4rem; border-radius: 4px; }

.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); background: var(--danger-soft); }
.btn:disabled { opacity: .55; cursor: default; }

.note-interne { background: #fffbea; border: 1px solid #f3e3a3; box-shadow: none; }
.note-interne p { margin: .35rem 0 0; }

/* --- Accès utilisateurs ---------------------------------------------- */

.user-list { list-style: none; margin: 0; padding: 0; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.user-row.is-off .user-main { opacity: .6; }
.user-actions { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.user-actions form { margin: 0; }
.user-edit { grid-column: 1 / -1; }
.user-edit summary { cursor: pointer; color: var(--primary); }

/* --- Étapes (admin) --------------------------------------------------- */

.steps-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.step-admin { position: relative; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: .75rem .75rem .75rem .9rem; }
.step-admin.step-en_cours       { border-left-color: var(--primary); }
.step-admin.step-attente_client { border-left-color: #e0a100; }
.step-admin.step-terminee       { border-left-color: var(--success); background: #fbfdfc; }
.step-form { margin: 0; gap: .5rem; }
.step-top { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px; gap: .5rem; align-items: center; padding-right: 92px; }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-size: .8rem; font-weight: 700; color: var(--muted); }
.step-title { font-weight: 600; padding: .45rem .6rem !important; }
.step-top select { padding: .45rem .6rem; }
.step-more summary { cursor: pointer; color: var(--muted); }
.step-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.step-fields label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; margin: 0; }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.step-actions .btn { margin-top: 0; }
.step-tools { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .25rem; }
.step-tools form { margin: 0; }
.icon-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: .85rem; color: var(--muted); }
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--bg); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn-danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.add-step { margin-top: 1rem; }

.progress-lg { height: 10px; margin-bottom: .25rem; }

/* --- Fil d'activité --------------------------------------------------- */

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.feed li:last-child { border-bottom: 0; }
.feed time { white-space: nowrap; }

/* --- Page projet (client) --------------------------------------------- */

.project-summary .progress { margin-top: 1rem; }
.summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.summary-label { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.summary-value { font-size: 1.15rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: .85rem; padding-bottom: 1.25rem; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; }
.tl-en_cours .tl-dot       { border-color: var(--primary); box-shadow: inset 0 0 0 5px #fff; background: var(--primary); }
.tl-attente_client .tl-dot { border-color: #e0a100; box-shadow: inset 0 0 0 5px #fff; background: #e0a100; }
.tl-terminee .tl-dot       { border-color: var(--success); background: var(--success); }
.tl-terminee::before       { background: var(--success); }
.tl-a_venir .tl-body strong { color: var(--muted); }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.tl-body p { margin: .2rem 0 0; }
.tl-note { background: var(--bg); padding: .6rem .75rem; border-radius: 8px; margin-top: .5rem !important; font-size: .95rem; }
.tl-body .btn { margin-top: .5rem; }

/* --- Mobile ----------------------------------------------------------- */

@media (max-width: 860px) {
    .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
    .choice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
    .summary-row { grid-template-columns: 1fr 1fr; }
    .summary-row > div:last-child { grid-column: 1 / -1; }
    .step-top { grid-template-columns: auto minmax(0, 1fr); padding-right: 0; margin-top: 2rem; }
    .step-top select { grid-column: 1 / -1; }
    .step-fields { grid-template-columns: 1fr; }
    .user-row { grid-template-columns: 1fr; }
    .user-actions { justify-content: flex-start; }
    .card-flush .table th:nth-child(n+3), .card-flush .table td:nth-child(n+3) { display: none; }
    .card-flush .table th:last-child, .card-flush .table td:last-child { display: table-cell; }
    .mainnav { gap: .85rem; overflow-x: auto; }
    .mainnav a { white-space: nowrap; }
    .feed li { flex-direction: column; gap: .15rem; }
}
.step-fields label.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; grid-column: 1 / -1; }
.grid-2 > * { min-width: 0; }
.card { min-width: 0; }
@media (max-width: 640px) {
    .card:not(.card-flush) > .table { display: block; overflow-x: auto; white-space: nowrap; }
    .card-head .small { display: none; }
}
.form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form input, .form select { min-width: 0; max-width: 100%; }

/* =====================================================================
   Étape 3 — contenus à fournir, fichiers, validations
   ===================================================================== */

.count { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--bg); padding: .15rem .55rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
.count-warn { background: var(--warning-soft); color: var(--warning); }
.count-ok { background: var(--success-soft); color: var(--success); }
.card-head form { margin: 0; }

.contents { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.content { border: 1px solid var(--border); border-left: 4px solid #e0a100; border-radius: 10px; padding: .75rem .9rem; }
.content-recu   { border-left-color: var(--primary); }
.content-valide { border-left-color: var(--success); background: #fbfdfc; }
.content-form { margin: 0; gap: .5rem; }
.content-top { display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px; gap: .5rem; }
.content-top input, .content-top select { padding: .45rem .6rem; }
.content-title { font-weight: 600; }
.content-tools { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.content-tools form { margin: 0; }
.upload-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.upload-inline input[type=file] { font-size: .85rem; max-width: 260px; }

.content-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.content-name { display: block; }
.content-hint { margin: .3rem 0 0; }
.content p { margin: .3rem 0 0; }
.badge-content-manquant { background: var(--warning-soft); color: var(--warning); }
.badge-content-recu     { background: var(--primary-soft); color: var(--primary); }
.badge-content-valide   { background: var(--success-soft); color: var(--success); }

.files { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.files li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--bg); border-radius: 8px; padding: .4rem .6rem; }
.files a { font-weight: 600; word-break: break-all; }
.files form { margin: 0 0 0 auto; }

.upload-box { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; margin-top: .75rem; }
.upload-label { position: relative; flex: 1 1 220px; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem .8rem; border: 2px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: .9rem; text-align: center; cursor: pointer; }
.upload-label:hover, .upload-label:focus-within { border-color: var(--primary); color: var(--primary); }
.upload-label.has-files { border-style: solid; border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.upload-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-box .btn { margin: 0; }

.alerts-mini { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.alerts-mini a { display: inline-block; font-size: .85rem; font-weight: 600; text-decoration: none; background: var(--warning-soft); color: var(--warning); padding: .3rem .7rem; border-radius: 999px; }

/* Validations */
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #0f6249; color: #fff; }
.validate-box { margin-top: .75rem; padding: .85rem; background: var(--warning-soft); border-radius: 10px; gap: .4rem; }
.validate-box label { margin-top: .25rem; font-weight: 400; }
.validate-box textarea { background: #fff; }
.validate-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .25rem; }
.validate-actions .btn { margin-top: 0; }
.validate-box p { margin: 0; }
.validation-note { font-size: .875rem; margin: .5rem 0 0 !important; padding: .4rem .6rem; border-radius: 6px; }
.validation-validee { background: var(--success-soft); color: var(--success); }
.validation-modifications_demandees { background: var(--warning-soft); color: var(--warning); }
.validation-note .muted, .validation .muted { color: var(--text); opacity: .8; }

.validations { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .35rem; }
.validation { font-size: .875rem; padding: .45rem .6rem; border-radius: 6px; }
.validation p { margin: .3rem 0 0; color: var(--text); }

@media (max-width: 640px) {
    .content-top { grid-template-columns: 1fr; }
    .content-tools { flex-direction: column; align-items: stretch; }
    .upload-inline input[type=file] { max-width: 100%; }
}

/* Arborescence */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.tree { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.tree li { position: relative; padding: .3rem 0 .3rem 1.1rem; border-bottom: 1px solid var(--border); }
.tree li:last-child { border-bottom: 0; }
.tree li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.tree .tree-l0 { font-weight: 600; }
.tree .tree-l1 { margin-left: 1.1rem; }
.tree .tree-l2 { margin-left: 2.2rem; color: var(--muted); }
.tree .tree-l3 { margin-left: 3.3rem; color: var(--muted); }
.tree .tree-l1::before, .tree .tree-l2::before, .tree .tree-l3::before { background: var(--border); }
