/* Plannéo — saisie des autocontrôles (controle.js) et Espace Chantier (terrain.html). Pensé d'abord pour le téléphone : cibles de 44 px, une colonne. */
.ct{max-width:760px}
.ct-vide{background:#fff;border:1px dashed var(--ligne);border-radius:10px;padding:22px;color:var(--gris);text-align:center}
.ct-type{margin:18px 0 8px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--gris)}
.ct-carte{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#fff;border:1px solid var(--ligne);border-radius:10px;padding:12px 14px;margin:0 0 8px;cursor:pointer;color:var(--encre);min-height:64px}
.ct-carte:active{background:#f3f7f9}
.ct-c1{flex:0 0 38%;min-width:0;display:flex;flex-direction:column}.ct-c1 b{font-size:16px;overflow-wrap:anywhere}.ct-c1 i{font-style:normal;font-size:12px;color:var(--gris);overflow-wrap:anywhere}
.ct-c2{flex:1;display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center}.ct-fl{color:var(--gris);font-size:22px}
.ct-ind{font-size:13px;font-weight:600;color:var(--vert-fonce);flex-basis:100%}.ct-ind.non{color:var(--gris);font-weight:400}
.ct-p{font-size:12px;border-radius:10px;padding:2px 8px;background:#eef0f2;color:#5b6650;white-space:nowrap}
.ct-p.nc{background:#fbe9e9;color:#c62828}.ct-p.ar{background:#fff4e5;color:#b86200}.ct-p.ok{background:#eaf5e3;color:#2e7d32}.ct-p.av{background:#e6f0fa;color:#1d5d9b}
.ct-barre{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:10px;background:var(--brume);padding:8px 0;border-bottom:1px solid var(--ligne);margin-bottom:8px;flex-wrap:wrap}
.ct-retour{border:0;background:#e3e9ee;border-radius:8px;padding:10px 12px;font-weight:600;color:var(--encre);cursor:pointer;min-height:44px}
.ct-titre{flex:1;min-width:0;display:flex;flex-direction:column}.ct-titre b{font-size:17px;overflow-wrap:anywhere}.ct-titre span{font-size:12px;color:var(--gris)}
.ct-sauve{font-size:12px;color:var(--gris);flex-basis:100%;min-height:16px}.ct-sauve.ok{color:#2e7d32}.ct-sauve.err{color:var(--rouge);font-weight:600}
.ct-legende{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:12px;color:var(--gris);margin:0 0 6px}.ct-legende i{font-style:normal;font-weight:700;margin-right:3px}
.ct-fam{background:#fff;border:1px solid var(--ligne);border-radius:10px;padding:10px 12px;margin:0 0 10px}
.ct-fam h5{margin:0 0 6px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#33691e}
.ct-poste{display:flex;align-items:center;gap:10px;padding:6px 0;border-top:1px solid #eef2f5}.ct-poste:first-of-type{border-top:0}
.ct-lib{flex:1;min-width:0;overflow-wrap:anywhere}
.ct-choix{display:flex;gap:4px;flex:0 0 auto}
.ct-choix button{width:44px;height:44px;border:1px solid var(--ligne);border-radius:8px;background:#fff;cursor:pointer;font-size:19px;line-height:1;color:#a9b3bc;padding:0}
.ct-choix button i{font-style:normal;font-weight:700}
.e-AF i:empty{display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-radius:2px;vertical-align:-2px}
.ct-choix .e-OK.actif{background:#eaf5e3;border-color:#2e7d32;color:#2e7d32}.ct-choix .e-NC.actif{background:#fbe9e9;border-color:#c62828;color:#c62828}
.ct-choix .e-AR.actif{background:#fff4e5;border-color:#e67e00;color:#e67e00}.ct-choix .e-SO.actif{background:#eef0f2;border-color:#7a7f86;color:#5a5f66}
.ct-choix .e-AF.actif{border-color:#5b6650;color:#5b6650}
.ct-legende .e-OK{color:#2e7d32}.ct-legende .e-NC{color:#c62828}.ct-legende .e-AR{color:#e67e00}.ct-legende .e-SO{color:#7a7f86}.ct-legende .e-AF{color:#5b6650}
.ct-fam textarea{width:100%;border:1px solid var(--ligne);border-radius:8px;padding:10px;font-size:16px}
.ct-photo-btn{display:block;text-align:center;border:1px dashed #9fb0bd;border-radius:8px;padding:13px;font-weight:600;cursor:pointer;background:#f7fafb;margin:0}
.ct-photos{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.ct-ph{position:relative;width:96px;height:96px}.ct-ph img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid var(--ligne);display:block;background:#eef2f5}
.ct-ph button{position:absolute;top:-6px;right:-6px;width:28px;height:28px;border-radius:50%;border:0;background:#0f1d2b;color:#fff;cursor:pointer;font-size:13px}
.ct-aide{font-size:13px;color:var(--gris);margin:6px 0}.ct-fin{margin:14px 2px 30px}
.ct-hist{margin:0 0 6px 18px;padding:0;font-size:14px}
.ct-valider{display:block;width:100%;border:0;border-radius:8px;background:#33691e;color:#fff;font-weight:700;padding:14px;cursor:pointer;min-height:48px;margin-top:8px}
.ct-suppr{display:block;width:100%;border:0;background:none;color:var(--rouge);padding:12px;cursor:pointer;margin-top:4px}
@media(max-width:520px){.ct-poste{flex-direction:column;align-items:stretch;gap:6px}.ct-choix{display:grid;grid-template-columns:repeat(5,1fr)}.ct-choix button{width:auto;height:46px}.ct-c1{flex-basis:42%}}
/* ---- Espace Chantier */
body.terrain{background:var(--brume)}
.t-barre{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--nuit);color:#fff;padding:10px 14px;padding-top:calc(10px + env(safe-area-inset-top,0px))}
.t-barre .logo{font-weight:700;font-size:18px}.t-barre .logo span{color:var(--vert)}.t-barre .logo .espace{color:#dbe4ec;font-weight:400;font-size:13px;margin-left:4px}
#t-moi{display:flex;align-items:center;gap:10px;font-size:13px;color:#dbe4ec}#t-moi button{border:1px solid #42566a;background:none;color:#fff;border-radius:6px;padding:8px 10px;cursor:pointer}
#t-page{padding:12px 12px calc(30px + env(safe-area-inset-bottom,0px));max-width:760px;margin:0 auto}
.t-porte{background:#fff;border:1px solid var(--ligne);border-radius:12px;padding:20px;margin-top:18px}
.t-porte h1{font-size:21px;margin:0 0 6px}.t-porte label{display:block;margin:12px 0 4px;font-size:13px;color:var(--gris)}
.t-porte input{width:100%;padding:13px;border:1px solid var(--ligne);border-radius:8px;font-size:16px}
.t-porte .btn{display:block;width:100%;margin:16px 0 0;padding:14px;font-size:16px}.t-porte .err{color:var(--rouge);margin-top:10px;min-height:18px}
.t-info{background:#fff4e5;border-radius:8px;padding:10px;font-size:14px}
.t-chantier{display:flex;align-items:center;gap:10px;margin:4px 0 10px}
.t-prevenir{display:block;width:100%;border:0;border-radius:8px;background:var(--vert);color:#0b1a0a;font-weight:700;padding:14px;cursor:pointer;min-height:48px;margin:0 0 10px}
.t-prevenir:disabled{opacity:.6}
.ct-choix button:disabled{cursor:default;opacity:.85}.ct-fam textarea[readonly]{background:#f6f8fa}
.ct-tout{display:block;width:100%;border:1px solid #2e7d32;border-radius:8px;background:#eaf5e3;color:#1b5e20;font-weight:700;padding:13px;cursor:pointer;min-height:48px;margin:0 0 10px}
.ct-fam h5{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ct-tout-fam{border:1px solid #b9d7a6;background:#f4faef;color:#2e7d32;border-radius:14px;padding:6px 12px;font-size:12px;font-weight:700;cursor:pointer;text-transform:none;letter-spacing:0}
/* ---- rapports (onglet Autocontrôles, PC) */
.ac-vues{display:flex;gap:6px;margin:0 0 12px}.ac-vues button{border:1px solid var(--ligne);background:#fff;border-radius:18px;padding:7px 16px;cursor:pointer;font-weight:600;color:var(--gris)}
.ac-vues button.actif{background:var(--nuit);border-color:var(--nuit);color:#fff}
.ac-rap .ac-choix{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:0 0 12px}.ac-rap .ac-choix label{display:block;font-size:12px;color:var(--gris);margin:0 0 3px}
.ac-rap .ac-choix select{min-width:210px}.ac-rap table td.c{width:34px;text-align:center}.ac-rap tr.hors td{color:#a9b3bc}
.ac-fond{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}.ac-fond img{width:120px;border:1px solid var(--ligne);border-radius:6px;background:#fff}
.ac-spec h4{margin:18px 0 8px}.ac-spec .sp-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.ac-spec .sp-point{margin-bottom:10px}
.ac-spec .sp-plus{display:inline-block;margin:8px 0 0;cursor:pointer}.ac-spec .ct-photos{margin:4px 0 0}.ac-spec .ct-ph,.ac-spec .ct-ph img{width:80px;height:80px}
@media(max-width:700px){.ac-spec .sp-2{grid-template-columns:1fr}}
.ct-choix.quatre{grid-template-columns:repeat(4,1fr)}
.ct-poste{flex-wrap:wrap}.ct-rem{flex:1 0 100%;border:1px solid #e0a3a3;border-radius:8px;padding:10px;font-size:16px;background:#fffafa}
.ct-plus-point{display:block;width:100%;border:1px dashed #9fb0bd;border-radius:8px;background:#f7fafb;padding:12px;font-weight:600;cursor:pointer;margin:0 0 10px;color:var(--encre)}
.ct-lab{display:block;font-size:13px;color:var(--gris);margin:4px 0}#ct-conclusion{width:100%;padding:12px;border:1px solid var(--ligne);border-radius:8px;font-size:16px;background:#fff}
#ct-hote .btn{margin:6px 6px 0 0}
/* ---- V0.10f : fiche ouverte = plein écran, seule ; rien ne déborde de l'écran du téléphone */
html.ct-plein,html.ct-plein body{overflow:hidden}
html.ct-plein body>*:not(.ct-couche):not(.toast):not(dialog){display:none !important}
.ct-couche{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;z-index:50;background:var(--brume);overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;box-sizing:border-box;
  padding:0 calc(12px + env(safe-area-inset-right,0px)) calc(36px + env(safe-area-inset-bottom,0px)) calc(12px + env(safe-area-inset-left,0px))}
.ct-couche .ct{max-width:760px;margin:0 auto;width:100%;box-sizing:border-box}
.ct-couche .ct *,.ct *{box-sizing:border-box}
.ct-couche .ct-barre{top:0;padding-top:calc(10px + env(safe-area-inset-top,0px));z-index:6}
.ct-fam textarea,.ct-rem,#ct-conclusion{max-width:100%}
.ct-legende span{white-space:nowrap}.ac-vues{flex-wrap:wrap}
.ct-carte{max-width:100%}.ct-c2{min-width:0}.ct-p{white-space:normal}
/* iPhone : Safari agrandit toute la page dès qu'on touche un champ dont le texte fait moins de 16 px, et la laisse agrandie (tout déborde alors à droite). Tous les champs passent à 16 px sur téléphone. */
@media(max-width:700px){input,select,textarea{font-size:16px !important}.ct,.ac-rap,.ac-spec{max-width:100%;overflow-wrap:anywhere}
  .ct-choix,.ct-choix.quatre{display:grid;width:100%;gap:6px}.ct-choix{grid-template-columns:repeat(5,minmax(0,1fr))}.ct-choix.quatre{grid-template-columns:repeat(4,minmax(0,1fr))}.ct-choix button{width:100%;height:52px;font-size:22px}
  .ct-poste{flex-direction:column;align-items:stretch;gap:6px}.ct-tout-fam{padding:9px 14px}}
/* ---- V0.10g : avancement du lundi */
.av{max-width:760px}.av *{box-sizing:border-box}
.av-tete{background:#fff;border:1px solid var(--ligne);border-radius:10px;padding:12px 14px;margin:0 0 6px}
.av-sem{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;justify-content:space-between}.av-sem b{font-size:16px}
.av-etat{font-size:12px;border-radius:10px;padding:3px 10px;background:#fff4e5;color:#b86200}.av-etat.ok{background:#eaf5e3;color:#2e7d32}
.av-jauge{height:12px;background:#e4e9ee;border-radius:6px;overflow:hidden;margin:10px 0 6px}.av-jauge div{height:100%;background:var(--vert)}
.av-pct{font-size:13px;color:var(--gris)}.av-pct b{font-size:20px;color:var(--encre)}
.av-sauve{font-size:12px;color:var(--gris);min-height:16px}.av-sauve.ok{color:#2e7d32}.av-sauve.err{color:var(--rouge);font-weight:600}
.av-plan{background:#fff;border:1px solid var(--ligne);border-radius:10px;margin:0 0 8px;overflow:hidden}.av-plan.ouvert{border-color:#7fae5e}
.av-ligne{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;align-items:center;width:100%;border:0;background:none;text-align:left;padding:12px 14px;cursor:pointer;min-height:60px;color:var(--encre)}
.av-c1{min-width:0;display:flex;flex-direction:column}.av-c1 b{font-size:15px;overflow-wrap:anywhere}.av-c1 i{font-style:normal;font-size:12px;color:var(--gris);overflow-wrap:anywhere}
.av-c2{text-align:right;white-space:nowrap}.av-c2 b{font-size:18px}.av-c2 i{font-style:normal;font-size:12px;margin-left:6px}.av-c2 i.plus{color:#2e7d32}.av-c2 i.moins{color:var(--rouge)}
.av-mini{grid-column:1 / -1;display:block;height:6px;background:#e4e9ee;border-radius:3px;overflow:hidden}.av-mini span{display:block;height:100%;background:var(--vert)}
.av-etapes{padding:4px 14px 14px;border-top:1px solid #eef2f5}.av-etape{padding:8px 0;border-top:1px solid #eef2f5}.av-etape:first-child{border-top:0}.av-etape>span{display:block;margin:0 0 6px}
.av-pas{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.av-pas button{height:46px;border:1px solid var(--ligne);border-radius:8px;background:#fff;cursor:pointer;font-size:15px;color:#7d8893;padding:0}
.av-pas button.actif{background:#eaf5e3;border-color:#2e7d32;color:#1b5e20;font-weight:700}.av-pas button.so.actif{background:#eef0f2;border-color:#7a7f86;color:#5a5f66}
.av-cent{display:block;width:100%;border:1px solid #b9d7a6;background:#f4faef;color:#2e7d32;border-radius:8px;padding:11px;font-weight:700;cursor:pointer;margin-top:10px}
.av-gamme{display:block;font-size:12px;color:var(--gris);margin-top:10px}.av-gamme select{width:auto;margin-left:6px}
.av-terminer{display:block;width:100%;border:0;border-radius:8px;background:#33691e;color:#fff;font-weight:700;padding:15px;cursor:pointer;min-height:50px;margin:12px 0}.av-terminer:disabled{background:#eaf5e3;color:#2e7d32;cursor:default}
.av-hist>div{display:grid;grid-template-columns:86px minmax(40px,1fr) 48px;gap:4px 8px;align-items:center;padding:5px 0;font-size:13px}.av-hist .av-mini{grid-column:auto}.av-hist b{text-align:right}.av-hist i{grid-column:1 / -1;font-style:normal;font-size:11px;color:var(--gris)}
.t-choix{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px}.t-choix button{border:1px solid var(--ligne);background:#fff;border-radius:10px;padding:14px 8px;font-weight:700;cursor:pointer;min-height:52px;color:var(--gris)}
.t-choix button.actif{background:var(--nuit);border-color:var(--nuit);color:#fff}.t-choix button i{display:block;font-style:normal;font-weight:400;font-size:11px;margin-top:2px}
.av-pas.dix button{font-size:14px}
