/* Espaces connectés (artisan, gestionnaire, équipe). Préfixe .esp- ; jetons de style.css ; clair et sombre. */
.esp{padding:14px max(var(--gouttiere),env(safe-area-inset-left,0px)) 56px max(var(--gouttiere),env(safe-area-inset-right,0px))}
.esp-cadre{max-width:1180px;margin:0 auto}
.esp-artisan .esp-cadre{max-width:580px}
.esp-cache{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.esp-sans-marge{margin-bottom:0}
.esp-h2.esp-sans-marge{margin-top:0}
.esp-marge-haut{margin-top:16px}
.esp-rouge{color:var(--rouge)}
.esp-ok{color:var(--vert)}
.esp-h2{font-size:20px;margin:24px 0 10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.esp h3{font-size:17px;margin:0}

/* en-tête et onglets */
.esp-tete{padding:6px 0 2px}
.esp-sur{margin:0;font-size:12.5px;font-weight:800;color:var(--vert);text-transform:uppercase;letter-spacing:.07em}
.esp-tete h1{font-size:clamp(24px,3.2vw,34px);margin:2px 0 0}
.esp-onglets{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;margin:12px 0 16px;border-bottom:1px solid var(--trait);-webkit-overflow-scrolling:touch}
.esp-onglets::-webkit-scrollbar{display:none}
.esp-onglets a,.esp-sortie{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;font-weight:650;font-size:15px;color:var(--doux);text-decoration:none;border-bottom:3px solid transparent;margin-bottom:-1px;white-space:nowrap}
.esp-onglets a:hover{color:var(--encre)}
.esp-onglets a[aria-current=page]{color:var(--encre);border-bottom-color:var(--vert)}
.esp-sortie{margin-left:auto;background:none;border-top:0;border-left:0;border-right:0;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.esp-sortie:hover{color:var(--rouge)}
.esp-pastille{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--rouge);color:#fff;font-size:12.5px;font-weight:800;letter-spacing:0}
.esp-annonce{display:flex;justify-content:space-between;align-items:center;gap:10px;background:var(--rouge);color:#fff;border-radius:14px;padding:12px 14px;font-weight:700;text-decoration:none;margin-bottom:14px;animation:esp-entree .3s ease-out}

/* artisan : en-tête façon application */
.esp-profil{display:flex;align-items:center;gap:12px}
.esp-profil .avatar{width:46px;height:46px}
.esp-profil-txt{flex:1;display:flex;flex-direction:column;line-height:1.3}
.esp-profil-txt b{font-size:16.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.esp-inter{flex:none;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 14px;border:0;border-radius:99px;font:inherit;font-size:14px;font-weight:750;background:var(--carte);color:var(--doux);cursor:pointer}
.esp-inter i{width:10px;height:10px;border-radius:50%;background:currentColor}
.esp-inter.on{background:var(--vert-pale);color:var(--vert)}
.esp-inter.on i{animation:esp-battement 2s infinite}
.esp-inter:disabled{opacity:.5;cursor:not-allowed}
.esp-bandeau{margin-top:12px;line-height:1.45}
.esp-quota{background:var(--carte);border-radius:var(--rayon);padding:12px 14px;font-size:14px}
.esp-quota>*+*{margin-top:6px}
.esp-barre{height:8px;border-radius:9px;background:var(--trait);overflow:hidden}
.esp-barre i{display:block;height:100%;background:var(--vert);border-radius:inherit;transition:width .4s}
.esp-barre.plein i{background:var(--rouge)}
.esp-alertes{margin:10px 2px 0}
.esp-alertes .ic{margin:-2px 4px 0 0}
.esp-alertes .btn-lien{display:inline;font-size:inherit;padding:0 0 0 4px;text-decoration:underline}
.esp-alertes-boite{display:flex;align-items:center;flex-wrap:wrap;gap:8px;justify-content:space-between;border:1px dashed var(--trait);border-radius:12px;padding:8px 10px 8px 12px}

/* artisan : carte de proposition */
.esp-offre{border:2px solid var(--vert);border-radius:22px;padding:16px;margin-top:12px;background:var(--surface);box-shadow:var(--ombre);animation:esp-entree .35s ease-out}
.esp-offre.urgent{border-color:var(--rouge)}
.esp-offre.expiree{opacity:.5;filter:grayscale(.6)}
.esp-badge-urgent{background:var(--rouge);color:#fff}
.esp-offre-haut{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;margin-top:12px}
.esp-offre-txt{flex:1}
.esp-gros{font-size:20px;font-weight:800;line-height:1.2;letter-spacing:-.01em}
.esp-metier{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:2px}
.esp-lieu{margin-top:8px;font-weight:750;display:flex;gap:6px;align-items:center}
.esp-creneau{margin:6px 0 0;display:flex;gap:6px;align-items:center;font-size:14.5px;font-weight:600}
.esp-anneau{position:relative;flex:none;width:82px;text-align:center}
.esp-anneau svg{display:block;width:82px;height:82px;transform:rotate(-90deg)}
.esp-anneau circle{fill:none;stroke-width:6}
.esp-anneau-fond{stroke:var(--trait)}
.esp-anneau-arc{stroke:var(--vert);stroke-linecap:round;transition:stroke-dashoffset 1s linear,stroke .3s}
.esp-anneau.court .esp-anneau-arc{stroke:var(--rouge)}
.esp-anneau b{position:absolute;top:0;left:0;width:82px;height:82px;display:grid;place-items:center;font-size:17px;font-weight:800;font-variant-numeric:tabular-nums}
.esp-anneau.court b{color:var(--rouge)}
.esp-anneau span{display:block;font-size:11.5px;color:var(--doux);margin-top:2px}
.esp-citation{margin:12px 0 0;font-size:15px;overflow-wrap:anywhere}
.esp-photos{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.esp-photos img{display:block;width:76px;height:76px;object-fit:cover;border-radius:10px;border:1px solid var(--trait)}
.esp-verrou{display:flex;gap:8px;align-items:center;background:var(--carte);border-radius:12px;padding:10px 12px;font-size:13.5px;margin-top:12px}
.esp-deux{display:grid;grid-template-columns:1fr 1.5fr;gap:10px;margin-top:14px}
.esp-deux .btn{min-height:56px;font-size:17px}

/* artisan : attente */
.esp-attente{text-align:center;padding:12px 0}
.esp-pouls{position:relative;display:grid;place-items:center;width:136px;height:136px;margin:26px auto;border-radius:50%;background:var(--vert-pale);color:var(--vert)}
.esp-pouls::before,.esp-pouls::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid var(--vert);animation:esp-onde 2.4s infinite}
.esp-pouls::after{animation-delay:1.2s}
.esp-pouls.off{background:var(--carte);color:var(--doux)}
.esp-pouls.off::before,.esp-pouls.off::after{display:none}

/* artisan : intervention en cours */
.esp-mission{margin-top:12px;scroll-margin-top:84px}
.esp-etapes{list-style:none;padding:0;margin:14px 0;display:grid;grid-template-columns:repeat(4,1fr);text-align:center;font-size:12.5px;color:var(--doux)}
.esp-etapes li{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px}
.esp-etapes li::before{content:"";position:absolute;top:7px;right:50%;width:100%;height:2px;background:var(--trait)}
.esp-etapes li:first-child::before{display:none}
.esp-etapes li.fait::before,.esp-etapes li.actuel::before{background:var(--vert)}
.esp-etapes i{position:relative;z-index:1;width:16px;height:16px;border-radius:50%;border:2px solid var(--trait);background:var(--surface)}
.esp-etapes li.fait i{background:var(--vert);border-color:var(--vert)}
.esp-etapes li.actuel{color:var(--encre);font-weight:750}
.esp-etapes li.actuel i{border-color:var(--vert);box-shadow:0 0 0 4px var(--vert-pale)}
.esp-etapes small{font-size:11.5px;font-weight:500;color:var(--doux)}
.esp-client{display:grid;gap:8px;background:var(--carte);border-radius:var(--rayon);padding:14px}
.esp-client .petit.doux{margin-bottom:-6px}
.esp-adresse{display:flex;gap:6px;align-items:flex-start;font-weight:650}
.esp-adresse .ic{margin-top:3px}
.esp-mission>.esp-metier{margin-top:12px}
.esp-actions{display:grid;gap:10px;margin-top:16px}
.esp-eta{border:0;padding:0;margin:0}
.esp-eta legend{padding:0;margin-bottom:8px;font-weight:700;font-size:14px}
.esp-puces{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.esp-puce{position:relative}
.esp-puce input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}
.esp-puce span{display:grid;place-items:center;min-height:48px;border:1px solid var(--trait);border-radius:12px;font-weight:750;font-size:15px}
.esp-puce input:checked+span{background:var(--encre);color:var(--fond);border-color:var(--encre)}
.esp-puce input:focus-visible+span{outline:3px solid color-mix(in srgb,var(--vert) 50%,transparent);outline-offset:2px}
.esp-devis{margin-top:16px;border-top:1px solid var(--trait);padding-top:6px}
.esp-devis summary{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:44px;font-weight:700;cursor:pointer;list-style:none}
.esp-devis summary::-webkit-details-marker{display:none}
.esp-devis summary>span:first-child::before{content:"▸ ";color:var(--doux)}
.esp-devis[open] summary>span:first-child::before{content:"▾ "}
.esp-devis-actuel{background:var(--carte);border-radius:12px;padding:10px 12px;margin-bottom:12px}
.esp-confirmer{margin-top:12px;border:1px solid var(--rouge);background:var(--rouge-pale);border-radius:12px;padding:12px;color:var(--encre)}
.esp-confirmer p{margin:0 0 10px}

/* artisan : historique, avis, créneaux, profil */
.esp-histo>*+*,.esp-avis>*+*{margin-top:8px}
.esp-etoiles{letter-spacing:1px;white-space:nowrap}
.esp-etoile-vide{color:var(--trait)}
.esp-note{font-size:22px}
.esp-tags{gap:6px}
.esp-reponse{background:var(--carte);border-radius:12px;padding:10px 12px;font-size:14px}
.esp-avis.masque{opacity:.75;border-style:dashed}
.esp-liste{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.esp-liste li{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--trait);border-radius:12px;padding:10px 12px}
.esp-liste li>span:first-child{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.esp-2col{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.esp-horaires{display:grid;gap:8px;padding:4px 0;transition:opacity .2s}
.esp-horaires.inactif{opacity:.45}
.esp-jour{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid var(--trait)}
.esp-jour .case{flex:1 1 110px;align-items:center}
.esp-jour:has(.case input:not(:checked)) .esp-heures{opacity:.45}
.esp-heures{display:flex;align-items:center;gap:6px}
.esp-heures input{width:auto;padding:8px 10px;font-size:15px}
.esp-dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0;font-size:14.5px}
.esp-dl dt{color:var(--doux)}
.esp-dl dd{margin:0;overflow-wrap:anywhere}

/* connexion */
.esp-boite{max-width:440px;margin:0 auto}
.esp-boite h1{font-size:clamp(30px,4vw,40px)}
.esp-liens-connexion{display:grid;gap:10px;margin:24px 0 16px}
.esp-liens-connexion a{display:grid;gap:2px;text-decoration:none;color:var(--encre)}
.esp-liens-connexion a:hover{border-color:var(--vert)}

/* gestionnaire */
.esp-ajout summary{cursor:pointer;min-height:28px;color:var(--vert)}
.esp-grille-biens{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr));align-items:start}
.esp-bien>*+*{margin-top:8px}
.esp-lien-sig{display:grid;gap:8px;background:var(--carte);border-radius:12px;padding:12px;margin:12px 0}
.esp-copie{display:flex;gap:8px}
.esp-copie input{padding:8px 10px;font:14px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
.esp-actions-bien{display:flex;flex-wrap:wrap;gap:8px}

/* tableaux : en cartes sur téléphone */
.esp-table tr.rouge td{background:color-mix(in srgb,var(--rouge-pale) 70%,transparent)}
.esp-table td a{font-weight:600}
.esp-table td[data-l="Réf."]{white-space:nowrap}
@media(max-width:760px){
  .esp-table thead{display:none}
  .esp-table,.esp-table tbody,.esp-table tr,.esp-table td{display:block;width:100%}
  .esp-table tr{border:1px solid var(--trait);border-radius:12px;padding:6px 12px;margin-bottom:10px}
  .esp-table tr.rouge{border-color:var(--rouge)}
  .esp-table tr.rouge td{background:none}
  .esp-table td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;border:0;padding:5px 0;text-align:right}
  .esp-table td::before{content:attr(data-l);flex:none;color:var(--doux);font-size:13px;font-weight:600;text-align:left}
}

/* admin */
.esp-tuiles{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.esp-tuile{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:var(--rayon);background:var(--carte);border:1px solid transparent;color:var(--encre);text-decoration:none}
.esp-tuile b{font-size:clamp(22px,2.4vw,28px);font-weight:800;letter-spacing:-.02em;line-height:1.1;font-variant-numeric:tabular-nums}
.esp-tuile span{font-size:13.5px;color:var(--doux);line-height:1.3}
a.esp-tuile:hover{border-color:var(--vert)}
.esp-tuile.rouge{background:var(--rouge-pale);border-color:var(--rouge)}
.esp-tuile.rouge b,.esp-tuile.rouge span{color:var(--rouge)}
.esp-tuile.jaune{border-color:var(--jaune)}
.esp-deux-col{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);align-items:start}
@media(min-width:900px){.esp-deux-col{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}}
.esp-a-traiter{display:grid;gap:8px}
.esp-ligne-lien{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--trait);border-radius:12px;color:var(--encre);text-decoration:none}
.esp-ligne-lien:hover{border-color:var(--vert)}
.esp-ligne-lien.rouge{border-color:var(--rouge);background:var(--rouge-pale)}
.esp-ligne-tete{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.esp-barres{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.esp-barres li{display:grid;grid-template-columns:minmax(90px,170px) 1fr 36px;gap:10px;align-items:center;font-size:14px}
.esp-barres b{text-align:right;font-variant-numeric:tabular-nums}
.esp-piste{height:12px;border-radius:9px;background:var(--carte);overflow:hidden}
.esp-piste i{display:block;height:100%;border-radius:inherit;background:var(--vert)}
.esp-filtres{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));margin-bottom:12px}
.esp-journal{list-style:none;padding:0;margin:10px 0 0;display:grid;gap:10px}
.esp-journal li{display:grid;grid-template-columns:128px 1fr;gap:10px;font-size:14px;padding-bottom:8px;border-bottom:1px solid var(--trait)}
.esp-journal li:last-child{border-bottom:0}
.esp-journal time{color:var(--doux);font-size:13px}
@media(max-width:520px){.esp-journal li{grid-template-columns:1fr;gap:2px}}
.esp-cases{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(min(100%,210px),1fr));border:1px solid var(--trait);border-radius:12px;padding:12px;margin:0}
.esp-cases legend{padding:0 6px;font-weight:700;font-size:14px}
.esp-cases .case input:disabled+span{opacity:.45}
.esp-forfait-ajout{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}
.esp-groupe .esp-h2 .ic{color:var(--vert)}
.esp-forfait{display:grid;gap:10px;grid-template-columns:minmax(0,2fr) 120px 110px auto auto;align-items:end;padding:10px 0;border-bottom:1px solid var(--trait)}
.esp-forfait.inactif input:not([type=checkbox]){color:var(--doux)}
.esp-actif{align-self:center;padding-top:22px}
@media(max-width:760px){.esp-forfait{grid-template-columns:1fr 1fr}.esp-forfait>label:first-child{grid-column:1/-1}.esp-actif{padding-top:0}}
.esp-grille-avis{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));align-items:start}
.esp-unite{display:flex;align-items:center;gap:8px}
.esp-unite input{max-width:140px}
.esp-unite small{font-weight:500;color:var(--doux)}
.esp-aide{display:block;margin-top:4px;font-weight:400}

@keyframes esp-entree{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@keyframes esp-onde{from{transform:scale(.7);opacity:1}to{transform:scale(1.35);opacity:0}}
@keyframes esp-battement{0%{box-shadow:0 0 0 0 color-mix(in srgb,currentColor 55%,transparent)}70%{box-shadow:0 0 0 8px transparent}100%{box-shadow:0 0 0 0 transparent}}
.esp-ref{font-weight:600;text-decoration:underline;padding:0}
.esp-acces{margin-top:10px}.esp-acces-ligne{display:flex;gap:8px;align-items:center}.esp-acces-ligne input{flex:1;min-width:0}
