/* INITIAL PAC CLIMA — SAV, espace technicien, interventions du bureau */
.c2col { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.eyebrow.sec { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.file { cursor: pointer; align-self: flex-start; }
/* bouton « Prendre une photo » (technicien et formulaire client) : rouge, pleine largeur, facile à toucher */
.btn.btn-photo { align-self: stretch; width: 100%; min-height: 64px; font-size: 18px; gap: 10px; margin: 6px 0 4px; background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.btn.btn-photo:hover { background: #A93624; border-color: #A93624; }
.btn.btn-photo:active { transform: translateY(1px); box-shadow: none; }
.btn.btn-photo:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn.btn-photo svg { width: 28px; height: 28px; flex: none; }
.photo-actions { display: grid; gap: 4px; }
.photo-actions[hidden] { display: none; }
.photo-gal { justify-self: center; color: var(--head); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 8px 4px; }

/* sélecteur segmenté */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14.5px; font-weight: 600; }
.seg input:checked + span { border-color: var(--orange); background: var(--tint-orange); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg.big { display: flex; margin: 4px 0 12px; }
.seg.big label { flex: 1; } .seg.big span { justify-content: center; width: 100%; }
.seg.mini { flex-wrap: nowrap; gap: 4px; flex: none; }
.seg.mini span { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.seg.mini .ok input:checked + span { border-color: var(--green); background: var(--tint-green); }
.seg.mini .anomalie input:checked + span { border-color: var(--red); background: var(--tint-red); }
.seg.mini .so input:checked + span { border-color: var(--muted); background: var(--bg); }

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photos:empty { display: none; }
.photos figure, .photos a { margin: 0; position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: block; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(10, 20, 35, .7); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.photos .ph-load { display: grid; place-items: center; height: 100%; color: var(--muted); }

.tag.sav { color: var(--red); } .tag.ent { color: var(--head); }
.note-card { background: var(--tint-orange); border-color: transparent; }

/* espace technicien */
.tech .wrap { max-width: 760px; }
.t-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; }
.t-head h1 { color: var(--head); font-size: 24px; }
.t-list { display: grid; gap: 10px; }
.t-card { appearance: none; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 3px; cursor: pointer; width: 100%; }
.t-card.today { border-left-color: var(--orange); }
.t-card:hover { border-color: var(--line-strong); }
.t-date { font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.t-who b { font-size: 16px; }
.t-where, .t-what { color: var(--muted); font-size: 14px; }
.back { margin: 14px 0 6px; }
.t-title { margin: 6px 0 12px; } .t-title h2 { color: var(--head); font-size: 22px; } .t-title .d-sub { text-transform: none; }
#v-fiche .card, #v-rapport .card { margin-bottom: 12px; }
.t-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.t-go { margin: 16px 0 30px; } .t-go .btn { width: 100%; }
.ctrl { list-style: none; margin: 0; padding: 0; display: grid; }
.ctrl li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.ctrl li:first-child { border-top: 0; }
@media (max-width: 560px) { .ctrl li { flex-direction: column; align-items: stretch; } .seg.mini { justify-content: flex-end; } }
.conseils { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.sigwrap.small canvas { height: 120px; }
.t-bar { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 75%, transparent); margin-top: 6px; }
#r-err { margin: 10px 0 0; }
.voile { position: fixed; inset: 0; background: rgba(10, 20, 35, .55); z-index: 60; display: grid; place-items: center; color: #fff; text-align: center; }
.spin { display: inline-block; width: 36px; height: 36px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: tourne 0.9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* bureau : interventions */
.irow { display: grid; grid-template-columns: 132px minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, .8fr) 118px; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14px; cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; font-family: inherit; color: inherit; }
.irow:first-child { border-top: 0; }
.irow:hover { background: var(--bg); }
.irow.head { cursor: default; background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.irow .i-quand { font-weight: 700; color: var(--head); font-variant-numeric: tabular-nums; }
.irow .i-quand.vide2 { color: var(--orange-ink); font-weight: 600; }
.irow .who2 b, .irow .i-adr b { display: block; font-weight: 700; }
.irow .who2 span, .irow .i-adr span, .irow .muted { color: var(--muted); font-size: 13px; }
.irow .i-adr b { font-weight: 600; }
.irow .i-quoi { display: grid; gap: 2px; }
.irow .i-etat { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.ijour { padding: 10px 14px 6px; background: var(--tint-blue); color: var(--head); font-weight: 700; font-size: 14px; border-top: 1px solid var(--line); }
.ijour span { color: var(--muted); font-weight: 500; }
@media (max-width: 900px) {
  .irow.head { display: none; }
  .irow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "quand etat" "who who" "adr adr" "quoi quoi" "tech tech"; gap: 4px 10px; padding: 12px 14px; }
  .irow .i-quand { grid-area: quand; } .irow .i-etat { grid-area: etat; }
  .irow .who2 { grid-area: who; } .irow .i-adr { grid-area: adr; } .irow .i-quoi { grid-area: quoi; font-size: 13.5px; } .irow .i-tech { grid-area: tech; font-size: 13px; color: var(--muted); }
  .irow .who2 { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; } .irow .who2 b { display: inline; font-size: 15.5px; }
  .irow .i-adr { padding-left: 18px; position: relative; } .irow .i-adr::before { content: ""; position: absolute; left: 2px; top: 4px; width: 9px; height: 9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid var(--orange); }
  .irow .i-adr b, .irow .i-adr span { display: inline; } .irow .i-adr span::before { content: ", "; }
}
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 130px 120px auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.trow:first-child { border-top: 0; }
@media (max-width: 760px) { .trow { grid-template-columns: minmax(0, 1fr) auto; } .trow > :nth-child(2), .trow > :nth-child(3) { grid-column: 1 / -1; color: var(--muted); font-size: 13px; } .trow > :nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; } .trow > :nth-child(5) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; } }
.login-extra { margin: 14px 0 0; }
.intro .sav-link { margin-top: 12px; font-size: 14.5px; color: var(--ink); }
.card > .c6 { grid-column: auto; }
@media (max-width: 520px) { .tech #who { display: none; } }
/* téléphone : toutes les sections visibles, sur plusieurs lignes si besoin */
@media (max-width: 640px) {
  .tabs { flex-wrap: wrap; gap: 6px; border-bottom: 0; }
  .tab { flex: none; white-space: nowrap; padding: 7px 12px; margin: 0; border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: 14.5px; }
  .tab[aria-pressed="true"] { border-color: var(--orange); background: var(--tint-orange); }
}

/* bureau : droits par compte (les modules non autorisés sont masqués ; la base refuse de toute façon) */
.sans-contrats #tab-contrats, .sans-contrats #v-contrats,
.sans-formules #tab-formules, .sans-formules #v-formules,
.sans-interventions #tab-interv, .sans-interventions #v-interv, .sans-interventions #d-planif,
.sans-techniciens #tab-tech, .sans-techniciens #v-tech,
.sans-export #btn-csv,
.sans-paiements #kpis .kpi[data-f="encaisser"], .sans-paiements #kpis .kpi[data-f="renouv"],
.sans-paiements #d-body > .card:first-child { display: none !important; }
.sans-paiements #kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .sans-paiements #kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.arow { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 2.4fr) auto; gap: 10px 18px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.arow:first-child { border-top: 0; }
.arow.super { background: var(--tint-orange); }
.arow.off .a-droits { opacity: .55; }
.a-qui b { display: block; color: var(--head); } .a-qui span { color: var(--muted); font-size: 13px; word-break: break-all; }
.a-droits { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.a-droits .check { font-size: 14px; min-height: 32px; font-weight: 400; }
.field .a-droits label, .field .a-droits label span { font-weight: 400; }
.a-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 860px) { .arow { grid-template-columns: minmax(0, 1fr); } .a-act { justify-content: flex-start; } }
.pay-non { border-color: var(--red); background: var(--tint-red); }
/* sections facultatives repliées (ex. fluide frigorigène) */
.opt-card > summary { cursor: pointer; list-style: none; display: block; }
.opt-card > summary::-webkit-details-marker { display: none; }
.opt-card > summary h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 30px; position: relative; }
.opt-card > summary h3::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 18px; color: var(--head); }
.opt-card[open] > summary h3::after { content: "–"; }
.opt-card[open] > summary { margin-bottom: 12px; }
.opt-card > summary h3 .muted { color: var(--muted); font-weight: 400; font-size: 13px; }
/* paiement sur place */
.p-lignes { display: grid; gap: 6px; margin-bottom: 8px; }
.p-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 96px 34px; gap: 6px; align-items: center; }
.p-ligne .x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-size: 18px; cursor: pointer; }
.q-liens { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.q-liens li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.q-liens:empty { display: none; }

/* ---------- téléphone : boutons faciles à toucher, rien de coupé ---------- */
.t-actions .btn { flex-direction: column; gap: 1px; line-height: 1.15; min-height: 58px; }
.t-actions .btn small { font-weight: 500; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) {
  .ctrl li { gap: 8px; padding: 12px 0; }
  .seg.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .seg.mini label { display: block; }
  .seg.mini span { min-height: 44px; width: 100%; justify-content: center; font-size: 14.5px; }
  .seg:not(.mini):not(.big) span { min-height: 44px; }
  .field:has(#r-date) { grid-column: 1 / -1; }
  .inline:has(input[type=email]) > .field { flex-basis: 100%; }
  .inline:has(input[type=email]) > .btn { flex: 1 1 100%; min-height: 46px; }
  .grid .field > .btn.primary { width: 100%; align-self: stretch !important; min-height: 48px; }
  .grid .field:has(> .btn.primary) { grid-column: 1 / -1; }
  #a-form .field { grid-column: 1 / -1; }
  .p-ligne { grid-template-columns: minmax(0, 1fr) 84px 38px; }
  #r-pay .row .btn, #p-envoyer { min-height: 44px; }
  .t-head h1 { font-size: 22px; }
}

/* rendez-vous : décaler / annuler */
.rdv-quand { margin: 0; font-size: 18px; font-weight: 700; color: var(--head); line-height: 1.3; }
.rdv-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.rdv-sous { margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.rdv-choix { margin: 10px 0 6px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #A93624; border-color: #A93624; }
.btn.danger-ghost { background: var(--surface); border-color: var(--red); color: var(--red); }

/* départements : puce dans la liste, rendez-vous du même jour à la planification */
.dep { display: inline-block; font-style: normal; font-weight: 700; font-size: 12px; line-height: 1.5; padding: 0 6px; margin-right: 6px; border-radius: 6px; background: var(--tint-orange); color: var(--orange-ink); vertical-align: 1px; }
.dep.ok { background: var(--tint-green); color: var(--green); }
.meme-jour { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.meme-jour:empty { display: none; }
.meme-jour .mj-titre { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); }
.meme-jour ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.meme-jour li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13.5px; }
.meme-jour li.mj-tech { font-weight: 600; }
.meme-jour .mj-h { font-variant-numeric: tabular-nums; color: var(--head); font-weight: 700; }
@media (max-width: 560px) { .meme-jour li { grid-template-columns: 78px minmax(0, 1fr); } .meme-jour li .muted { grid-column: 2; } }
@media (max-width: 640px) { #v-interv .toolbar #i-new { grid-column: 1 / -1; } }
