/* ==========================================================================
   Module Archives — feuille de style
   Seulement ce qui n'existe pas dans le socle. Couleurs du socle, par leur
   nom : aucun code hexadécimal ici.
   ========================================================================== */

.icone-archives           { background: var(--mauve); }
.icone-archives-gestion   { background: var(--fonce); }

/* --- Recherche ------------------------------------------------------------- */
.arch-recherche { margin-bottom: 1.2rem; }
.arch-recherche__ligne { display: flex; flex-wrap: wrap; gap: .6rem; }
.arch-recherche__ligne input[type=search] { flex: 1 1 18rem; min-width: 0; }
.arch-recherche__ligne select { width: auto; flex: 0 1 14rem; }
.arch-recherche__plus { margin-top: .7rem; }
.arch-recherche__plus summary { cursor: pointer; color: var(--primaire); font-size: .9rem; font-weight: 600; }
.arch-recherche__criteres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .2rem 1rem; align-items: end; margin-top: .6rem;
}
.arch-case { display: flex; align-items: flex-start; gap: .5rem; margin: .4rem 0; font-weight: normal; cursor: pointer; }
.arch-case input { width: auto; margin-top: .2rem; }

/* --- Cartes d'archives ---------------------------------------------------- */
.arch-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.arch-carte { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--ink); border-top: 3px solid var(--mauve); }
.arch-carte:hover { box-shadow: var(--ombre-forte); }
.arch-carte strong { color: var(--fonce); font-size: 1.05rem; }

.arch-statut {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--bg-deep); color: var(--fonce); white-space: nowrap;
}
.arch-statut--termine { color: var(--succes); }
.arch-statut--erreur  { background: var(--alerte-pale); color: var(--alerte); }
.arch-statut--import, .arch-statut--analyse { color: var(--accent-fonce); background: var(--accent-pale); }

/* --- Dossiers + liste ------------------------------------------------------ */
.arch-vue--arbre { display: grid; grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .arch-vue--arbre { grid-template-columns: 1fr; } }
.arch-arbre { padding: .5rem; max-height: 75vh; overflow-y: auto; position: sticky; top: calc(var(--barre-h) + 1rem); }
@media (max-width: 860px) { .arch-arbre { position: static; max-height: 16rem; } }
.arch-arbre__lien {
  display: flex; justify-content: space-between; gap: .5rem; padding: .3rem .5rem;
  border-radius: var(--rayon); text-decoration: none; color: var(--ink); font-size: .9rem;
}
.arch-arbre__lien span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-arbre__lien small { color: var(--ink-soft); }
.arch-arbre__lien:hover { background: var(--bg-soft); }
.arch-arbre__lien.actif { background: var(--bg-deep); color: var(--fonce); font-weight: 700; }
.arch-prof-1 { padding-left: 1.2rem; } .arch-prof-2 { padding-left: 1.9rem; } .arch-prof-3 { padding-left: 2.6rem; }
.arch-prof-4 { padding-left: 3.3rem; } .arch-prof-5, .arch-prof-6, .arch-prof-7, .arch-prof-8 { padding-left: 4rem; }

.arch-compte { margin: 0 0 .5rem; }
.arch-date { white-space: nowrap; font-size: .86rem; color: var(--ink-soft); }
.arch-de { max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-objet { color: var(--fonce); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.arch-objet:hover { text-decoration: underline; color: var(--primaire); }
.arch-trombone { margin-left: .4rem; font-size: .75rem; color: var(--ink-soft); white-space: nowrap; }
.arch-extrait { margin: .25rem 0 0; font-size: .84rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.arch-tableau mark, .arch-corps mark { background: var(--accent-pale); color: inherit; box-shadow: 0 0 0 1px var(--accent); border-radius: 2px; }

/* --- Un message ------------------------------------------------------------ */
.arch-titre { overflow-wrap: anywhere; }
.arch-entetes { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .8rem; margin: 0 0 1rem; font-size: .92rem; }
.arch-entetes dt { color: var(--ink-soft); font-weight: 600; }
.arch-entetes dd { margin: 0; overflow-wrap: anywhere; }
.arch-pj { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1rem; }
.arch-pj li { padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--rayon); background: var(--bg-soft); font-size: .88rem; }
.arch-pj a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.arch-vues { display: flex; gap: .2rem; margin: 0 0 .6rem; }
.arch-onglet { padding: .35rem .8rem; border-radius: var(--rayon); text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .88rem; }
.arch-onglet.actif { background: var(--bg-deep); color: var(--fonce); }
.arch-cadre { width: 100%; height: 60vh; min-height: 20rem; border: 1px solid var(--line); border-radius: var(--rayon); background: var(--bg); resize: vertical; }
.arch-corps { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--police); font-size: .95rem; line-height: 1.5; margin: 0; }

/* --- Assistant ------------------------------------------------------------- */


/* --- Gestion --------------------------------------------------------------- */
.arch-suivi progress { display: block; width: 100%; min-width: 8rem; margin: .3rem 0 .1rem; }
.arch-progression progress { width: 100%; }
.arch-actions { white-space: nowrap; }
.arch-actions form { display: inline; }
.arch-danger { color: var(--alerte); }
.arch-avert { color: var(--attention); font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.arch-chemin { display: block; padding: .4rem .6rem; background: var(--bg-soft); border-radius: var(--rayon); overflow-wrap: anywhere; font-size: .85rem; }
.arch-depot { padding: .7rem 0; border-top: 1px solid var(--line); }
.arch-depot p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.arch-en-ligne { display: inline; margin-left: .4rem; }
.arch-utilisateurs { border: 1px solid var(--line); border-radius: var(--rayon); padding: .5rem .8rem; max-height: 22rem; overflow-y: auto; margin: .6rem 0; }
.arch-utilisateurs .arch-avert { display: block; }
.arch-attenue { opacity: .5; }
.arch-sous-titre { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.arch-tache { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .8rem; }
.arch-tache dt { font-weight: 600; color: var(--ink-soft); }
.arch-tache dd { margin: 0; overflow-wrap: anywhere; }
.arch-tache code { font-size: .85rem; }

/* Un bouton du socle impose son affichage : « hidden » doit l'emporter. */
[data-arch-envoi] [hidden], [data-arch-moteur][hidden] { display: none !important; }
.arch-crm { margin: 0 0 .8rem; padding: .4rem .7rem; border-radius: var(--rayon); background: var(--bg-soft); font-size: .9rem; }

/* Annuaire des correspondants (1.5.0) */
.icone-archives-annuaire { background: var(--mauve); }
.arch-annuaire-option { margin: .6rem 0 0; }
.arch-annuaire .nombre { text-align: right; white-space: nowrap; }
.arch-annuaire td { vertical-align: top; overflow-wrap: anywhere; }
.arch-annuaire .etat { margin-left: .3rem; }
.arch-annuaire .arch-en-ligne { margin-left: 0; }
.arch-annuaire-crm { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .6rem 0 1rem; }
.arch-annuaire-crm .arch-case { flex-basis: 100%; margin: 0; }
