/*
 * Wizabeth — theme "Contour", identique a l'app iOS.
 * Fond BLANC, contour NOIR 2px partout, ombre DURE sans flou
 * (box-shadow decale, jamais de blur), violet = justifie/valide,
 * ambre = en attente.
 *
 * SEUL CSS statique de l'espace client : chaque page se contente de le
 * charger (voir base.html) -- aucun <style> propre a une page.
 *
 * DUPLIQUE VOLONTAIREMENT depuis espace_comptable/static/espace_comptable/
 * contour.css (chantier espace client web, 13/09/2026) : espace_comptable
 * est en production, utilise par de vrais cabinets -- factoriser un fichier
 * commun aux deux apps aurait couple leurs evolutions futures (navigation
 * et ecrans deja voues a diverger) et fait courir un risque de regression
 * sur le portail comptable pour un chantier qui n'en avait pas besoin.
 * Dette assumee et reversible : si les deux fichiers doivent un jour
 * evoluer ensemble, factoriser a ce moment-la, pas avant.
 */

:root {
  --zc-noir: #141414;
  --zc-blanc: #ffffff;
  --zc-violet: #6D3CBE;
  --zc-violet-lo: #EFE8FB;
  --zc-ambre: #FDB515;
  --zc-ambre-lo: #FFF3D8;
  --zc-texte-s: #6E6E6A;
  --trait: 2px;
  --rayon: 20px;
  --rayon-petit: 13px;
  --ombre: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--zc-blanc);
  color: var(--zc-noir);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a { color: inherit; }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.2px; margin: 0; }

/* --- En-tete --- */
.zc-entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  border-bottom: var(--trait) solid var(--zc-noir);
}
.zc-marque {
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
}
.zc-marque .accent { color: var(--zc-violet); }
.zc-marque .sous {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--zc-texte-s);
  letter-spacing: 0.2px;
}

/* --- Bandeau (pages non connectees : accueil/connexion/inscription) --- */
.zc-bandeau {
  border-bottom: var(--trait) solid var(--zc-noir);
  padding: 28px 24px;
  text-align: center;
}
.zc-bandeau .zc-marque { font-size: 24px; }
.zc-bandeau .sous { margin-top: 4px; font-size: 13px; color: var(--zc-texte-s); }

/* --- Mise en page --- */
.zc-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.zc-page--etroite { max-width: 460px; }
.zc-titre { font-size: 25px; margin-bottom: 4px; }
.zc-sous-titre { color: var(--zc-texte-s); margin: 4px 0 24px; font-size: 15px; }
.zc-retour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 20px;
}
.zc-retour:hover { text-decoration: underline; }

/* --- Boites --- */
.boite {
  background: var(--zc-blanc);
  border: var(--trait) solid var(--zc-noir);
  border-radius: var(--rayon);
}
.boite--ombre { box-shadow: var(--ombre) var(--ombre) 0 var(--zc-noir); }
.boite--petite { border-radius: var(--rayon-petit); }
.boite--pad { padding: 32px; }

/* --- Pastilles (statut) --- */
.pastille {
  display: inline-block;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  border: 1.5px solid var(--zc-noir);
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.pastille--violet { background: var(--zc-violet); color: var(--zc-blanc); }
.pastille--violet-lo { background: var(--zc-violet-lo); color: var(--zc-violet); }
.pastille--ambre { background: var(--zc-ambre); color: var(--zc-noir); }
.pastille--ambre-lo { background: var(--zc-ambre-lo); color: var(--zc-noir); }
.pastille--claire { background: var(--zc-blanc); color: var(--zc-noir); }

/* --- Boutons --- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  height: 48px;
  padding: 0 22px;
  border: var(--trait) solid var(--zc-noir);
  border-radius: 16px;
  box-shadow: var(--ombre) var(--ombre) 0 var(--zc-noir);
  background: var(--zc-blanc);
  color: var(--zc-noir);
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s ease-out, box-shadow .06s ease-out;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.bouton:hover { text-decoration: none; }
.bouton:active {
  transform: translate(var(--ombre), var(--ombre));
  box-shadow: 0 0 0 var(--zc-noir);
}
.bouton--violet { background: var(--zc-violet); color: var(--zc-blanc); }
.bouton--ambre { background: var(--zc-ambre); color: var(--zc-noir); }
.bouton--pleine { width: 100%; }
.bouton--petit { height: 40px; font-size: 13.5px; padding: 0 16px; border-radius: var(--rayon-petit); }
.bouton--texte {
  background: none;
  border: none;
  box-shadow: none;
  height: auto;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
  color: var(--zc-noir);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bouton--texte:active { transform: none; }

/* --- Formulaires --- */
.zc-champ { margin-bottom: 4px; }
.zc-champ label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin: 18px 0 8px;
}
.zc-champ .aide { font-size: 12.5px; color: var(--zc-texte-s); margin: 4px 0 0; }

