/* Devenir Locataire — téléphone d'abord côté candidat, poste de travail côté agence. */
:root {
    --encre: #1d2330; --doux: #5f6878; --ligne: #e3e6ec; --fond: #f6f7f9; --carte: #fff;
    --accent: #1f6f5c; --accent-clair: #e3f1ec; --alerte: #b4521f; --alerte-clair: #fbeee4; --rouge: #b42f2f; --rouge-clair: #fbe9e9;
    --bleu: #2c5aa0; --bleu-clair: #e6eef9;
}
html { font-size: 16px; }
body { background: var(--fond); color: var(--encre); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 1.6em; height: 1.6em; }
.conteneur { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Bandeau candidat */
.bandeau { background: var(--carte); border-bottom: 1px solid var(--ligne); padding: 10px 0; position: sticky; top: 0; z-index: 20; }
.marque { display: inline-flex; align-items: center; gap: 8px; color: var(--encre); text-decoration: none; font-weight: 650; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; }
.lien-bandeau { color: var(--encre); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; }
.lien-bandeau:hover { background: var(--fond); }
.pied { color: var(--doux); font-size: 13px; padding: 24px 0 40px; }
.pied a { color: var(--doux); }

/* Cartes, titres */
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; padding: 16px; }
.carte + .carte { margin-top: 12px; }
h1 { font-size: 1.5rem; font-weight: 650; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
.sous-titre { color: var(--doux); }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus { background: #185a4a; border-color: #185a4a; }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); }
.form-label { font-weight: 550; margin-bottom: 4px; }
.aide { color: var(--doux); font-size: 0.875rem; }
.obligatoire::after { content: " *"; color: var(--rouge); }

/* Logement (page de dépôt) */
.logement-photo { width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px; background: var(--ligne); }
.chiffres { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.chiffres div { min-width: 110px; }
.chiffres b { display: block; font-size: 1.1rem; }

/* Dossier candidat */
.onglets-personnes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.onglets-personnes a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--ligne); background: var(--carte); color: var(--encre); text-decoration: none; font-size: 0.92rem; }
.onglets-personnes a.actif { background: var(--accent); border-color: var(--accent); color: #fff; }
.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.etapes a { text-align: center; padding: 8px 4px; border-radius: 8px; background: var(--carte); border: 1px solid var(--ligne); color: var(--doux); text-decoration: none; font-size: 0.82rem; }
.etapes a.actif { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.etapes a.fait { color: var(--accent); }
.etapes a .num { display: block; font-weight: 700; font-size: 1rem; }
.progression { height: 8px; background: var(--ligne); border-radius: 99px; overflow: hidden; }
.progression > div { height: 100%; background: var(--accent); }
.etat-enregistrement { font-size: 0.85rem; color: var(--doux); min-height: 1.3em; }
.etat-enregistrement.erreur { color: var(--rouge); }
.panneau { border: 1px solid var(--ligne); border-radius: 10px; background: var(--carte); margin-bottom: 10px; }
.panneau > summary { list-style: none; padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.panneau > summary::-webkit-details-marker { display: none; }
.panneau > .corps { padding: 0 14px 14px; }
.pastille { font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.pastille.ok { background: var(--accent-clair); color: var(--accent); }
.pastille.manque { background: var(--alerte-clair); color: var(--alerte); }
.pastille.refus { background: var(--rouge-clair); color: var(--rouge); }
.pastille.info { background: var(--bleu-clair); color: var(--bleu); }
.manquants { background: var(--alerte-clair); border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; }
.manquants a { color: var(--alerte); }
.piece { border: 1px solid var(--ligne); border-radius: 10px; padding: 12px; background: var(--carte); margin-bottom: 10px; }
.piece.manque { border-color: #f0c9a9; }
.piece .doc { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; padding: 6px 0; border-top: 1px dashed var(--ligne); }
.zone-depot { border: 2px dashed var(--ligne); border-radius: 10px; padding: 12px; text-align: center; color: var(--doux); }
.zone-depot.survol { border-color: var(--accent); background: var(--accent-clair); }

/* Espace agence */
.espace-agence { display: flex; min-height: 100vh; }
.menu-agence { width: 220px; flex: 0 0 220px; background: var(--carte); border-right: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; position: sticky; top: 0; height: 100vh; }
.menu-agence .marque { margin: 0 6px 14px; }
.menu-agence > a:not(.marque) { color: var(--encre); text-decoration: none; padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.menu-agence > a.actif, .menu-agence > a:not(.marque):hover { background: var(--accent-clair); color: var(--accent); }
.menu-agence .qui { padding: 10px; border-top: 1px solid var(--ligne); }
.contenu-agence { flex: 1; min-width: 0; padding: 20px 24px 60px; }
@media (max-width: 860px) {
    .espace-agence { flex-direction: column; }
    .menu-agence { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; flex-basis: auto; }
    .menu-agence .qui { border-top: 0; margin-top: 0; }
    .contenu-agence { padding: 16px; }
}
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tuile { background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; padding: 12px 14px; color: var(--encre); text-decoration: none; }
.tuile b { display: block; font-size: 1.6rem; line-height: 1.1; }
.tuile:hover { border-color: var(--accent); }
.table-dl { background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; overflow: hidden; }
.table-dl table { margin: 0; }
.table-dl th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--doux); font-weight: 600; background: #fafbfc; }
.table-dl tr.cliquable { cursor: pointer; }
.table-dl tr.non-lu td:first-child { border-left: 3px solid var(--bleu); }
.carte-decision { border-left: 4px solid var(--accent); }
.carte-decision.alerte { border-left-color: var(--alerte); }
.synthese { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.synthese > div { background: var(--fond); border-radius: 8px; padding: 10px 12px; }
.synthese b { display: block; font-size: 1.25rem; }
.taux-vert { color: var(--accent); } .taux-orange { color: var(--alerte); } .taux-rouge { color: var(--rouge); }
.controle { font-size: 0.86rem; padding: 6px 10px; border-radius: 6px; margin-top: 6px; }
.controle.r1 { background: var(--accent-clair); } .controle.r2 { background: var(--alerte-clair); } .controle.r3 { background: var(--rouge-clair); }
.visionneuse { width: 100%; height: 78vh; border: 1px solid var(--ligne); border-radius: 8px; background: #525659; }
.journal li { font-size: 0.86rem; padding: 4px 0; border-bottom: 1px solid var(--ligne); }
.messages { max-height: 380px; overflow-y: auto; }
.bulle { max-width: 85%; padding: 8px 12px; border-radius: 12px; margin: 6px 0; font-size: 0.92rem; white-space: pre-wrap; }
.bulle.agence { background: var(--accent-clair); margin-right: auto; }
.bulle.candidat { background: var(--bleu-clair); margin-left: auto; }
.bulle .qui { font-size: 0.75rem; color: var(--doux); }
.qr { width: 180px; height: 180px; }
[hidden] { display: none !important; }

/* Bulles d'aide (Ui.Aide) et lien « Aide de cette page » */
.bulle-aide { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #b8c0cc; background: #fff; color: var(--doux);
    font: italic 700 11px/1 Georgia, serif; padding: 0; margin: 0 4px; vertical-align: 2px; cursor: help; }
.bulle-aide:hover, .bulle-aide:focus, .bulle-aide.ouverte { border-color: var(--accent); color: #fff; background: var(--accent); outline: none; }
.infobulle { position: absolute; z-index: 1000; max-width: 320px; background: #1d2330; color: #fff; font-size: 0.86rem; line-height: 1.4; padding: 9px 12px;
    border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: none; }
.infobulle::after { content: ""; position: absolute; left: var(--fleche, 16px); top: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: #1d2330; }
.infobulle.dessus::after { top: auto; bottom: -6px; border-bottom: 0; border-top: 6px solid #1d2330; }
.aide-page { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--accent); color: #fff; border-radius: 999px; padding: 9px 15px; text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.18); font-weight: 600; font-size: 0.9rem; }
.aide-page:hover { color: #fff; background: #185a4a; }
@media print { .aide-page, .bulle-aide { display: none !important; } }

/* Pages d'aide */
.aide-recherche { position: sticky; top: 0; z-index: 10; background: var(--fond); padding: 10px 0; }
.aide-recherche input { font-size: 1.05rem; padding: 12px 14px 12px 40px; border-radius: 10px; }
.aide-recherche .ic { position: absolute; left: 14px; top: 23px; color: var(--doux); }
.rubrique { scroll-margin-top: 90px; }
.rubrique h2 { display: flex; align-items: center; gap: 8px; }
.rubrique .adresse { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; color: var(--doux); }
.rubrique ol li, .rubrique ul li { margin-bottom: 4px; }
.question summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.question p { margin: 0 0 8px; }
mark { background: #fff1a8; padding: 0 1px; border-radius: 2px; }
.sommaire-aide a { display: block; padding: 3px 0; color: var(--encre); text-decoration: none; font-size: 0.9rem; }
.sommaire-aide a:hover { color: var(--accent); }
.schema { width: 100%; height: auto; background: #fff; border: 1px solid var(--ligne); border-radius: 10px; }
.schema text { font-family: system-ui, "Segoe UI", sans-serif; }
@media print { .menu-agence, .bandeau, .pied, .no-print { display: none !important; } .contenu-agence { padding: 0; } }
