/* Kolla — écran de l'artisan. Couleurs et tailles reprises de la maquette.
   Police du téléphone (aucune police externe). Texte >= 14 px, zones tactiles >= 44 px. */

:root {
  --encre: #0E1A3A;
  --encre-2: #3A4766;
  --gris: #4A5470;
  --fond: #F7F3EA;
  --fond-page: #E9E3D4;
  --beige: #EFEADD;
  --bordure: #CFC8B6;
  --jaune: #FFC629;
  --jaune-pale: #FFF6D6;
  --jaune-texte: #8A6A00;
  --vert: #1D6B43;
  --rouge: #C2261D;
  --orange: #B85C00;
}

/* Les marges intérieures et bordures sont comprises dans la largeur (règle rétablie en passe 2). */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond-page);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--encre); }

:focus-visible { outline: 3px solid #E0A800; outline-offset: 2px; }

/* Une seule colonne, 430 px maximum, centrée sur ordinateur */
.appli {
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--fond);
  position: relative;
}

.contenu {
  padding: 22px 18px calc(124px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
  outline: none;
}

/* ---------- Éléments communs ---------- */
.titre-ecran { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.titre-bloc { font-size: 18px; font-weight: 800; }
.petit { font-size: 14px; color: var(--gris); }
.ligne-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.carte {
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.bouton-principal { background: var(--encre); color: #fff; }
.bouton-jaune { background: var(--jaune); color: var(--encre); }
.bouton-clair { background: #fff; color: var(--encre); border: 2px solid var(--bordure); }
.bouton-lien {
  background: transparent; color: var(--encre); text-decoration: underline;
  font-weight: 700; font-size: 15px; min-height: 44px; padding: 8px 0; justify-content: flex-start;
}
.bouton[aria-disabled="true"], .bouton:disabled { opacity: .55; cursor: not-allowed; }

.retour {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 0; padding: 8px 0;
  font-weight: 800; font-size: 16px; color: var(--encre);
  cursor: pointer; min-height: 44px;
}

.badge {
  display: inline-block; font-size: 14px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .3px;
}
.badge-urgent { background: var(--rouge); color: #fff; }
.badge-assez { background: var(--orange); color: #fff; }
.badge-calme { background: #E7E0CF; color: #2A3555; }
.etiquette { font-size: 14px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.etiquette-nouveau { background: #E6EBF7; color: #22336B; }
.etiquette-connu { background: #DDF5E7; color: var(--vert); }

.message-erreur {
  background: #FDECEA; color: #8C1D16; border-radius: 14px;
  padding: 14px 16px; font-weight: 700; font-size: 15px;
}
.info { font-size: 15px; color: var(--encre-2); }
.vide { background: #fff; border-radius: 18px; padding: 22px; text-align: center; font-weight: 700; color: var(--encre-2); }
.chargement { padding: 40px 0; text-align: center; font-size: 16px; color: var(--gris); }

/* ---------- Connexion ---------- */
.connexion { padding: 40px 20px; display: flex; flex-direction: column; gap: 18px; }
.connexion h1 { font-size: 32px; font-weight: 800; }
.connexion .intro { font-size: 17px; color: var(--encre-2); }
.connexion-logo {
  width: 64px; height: 64px; border-radius: 18px; background: var(--encre); color: var(--jaune);
  display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800;
}
.formulaire label { font-weight: 700; font-size: 16px; }
.formulaire input, .champ {
  display: block; min-width: 0; min-height: 52px; padding: 12px 14px;
  border: 2px solid var(--bordure); border-radius: 14px; background: #fff; font-size: 18px;
}
.formulaire input:focus, .champ:focus { border-color: var(--encre); }
#champ-code { letter-spacing: 6px; font-size: 22px; font-weight: 800; }
.mention { font-size: 14px; color: var(--gris); text-align: center; }

/* ---------- Ma journée ---------- */
.entete-journee { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.entete-journee .date { font-size: 15px; color: var(--gris); font-weight: 600; }
.entete-journee .bonjour { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.pilule-statut {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--encre); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 14px; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 44px; flex: none;
}
.pastille { width: 10px; height: 10px; border-radius: 50%; background: #9AA6C2; flex: none; }
.pastille-travaille { background: var(--jaune); }
.pastille-journee_finie { background: #9AA6C2; }
.pastille-conge { background: #E07A5F; }

.compteurs {
  background: var(--encre); color: #fff; border-radius: 22px; padding: 18px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.compteurs strong { display: block; font-size: 30px; line-height: 1.1; }
.compteurs .jaune { color: var(--jaune); }
.compteurs span { font-size: 14px; color: #D5DBEA; }

.carte-appel {
  background: #fff; border: 2px solid transparent; border-radius: 18px; padding: 14px 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  cursor: pointer; color: var(--encre); text-align: left; min-height: 44px;
}
.carte-appel.urgente { border-color: var(--jaune); }
.carte-appel .haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.carte-appel .quand { font-size: 14px; color: var(--gris); }
.carte-appel .objet { font-size: 17px; font-weight: 800; }
.carte-appel .bas { display: flex; gap: 8px; flex-wrap: wrap; font-size: 15px; color: var(--encre-2); }

.carte-proche {
  background: #fff; border: 2px dashed var(--bordure); border-radius: 18px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-align: left;
  cursor: pointer; color: var(--encre); min-height: 44px;
}
.carte-proche .haut { display: flex; justify-content: space-between; gap: 8px; }
.carte-proche .texte { font-size: 15px; color: var(--encre-2); }

.carte-traitee {
  background: var(--beige); border: 0; border-radius: 16px; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  cursor: pointer; color: var(--encre-2); min-height: 48px; text-align: left; font-weight: 600;
}
.carte-traitee .traite { font-size: 14px; font-weight: 800; color: var(--vert); flex: none; }

.bandeau-notif { background: var(--jaune-pale); border: 2px solid #E0A800; border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Fiche d'un appel ---------- */
.badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nom-client { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.objet-appel { font-size: 18px; font-weight: 600; color: var(--encre-2); }
.deux-boutons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deux-boutons .bouton { min-height: 58px; }
.autres-cartes { display: flex; gap: 14px; flex-wrap: wrap; font-size: 15px; }
.autres-cartes a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }

.carte-note { border: 2px solid var(--jaune); }
.etiquette-bloc { font-size: 14px; font-weight: 800; letter-spacing: 1px; color: var(--jaune-texte); text-transform: uppercase; }
.texte-note { font-size: 17px; line-height: 1.55; }
.conversation { display: flex; flex-direction: column; gap: 8px; }
.bulle { max-width: 88%; padding: 10px 13px; font-size: 15px; line-height: 1.45; }
.bulle-lucie { align-self: flex-start; background: var(--encre); color: #fff; border-radius: 16px 16px 16px 5px; }
.bulle-client { align-self: flex-end; background: #FFE9A8; border-radius: 16px 16px 5px 16px; }

.details { background: #fff; border-radius: 20px; padding: 4px 18px; }
.details .ligne { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--beige); font-size: 15px; }
.details .ligne:last-child { border-bottom: 0; }
.details .cle { color: var(--gris); flex: none; }
.details .valeur { font-weight: 700; text-align: right; }

.liste-sms { display: flex; flex-direction: column; gap: 10px; }
.bouton-sms {
  display: flex; align-items: center; gap: 10px; text-align: left; background: #fff;
  border: 2px solid var(--bordure); border-radius: 16px; padding: 14px; font-size: 16px;
  color: var(--encre); text-decoration: none; min-height: 52px;
}
.bouton-sms svg { flex: none; }
.bouton-sms .titre-sms { display: block; font-weight: 800; font-size: 15px; }

.case-materiel {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 0; border-radius: 16px;
  padding: 14px 16px; cursor: pointer; color: var(--encre); min-height: 60px; text-align: left;
}
.case {
  width: 30px; height: 30px; flex: none; border-radius: 8px; border: 2px solid var(--bordure);
  background: #fff; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.case-materiel[aria-pressed="true"] .case { background: var(--vert); border-color: var(--vert); }
.case-materiel strong { display: block; font-size: 16px; }

/* ---------- Clients ---------- */
.recherche label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; color: var(--gris); }
.liste { display: flex; flex-direction: column; gap: 10px; }
.carte-client {
  background: #fff; border: 0; border-radius: 18px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer; color: var(--encre); min-height: 56px;
}
.carte-client .haut { display: flex; justify-content: space-between; gap: 8px; }
.carte-client strong { font-size: 17px; }
.carte-client .bas { font-size: 15px; color: var(--encre-2); }

/* ---------- Lucie, ma collaboratrice virtuelle ---------- */
.statuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bouton-statut {
  background: #fff; border: 2px solid var(--bordure); border-radius: 14px; padding: 12px 6px;
  font-weight: 700; font-size: 15px; color: var(--encre); cursor: pointer; min-height: 56px;
}
.bouton-statut[aria-pressed="true"] { background: var(--jaune-pale); border-color: #E0A800; }
.carte-sombre { background: var(--encre); color: #fff; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.carte-sombre .etiquette-bloc { color: var(--jaune); }
.carte-sombre .phrase { font-size: 16px; line-height: 1.5; }
.carte-sombre .entre { font-size: 15px; color: #D5DBEA; }
.liste-coches { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.liste-coches li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.45; }
.liste-coches svg { flex: none; margin-top: 2px; }

.ligne-proche { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--beige); }
.ligne-proche .qui { display: flex; flex-direction: column; }
.ligne-proche .qui strong { font-size: 16px; }
.bouton-retirer {
  background: transparent; border: 2px solid var(--bordure); border-radius: 12px; min-height: 44px; min-width: 44px;
  padding: 6px 12px; font-weight: 700; font-size: 14px; cursor: pointer; color: #8C1D16;
}
.ajout-proche { display: flex; flex-direction: column; gap: 10px; background: var(--fond); border: 2px dashed var(--bordure); border-radius: 14px; padding: 14px; }
.ajout-proche label { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }

.jauge { height: 12px; border-radius: 999px; background: var(--beige); overflow: hidden; }
.jauge-remplie { height: 100%; width: 0; background: var(--jaune); }
.jauge-remplie.niveau-80 { background: var(--orange); }
.jauge-remplie.niveau-100 { background: var(--rouge); }
.jauge-grande { height: 16px; border: 1px solid var(--bordure); }
.compteur-conso { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.compteur-conso strong { font-size: 18px; }
.alerte-conso { background: var(--jaune-pale); border-left: 6px solid #E0A800; border-radius: 10px; padding: 10px 12px; font-size: 16px; font-weight: 700; color: var(--encre); }

/* ---------- Bannière de fin d'essai (jaune, bien visible, en haut de l'écran) ---------- */
.banniere-essai {
  background: var(--jaune); color: var(--encre); border: 3px solid var(--encre); border-radius: 18px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.banniere-essai h2 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.banniere-essai p { font-size: 17px; line-height: 1.45; font-weight: 600; }
.banniere-essai .bouton { background: var(--encre); color: #fff; }
.banniere-essai .bouton-clair { background: #fff; color: var(--encre); border-color: var(--encre); }
.formule-ligne { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--beige); font-size: 16px; }
.formule-ligne:last-child { border-bottom: 0; }
.formule-ligne.actuelle { font-weight: 800; }
.code-renvoi { font-size: 20px; font-weight: 800; letter-spacing: 1px; }

/* ---------- Devis, Mes prix, Mon profil légal (tâche 90 passe C) ----------
   Champs à 18 px (au moins 16 px : pas de zoom automatique sur iPhone), boutons d'au moins 44 px, texte d'au moins 14 px. */
select.champ { width: 100%; appearance: auto; }
textarea.champ { width: 100%; min-height: 110px; resize: vertical; line-height: 1.4; }
.formulaire-devis { display: flex; flex-direction: column; gap: 16px; }
.champ-bloc { display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.champ-bloc .libelle { font-weight: 700; font-size: 16px; }
.champ-bloc .champ { width: 100%; }
.champ-bloc .marque { font-weight: 600; font-size: 15px; color: var(--gris); }
.champ-manquant .champ { border-color: var(--rouge); }
.marque-manquant { align-self: flex-start; background: #FDECEA; color: #8C1D16; font-weight: 800; font-size: 14px; padding: 3px 9px; border-radius: 999px; }
.aide { font-size: 15px; color: var(--encre-2); font-weight: 400; }
.aide-tva { background: var(--jaune-pale); border-left: 6px solid #E0A800; border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--encre); }
.info-ok { background: #DDF5E7; color: var(--vert); border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.bloc-manquants { display: flex; flex-direction: column; gap: 10px; }
.bloc-manquants ul { margin: 0; padding-left: 22px; }
.deux-choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.case-bordee { border: 2px solid var(--bordure); }
.case-bordee strong { font-size: 16px; }

.carte-devis { background: #fff; border-radius: 18px; padding: 6px 6px 10px; display: flex; flex-direction: column; gap: 6px; }
.carte-devis.en-attente { border: 2px solid var(--orange); }
.carte-devis .ouvrir {
  background: transparent; border: 0; text-align: left; padding: 10px; min-height: 56px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; color: var(--encre);
}
.carte-devis .haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.carte-devis strong { font-size: 17px; }
.carte-devis .bas { font-size: 15px; color: var(--encre-2); }
.carte-devis .bouton-petit { margin: 0 10px; }
.pastille-attente { background: var(--orange); color: #fff; font-size: 14px; font-weight: 800; padding: 3px 10px; border-radius: 999px; flex: none; }
.bouton-petit {
  background: var(--jaune); color: var(--encre); border: 2px solid var(--encre); border-radius: 12px;
  min-height: 44px; min-width: 44px; padding: 6px 14px; font-weight: 800; font-size: 15px; cursor: pointer; flex: none;
}
.lien-devis { background: transparent; border: 0; padding: 4px 0; text-align: left; cursor: pointer; color: var(--encre); min-height: 44px; }

.ligne-devis { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--beige); }
.ligne-devis:last-child { border-bottom: 0; }
.ligne-devis .quoi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ligne-devis .combien { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; text-align: right; }
.totaux .total-ligne { font-size: 16px; }
.total-final { font-size: 20px; font-weight: 800; }
.provisoire { background: var(--beige); border: 2px dashed var(--bordure); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.liste-simple { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
details.carte summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }

.carte-article { border: 2px solid transparent; }
.carte-article.sans-prix, .carte-article:has(.etiquette-a-saisir) { border-color: #F2C4BF; }
.etiquette-a-saisir { background: #FDECEA; color: #8C1D16; flex: none; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtre {
  background: #fff; border: 2px solid var(--bordure); border-radius: 999px; min-height: 44px; padding: 6px 14px;
  font-size: 15px; font-weight: 700; color: var(--encre); cursor: pointer;
}
.filtre[aria-pressed="true"] { background: var(--jaune-pale); border-color: #E0A800; }

/* ---------- Message en bas et menu ---------- */
.toast {
  position: fixed;
  left: max(18px, calc(50% - 197px)); right: max(18px, calc(50% - 197px));
  bottom: calc(96px + env(safe-area-inset-bottom));
  background: var(--vert); color: #fff; border-radius: 14px; padding: 14px 16px;
  font-weight: 700; font-size: 15px; z-index: 20;
}
.toast.erreur { background: #8C1D16; }

.menu {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 10;
  min-height: 78px; padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid #E7E0CF;
  /* 3 onglets, ou 4 en formule Pro (onglet « Devis ») : chaque onglet prend la même largeur. */
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
}
.onglet {
  background: transparent; border: 0; border-top: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 14px; font-weight: 600; color: var(--gris); cursor: pointer; min-height: 44px;
  text-align: center; line-height: 1.2;
}
.onglet[aria-current="page"] { font-weight: 800; color: var(--encre); border-top-color: var(--jaune); }

@media (prefers-reduced-motion: no-preference) {
  .bouton, .onglet, .carte-appel { transition: background-color .15s, border-color .15s; }
}

/* ---------- Tâche 90 passe F : photos du client, bilan du mois, relances ---------- */
.info-fort { font-weight: 800; font-size: 17px; color: var(--encre); }
.bouton-danger { background: #8C1D16; color: #fff; }
.valeur-fixe { font-size: 17px; font-weight: 800; padding: 10px 0; }

.bloc-photos { display: flex; flex-direction: column; gap: 10px; }
.vignettes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vignette {
  aspect-ratio: 1; min-height: 88px; min-width: 44px; padding: 0; overflow: hidden;
  border: 2px solid var(--bordure); border-radius: 14px; background: var(--beige); cursor: pointer;
}
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
.vignette-absente { font-size: 14px; color: var(--gris); padding: 6px; }

/* Fenêtres posées par-dessus l'écran (sous le message « toast », pour qu'il reste lisible). */
.voile {
  position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.voile-photo { background: rgba(14, 26, 58, .96); color: #fff; }
.voile-haut { display: flex; justify-content: flex-end; }
.voile-image { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.photo-grande { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.voile-texte { margin: 0; font-size: 16px; text-align: center; color: #fff; }
.voile-question { z-index: 16; background: rgba(14, 26, 58, .6); justify-content: center; }
.boite-question {
  background: #fff; color: var(--encre); border-radius: 20px; padding: 20px; width: 100%; max-width: 430px;
  margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
}
.boite-question .question { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; }

.bilan { display: flex; flex-direction: column; gap: 4px; }
.chiffre-bilan { margin: 0; padding: 10px 0; font-size: 17px; border-bottom: 1px solid var(--beige); }
.chiffre-bilan:last-child { border-bottom: 0; }
.chiffre-bilan strong { font-size: 30px; line-height: 1.1; padding: 0 2px; }