form p { margin: 0 0 4px; }
form label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin: 18px 0 8px;
}
form input[type=text],
form input[type=email],
form input[type=password],
.zc-champ input[type=text],
.zc-champ input[type=email],
.zc-champ input[type=password] {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: var(--trait) solid var(--zc-noir);
  border-radius: var(--rayon-petit);
  font-size: 16px;
  font-family: inherit;
  background: var(--zc-blanc);
  color: var(--zc-noir);
}
form input:focus,
.zc-champ input:focus {
  outline: none;
  border-color: var(--zc-violet);
  box-shadow: 0 0 0 4px var(--zc-violet-lo);
}
form ul.errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: var(--zc-noir);
  background: var(--zc-ambre-lo);
  border: 1.5px solid var(--zc-noir);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
form ul.errorlist li { padding: 8px 12px; }
form small.aide,
form .helptext { font-size: 12.5px; color: var(--zc-texte-s); }

/* Code de rattachement : grande saisie centree, capitales */
.zc-code {
  width: 100%;
  box-sizing: border-box;
  height: 64px;
  padding: 0 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  border: var(--trait) solid var(--zc-noir);
  border-radius: var(--rayon-petit);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--zc-blanc);
  color: var(--zc-noir);
}
.zc-code:focus {
  outline: none;
  border-color: var(--zc-violet);
  box-shadow: 0 0 0 4px var(--zc-violet-lo);
}

/* --- Messages --- */
.zc-message {
  border: var(--trait) solid var(--zc-noir);
  border-radius: var(--rayon-petit);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14.5px;
  font-weight: 600;
}
.zc-message--succes { background: var(--zc-violet-lo); color: var(--zc-noir); }
.zc-message--attente { background: var(--zc-ambre-lo); color: var(--zc-noir); }
.zc-message--erreur { background: var(--zc-ambre-lo); color: var(--zc-noir); border-color: var(--zc-noir); }

/* --- Etat vide --- */
.zc-vide {
  text-align: center;
  padding: 64px 24px;
  color: var(--zc-texte-s);
  font-size: 15px;
  line-height: 1.6;
}

/* --- Cartes (societes / dossiers) --- */
.zc-carte {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  margin-bottom: 14px;
}
.zc-carte h3 { font-size: 17px; margin-bottom: 4px; }
.zc-carte .zc-detail { color: var(--zc-texte-s); font-size: 13.5px; }

/* --- Utilitaires --- */
.zc-espace { flex: 1; }
.zc-texte-s { color: var(--zc-texte-s); font-size: 13.5px; }
.zc-lien-violet { color: var(--zc-violet); font-weight: 700; text-decoration: none; }
.zc-lien-violet:hover { text-decoration: underline; }

/* --- Barre d'onglets fixe en bas (13/09/2026, langage app iOS -- voir
   captures /var/www/wizabeth-site + espace_comptable/static/.../
   presentation/01-tableau-de-bord.jpg) : remplace l'ancienne nav du haut
   (zc-onglets), l'espace client s'adresse aux memes utilisateurs que
   l'app (dirigeants de TPE sur mobile), pas aux experts-comptables du
   portail espace_comptable -- jamais un menu de back-office. Fixe en bas
   sur TOUTE largeur (pas seulement mobile) : "le desktop, c'est la meme
   interface elargie", pas un chrome different. */
.zc-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  background: var(--zc-blanc);
  border-top: var(--trait) solid var(--zc-noir);
  padding: 8px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
}
.zc-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--zc-texte-s);
  font-size: 11px;
  font-weight: 700;
}
.zc-tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.zc-tab--actif { color: var(--zc-violet); }
/* Espace reserve en bas de page pour ne jamais passer sous la barre fixe. */
.zc-page--avec-onglets { padding-bottom: 96px; }

/* --- Anneaux de statistiques (accueil, 3 indicateurs comme dans l'app) --- */
.zc-anneaux {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.zc-anneau {
  flex: 1;
  text-align: center;
  padding: 18px 8px 20px;
  min-width: 0;
}
.zc-anneau--ambre { background: var(--zc-ambre-lo); }
.zc-anneau--violet { background: var(--zc-violet-lo); }
.zc-anneau--vert { background: #E3F5EA; }
.zc-anneau-badge {
  width: 26px;
  height: 26px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: var(--trait) solid var(--zc-noir);
  background: var(--zc-blanc);
  display: flex;
  align-items: center;
  justify-content: center;
}
.zc-anneau-badge svg { width: 14px; height: 14px; stroke: var(--zc-noir); fill: none; stroke-width: 2; }
.zc-anneau-cercle { position: relative; width: 76px; height: 76px; margin: 0 auto; }
.zc-anneau-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.zc-anneau-trace { fill: none; stroke-width: 9; }
.zc-anneau-fond { stroke: rgba(20,20,20,0.12); }
.zc-anneau-trace--ambre { stroke: var(--zc-ambre); }
.zc-anneau-trace--violet { stroke: var(--zc-violet); }
.zc-anneau-trace--vert { stroke: #1E8E5A; }
.zc-anneau-valeur {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.zc-anneau-libelle { font-weight: 800; font-size: 13px; margin-top: 10px; }
.zc-anneau-sous { color: var(--zc-texte-s); font-size: 11px; }

/* --- Listes en cartes (dossiers / operations / factures) : remplace les
   tableaux, lisible au pouce sur mobile, pas de scroll horizontal. --- */
.zc-liste-cartes { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.zc-ligne-carte {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
.zc-ligne-carte-date {
  flex: none;
  width: 42px;
  text-align: center;
  font-size: 11px;
  color: var(--zc-texte-s);
  line-height: 1.25;
  font-weight: 700;
}
.zc-ligne-carte-corps { flex: 1; min-width: 0; }
.zc-ligne-carte-titre {
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zc-ligne-carte-sous { color: var(--zc-texte-s); font-size: 12.5px; margin-top: 2px; }
.zc-ligne-carte-montant { flex: none; font-weight: 800; font-size: 15px; white-space: nowrap; }
.zc-ligne-carte-montant--credit { color: var(--zc-violet); }
.zc-ligne-carte-etat { flex: none; }

/* --- Barre de recherche (pill, comme l'app) --- */
.zc-recherche {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border: var(--trait) solid var(--zc-noir);
  border-radius: 24px;
  background: var(--zc-blanc);
  margin-top: 16px;
}
.zc-recherche svg { width: 18px; height: 18px; stroke: var(--zc-texte-s); fill: none; stroke-width: 2; flex: none; }
.zc-recherche input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  font-family: inherit;
  background: none;
  color: var(--zc-noir);
}

.zc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--zc-noir);
  white-space: nowrap;
}
.zc-badge--violet { background: var(--zc-violet-lo); color: var(--zc-violet); border-color: var(--zc-violet); }
.zc-badge--ambre { background: var(--zc-ambre-lo); color: #8a5a00; border-color: var(--zc-ambre); }
.zc-pagination { display: flex; gap: 12px; margin-top: 20px; align-items: center; justify-content: center; }

@media (max-width: 480px) {
  .zc-anneau-libelle { font-size: 12px; }
  .zc-anneau-cercle { width: 64px; height: 64px; }
  .zc-anneau-valeur { font-size: 17px; }
}

/* --- Fiche de presentation (galerie de captures + partenaires) --- */
.zc-groupe { margin: 0 0 44px; }
.zc-galerie {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.zc-galerie img {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: var(--rayon-petit);
  display: block;
}
.zc-certifications { margin: 8px 0 24px; }
.zc-certifications-grille {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.zc-certif-carte { flex: 1 1 280px; }
.zc-certif-carte h3 { margin-bottom: 8px; }
