/* =====================================================================
   APPLICATION MOBILE — style (26/11/2026, partie A, thème choisi par l'utilisateur : « couleur de l'entreprise »)
   Fichier : desktop/public/includes/app/app.css — préfixe ap-.
   --b = couleur de l'entreprise de la personne (app.js la règle après la connexion) ; clair par défaut, sombre automatique le soir
   (réglage Profil › Thème : Automatique / Clair / Sombre). Gros boutons faciles à toucher (gants), utilisable d'une main.
   ===================================================================== */
:root {
  --b: #1761fd; --b-soft: #e8efff; --b-ink: #ffffff;
  --bg: #f4f6fa; --card: #ffffff; --tx: #111827; --mu: #6b7280; --bd: #e5e7eb; --nav: #ffffff;
  --ok: #16a34a; --ok-s: #dcfce7; --wa: #d97706; --wa-s: #fef3c7; --da: #dc2626; --da-s: #fee2e2; --in: #2563eb; --in-s: #dbeafe;
  --r: 16px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
html[data-mode="dark"] {
  --bg: #15131f; --card: #211d33; --tx: #f3f4f6; --mu: #a5a3c2; --bd: #312b4d; --nav: #1b1830;
  --ok-s: #12391f; --wa-s: #3f2d0a; --da-s: #3f1515; --in-s: #142b4f;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--tx); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.4; }
body { overscroll-behavior-y: contain; overflow-x: clip; }   /* 06/12/2026 : rien ne peut plus élargir l’écran (sinon toutes les fenêtres dépassent à droite) */
.ap-btn[style*="flex:none"] { width: auto; }   /* 06/12/2026 : petit bouton à côté d’une ligne : jamais toute la largeur */
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--tx); }
.mdi { line-height: 1; }
.ap-splash { height: 100vh; display: flex; align-items: center; justify-content: center; font-size: 38px; color: var(--b); }

/* en-tête : couleur de l'entreprise */
.ap-head { position: sticky; top: 0; z-index: 20; background: var(--b); color: var(--b-ink); padding: calc(10px + var(--safe-t)) 14px 10px; display: flex; align-items: center; gap: 10px; min-height: 58px; }
.ap-logo { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; flex: none; }
.ap-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ap-hname { flex: 1; min-width: 0; }
.ap-hname b { display: block; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-hname small { display: block; font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-ib { border: 0; background: rgba(255,255,255,.16); color: inherit; width: 40px; height: 40px; border-radius: 12px; font-size: 21px; position: relative; flex: none; }
.ap-ib .n { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* contenu et barre du bas */
.ap-main { padding: 12px 12px calc(86px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.ap-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--nav); border-top: 1px solid var(--bd); display: flex; padding: 6px 4px calc(6px + var(--safe-b)); }
.ap-nav a { flex: 1; text-align: center; color: var(--mu); text-decoration: none; font-size: 11px; padding: 4px 0; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ap-nav a i { font-size: 23px; }
.ap-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-nav a.on { color: var(--b); font-weight: 600; }
html[data-mode="dark"] .ap-nav a.on { color: #8fb0ff; }

/* cartes */
.ap-card { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.ap-lbl { font-size: 12px; color: var(--mu); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin: 14px 4px 8px; }
.ap-mu { color: var(--mu); font-size: 13px; }
.ap-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-grow { flex: 1; min-width: 0; }
.ap-ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.ap-two .ap-card { margin: 0; }
.ap-big { font-size: 22px; font-weight: 700; }

/* carte « Mon état » */
.ap-state { border-width: 2px; }
.ap-state.sur_site { border-color: var(--ok); } .ap-state.en_route { border-color: var(--in); } .ap-state.en_pause { border-color: var(--wa); }
.ap-dot { width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; flex: none; box-shadow: 0 0 0 4px rgba(156,163,175,.2); }
.ap-dot.sur_site { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-s); } .ap-dot.en_route { background: var(--in); box-shadow: 0 0 0 4px var(--in-s); } .ap-dot.en_pause { background: var(--wa); box-shadow: 0 0 0 4px var(--wa-s); }
.ap-st-t { font-size: 19px; font-weight: 700; }
.ap-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; }
.ap-site { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--bd); }
.ap-site b { display: block; font-size: 15px; }
.ap-acts { display: grid; gap: 8px; margin-top: 14px; }
.ap-acts.two { grid-template-columns: 1fr 1fr; }

/* boutons */
.ap-btn { border: 0; border-radius: 14px; min-height: 54px; padding: 12px 16px; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--b); color: var(--b-ink); }
.ap-btn i { font-size: 22px; }
.ap-btn:active { transform: scale(.98); }
.ap-btn.ok { background: var(--ok); color: #fff; } .ap-btn.wa { background: #f59e0b; color: #3b2503; } .ap-btn.da { background: var(--da); color: #fff; }
.ap-btn.ghost { background: transparent; color: var(--tx); border: 1.5px solid var(--bd); font-weight: 600; }
.ap-btn.sm { min-height: 42px; font-size: 15px; border-radius: 12px; }
.ap-btn:disabled { opacity: .6; }
.ap-link { border: 0; background: var(--b-soft); color: var(--b); border-radius: 12px; height: 40px; padding: 0 12px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; flex: none; text-decoration: none; }
html[data-mode="dark"] .ap-link { background: rgba(255,255,255,.08); color: #b9cbff; }

/* listes */
.ap-li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); margin-bottom: 8px; min-width: 0; }
.ap-li .tm { font-weight: 700; color: var(--b); width: 48px; flex: none; font-size: 15px; }
html[data-mode="dark"] .ap-li .tm { color: #8fb0ff; }
.ap-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--b-soft); color: var(--b); white-space: nowrap; }
.ap-tag.inter { background: #fff3e6; color: #c2410c; } html[data-mode="dark"] .ap-tag { background: rgba(255,255,255,.08); color: #c7d2fe; }
.ap-tag.ok { background: var(--ok-s); color: var(--ok); } .ap-tag.wa { background: var(--wa-s); color: var(--wa); } .ap-tag.da { background: var(--da-s); color: var(--da); } html[data-mode="dark"] .ap-tag.ok { background: var(--ok-s); color: #4ade80; } html[data-mode="dark"] .ap-tag.wa { background: var(--wa-s); color: #fbbf24; } html[data-mode="dark"] .ap-tag.da { background: var(--da-s); color: #f87171; } html[data-mode="dark"] .ap-tag.inter { background: #3b2410; color: #fdba74; }   /* 03/12/2026 : en mode sombre les étiquettes de couleur restaient grises */
.ap-empty { text-align: center; color: var(--mu); padding: 30px 16px; }
.ap-empty i { font-size: 44px; display: block; margin-bottom: 8px; color: var(--b); opacity: .5; }

/* fenêtre du bas (choix, confirmation) */
.ap-sheet-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 65;   /* 30/11/2026 : au-dessus des pages entières (60), sinon une fenêtre ouverte depuis une page restait cachée derrière (« Y aller » de l'info du rendez-vous) */ display: flex; align-items: flex-end; justify-content: center; animation: apFade .15s; }
.ap-sheet { background: var(--card); width: 100%; min-width: 0; overflow-x: hidden; max-width: 640px;   /* 06/12/2026 : min-width 0 : une ligne trop longue ne pousse plus la fenêtre hors de l'écran (elle se coupe avec « … ») */ border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + var(--safe-b)); max-height: 86vh; overflow-y: auto; animation: apUp .2s ease-out; }
.ap-sheet .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--bd); margin: 2px auto 12px; }
.ap-sheet h3 { margin: 0 0 4px; font-size: 19px; }
.ap-sheet p { margin: 0 0 14px; color: var(--mu); font-size: 14px; }
.ap-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--bg); border: 1.5px solid var(--bd); border-radius: 14px; padding: 12px; margin-bottom: 8px; min-height: 58px; }
.ap-opt:active { border-color: var(--b); }
.ap-opt .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--b-soft); color: var(--b); display: flex; align-items: center; justify-content: center; font-size: 21px; flex: none; }
@keyframes apUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes apFade { from { opacity: 0; } to { opacity: 1; } }

/* petit message */
.ap-toast { position: fixed; left: 12px; right: 12px; top: calc(66px + var(--safe-t)); max-width: 616px; margin: 0 auto; z-index: 68; background: #111827; color: #fff; border-radius: 14px; padding: 12px 14px; font-size: 15px; display: flex; gap: 10px; align-items: center; max-width: 616px; margin: 0 auto; animation: apDown .2s; }   /* 28/11/2026 (demande de l'utilisateur) : en haut, sous l'en-tête (en bas, il cachait la barre d'action) */
.ap-toast.err { background: #b91c1c; }

/* connexion */
.ap-login { min-height: 100vh; display: flex; flex-direction: column; }
.ap-login .top { background: var(--b); color: var(--b-ink); padding: calc(48px + var(--safe-t)) 24px 56px; text-align: center; border-radius: 0 0 32px 32px; }
.ap-login .top .lg { width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.2); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.ap-login .top h1 { margin: 0; font-size: 24px; } .ap-login .top p { margin: 6px 0 0; opacity: .9; }
.ap-login form { background: var(--card); margin: -32px 16px 16px; border-radius: 22px; padding: 22px 18px; border: 1px solid var(--bd); max-width: 460px; align-self: center; width: calc(100% - 32px); }
.ap-f { margin-bottom: 14px; }
.ap-f label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ap-in { width: 100%; height: 54px; border-radius: 14px; border: 1.5px solid var(--bd); background: var(--bg); padding: 0 14px; font-size: 17px; outline: none; }
.ap-in:focus { border-color: var(--b); }
.ap-pw { position: relative; } .ap-pw button { position: absolute; right: 6px; top: 6px; width: 42px; height: 42px; border: 0; background: transparent; color: var(--mu); font-size: 21px; }
.ap-err { background: var(--da-s); color: var(--da); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; display: none; }
.ap-chk { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 14px; }
.ap-chk input { width: 20px; height: 20px; accent-color: var(--b); }
.ap-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ap-code { letter-spacing: .5em; text-align: center; font-size: 24px; font-weight: 700; }

/* profil */
.ap-av { width: 60px; height: 60px; border-radius: 50%; background: var(--b-soft); color: var(--b); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; overflow: hidden; flex: none; }
.ap-av img { width: 100%; height: 100%; object-fit: cover; }
/* 27/11/2026 (demande de l’utilisateur) : onglets à choix bien visibles, façon application mobile — le choisi rempli de la couleur de l’entreprise */
.ap-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--card); border: 1.5px solid var(--bd); border-radius: 14px; padding: 4px; }
.ap-seg button { border: 0; background: transparent; border-radius: 10px; height: 42px; font-size: 15px; font-weight: 600; color: var(--mu); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s, color .15s; }
.ap-seg button.on { background: var(--b); color: var(--b-ink); font-weight: 700; box-shadow: 0 2px 6px rgba(15,23,42,.15); }
.ap-seg button:active { transform: scale(.97); }
.ap-mi { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--bd); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font-size: 16px; }
.ap-mi:first-child { border-top: 0; }
.ap-mi i { font-size: 22px; color: var(--mu); }
.ap-mi.da, .ap-mi.da i { color: var(--da); }
.ap-sico { width: 44px; height: 44px; border-radius: 12px; background: var(--b-soft); color: var(--b); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }

/* 27/11/2026 (partie B) : fiche d'un chantier, photos, position exacte */
.ap-back { border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 16px 5px 5px; margin: 0 0 12px; border-radius: 999px; box-shadow: 0 2px 6px rgba(15,23,42,.08); max-width: 100%; }
.ap-back i { width: 36px; height: 36px; border-radius: 50%; background: var(--b); color: var(--b-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.ap-back:active { transform: scale(.97); border-color: var(--b); }   /* 27/11/2026 : bouton de retour plus visible (demande de l’utilisateur) */
html[data-mode="dark"] .ap-back { color: var(--tx); }
.ap-seg b { font-weight: 700; font-size: 12px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); color: var(--tx); display: inline-flex; align-items: center; justify-content: center; }
.ap-seg b:empty { display: none; }
.ap-seg button.on b { background: rgba(255,255,255,.25); color: var(--b-ink); }
.ap-prog { height: 8px; border-radius: 8px; background: var(--bd); overflow: hidden; margin-top: 6px; }
.ap-prog i { display: block; height: 100%; background: var(--b); border-radius: 8px; }
.ap-codebox { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.ap-ct { padding: 10px 0; border-top: 1px solid var(--bd); }
.ap-ct:first-child { border-top: 0; }
.ap-ct .ap-link { width: 40px; padding: 0; justify-content: center; font-size: 20px; }
.ap-desc { white-space: pre-wrap; font-size: 15px; }
.ap-desc.cut { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--bd); border-radius: 999px; padding: 5px 11px; font-size: 14px; }
.ap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ap-ph { aspect-ratio: 1; border: 0; border-radius: 10px; background: var(--bd) center / cover no-repeat; padding: 0; }
.ap-viewer { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; align-items: center; justify-content: center; }
.ap-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ap-viewer button { position: absolute; border: 0; background: rgba(255,255,255,.16); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.ap-vx { top: calc(12px + var(--safe-t)); right: 12px; } .ap-vp { left: 10px; top: 50%; } .ap-vn { right: 10px; top: 50%; }
.ap-vc { position: absolute; bottom: calc(18px + var(--safe-b)); left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; padding: 0 16px; }
.ap-steps { margin: 0 0 16px; padding-left: 22px; } .ap-steps li { margin-bottom: 8px; font-size: 15px; }
.ap-gps { display: flex; align-items: center; gap: 10px; border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.ap-gps > i { font-size: 24px; } .ap-gps .ap-btn { width: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.ap-gps.da { background: var(--da-s); color: var(--da); } .ap-gps.wa { background: var(--wa-s); color: var(--wa); }
a.ap-opt { color: inherit; text-decoration: none; }

/* 27/11/2026 (partie C) : compte rendu */
.ap-cr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ap-crb { border: 1.5px solid var(--bd); background: var(--card); border-radius: 16px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tx); }
.ap-crb i { font-size: 28px; color: var(--b); }
html[data-mode="dark"] .ap-crb i { color: #8fb0ff; }
.ap-crb:active { transform: scale(.97); border-color: var(--b); }
.ap-crb.cl { border-color: var(--ok); } .ap-crb.cl i { color: var(--ok); }
.ap-rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.ap-sig { position: relative; height: 210px; border: 2px dashed var(--bd); border-radius: 14px; background: #fff; touch-action: none; }
.ap-sig canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.ap-sig .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c0c4cc; font-size: 18px; pointer-events: none; }

/* 27/11/2026 : page entière (Alertes), fermée par la flèche ou « Fermer » */
.ap-page { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; animation: apFade .15s; }
.ap-page .ap-head { position: static; }
.ap-pbody { flex: 1; overflow-y: auto; padding: 12px; width: 100%; max-width: 640px; margin: 0 auto; }
.ap-pfoot { background: var(--card); border-top: 1px solid var(--bd); padding: 10px 12px calc(10px + var(--safe-b)); }
.ap-pfoot .ap-btn { max-width: 640px; margin: 0 auto; display: flex; }
body.ap-noscroll { overflow: hidden; }
.ap-page .ap-opt { background: var(--card); }
/* 27/11/2026 : application mobile → pas de texte surligné en touchant les boutons, menus et cartes (les champs à remplir restent sélectionnables) */
.ap-head, .ap-nav, .ap-seg, .ap-btn, .ap-back, .ap-opt, .ap-li, .ap-ib, .ap-crb, .ap-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 27/11/2026 (partie D) : alertes, planning de la semaine, habilitations, heures */
.ap-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ap-al { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.35; background: var(--in-s); color: var(--in); }
.ap-al > i:first-child { font-size: 22px; flex: none; }
.ap-al.ok { background: var(--ok-s); color: #065f46; } .ap-al.wa { background: var(--wa-s); color: #92400e; } .ap-al.da { background: var(--da-s); color: #991b1b; } .ap-al.in { background: var(--in-s); color: #1e40af; }
.ap-al[role=button]:active { transform: scale(.98); }
html[data-mode="dark"] .ap-al.wa { color: #fcd34d; } html[data-mode="dark"] .ap-al.da { color: #fca5a5; } html[data-mode="dark"] .ap-al.in { color: #93c5fd; }
.ap-wk { padding: 12px; }
.ap-wkb { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--bd); background: var(--card); color: var(--b); font-size: 26px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ap-wkb:disabled { opacity: .35; }
.ap-wkd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.ap-wkd button { border: 0; background: var(--bg); border-radius: 12px; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--tx); }
.ap-wkd small { font-size: 11px; color: var(--mu); text-transform: capitalize; } .ap-wkd b { font-size: 16px; }
.ap-wkd i { width: 6px; height: 6px; border-radius: 50%; background: transparent; } .ap-wkd i.has { background: var(--b); }
.ap-wkd button.on { background: var(--b); color: var(--b-ink); } .ap-wkd button.on small { color: var(--b-ink); opacity: .85; } .ap-wkd button.on i.has { background: var(--b-ink); }
.ap-wkt { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.ap-dayh { display: flex; align-items: center; justify-content: space-between; gap: 8px; scroll-margin-top: 70px; }
.ap-dw { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--tx); font-size: 12px; white-space: nowrap; }
.ap-none { color: var(--mu); font-size: 14px; padding: 4px 4px 2px; }
.ap-cert { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bd); } .ap-cert:first-child { border-top: 0; }
.ap-sico.ok { background: var(--ok-s); color: var(--ok); } .ap-sico.wa { background: var(--wa-s); color: var(--wa); } .ap-sico.da { background: var(--da-s); color: var(--da); }
.ap-hw { display: block; width: 100%; border: 0; background: none; color: var(--tx); padding: 10px 0; border-top: 1px solid var(--bd); font-size: 15px; } .ap-hw:first-child { border-top: 0; }
.ap-hw .ap-row { gap: 8px; } .ap-hw i.mdi { font-size: 19px; }
.ap-hbar { height: 7px; border-radius: 4px; background: var(--bg); margin-top: 6px; overflow: hidden; } .ap-hbar i { display: block; height: 100%; border-radius: 4px; background: var(--b); } .ap-hbar i.ok { background: var(--ok); }

/* 27/11/2026 (partie E) : onglet « Équipe » du responsable */
.ap-tchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; } .ap-tchips::-webkit-scrollbar { display: none; }
.ap-tchips button { flex: none; border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); border-radius: 999px; height: 38px; padding: 0 12px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ap-tchips button b { font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; }
.ap-tchips button.on { background: var(--b); border-color: var(--b); color: var(--b-ink); } .ap-tchips button.on b { background: rgba(255,255,255,.25); }
.ap-tm { padding: 12px 14px; margin-bottom: 8px; }
.ap-tm[data-tmu] { cursor: pointer; } .ap-tm[data-tmu]:active { transform: scale(.99); }
/* 06/12/2026 : fiche détaillée d'un employé (Gestion › Équipe) */
.ap-tpd { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-width: 0; }
.ap-tpd button { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); font-size: 24px; display: flex; align-items: center; justify-content: center; padding: 0; }
.ap-tpd button:disabled { opacity: .35; }
.ap-tpd b { flex: 1; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; text-transform: capitalize; }
.ap-tpd .t { width: auto; padding: 0 12px; font-size: 14px; font-weight: 700; color: var(--b); }
.ap-tpd .t.on { background: var(--b); color: var(--b-ink); border-color: var(--b); }
.ap-tpr { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--bd); min-width: 0; font-size: 15px; }
.ap-tpr:first-child, .ap-tpst + .ap-tpr { border-top: 0; }
.ap-tpr .mdi { font-size: 20px; color: var(--mu); flex: none; } .ap-tpr .l { color: var(--mu); flex: none; }
.ap-tpr .v { margin-left: auto; font-weight: 700; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tpst { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; border-radius: 999px; padding: 6px 12px; background: #f3f4f6; color: #6b7280; }
.ap-tpst .mdi { font-size: 12px; } .ap-tpst.sur_site { background: #dcfce7; color: #15803d; } .ap-tpst.en_route, .ap-tpst.tour { background: #dbeafe; color: #1d4ed8; } .ap-tpst.course { background: #ede9fe; color: #6d28d9; } .ap-tpst.en_pause { background: #fef3c7; color: #92400e; }
.ap-tpmap { height: 44vh; min-height: 240px; border-radius: 14px; overflow: hidden; border: 1px solid var(--bd); background: #e5e7eb; margin-top: 10px; }
.ap-tpev { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0 8px 12px; border-left: 3px solid var(--bd); margin-left: 2px; min-width: 0; }
.ap-tpev .t { font-weight: 700; width: 46px; flex: none; }
.ap-tpev b, .ap-tpev small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ap-tpev small { color: var(--mu); font-size: 13px; }
.ap-tpev.start_work { border-left-color: #16a34a; } .ap-tpev.en_route { border-left-color: #2563eb; } .ap-tpev.pause_start, .ap-tpev.pause_end { border-left-color: #f59e0b; } .ap-tpev.end_work { border-left-color: #6b7280; } .ap-tpev.bad { border-left-color: var(--da); }
.ap-tpsd { padding: 8px 0; border-top: 1px solid var(--bd); min-width: 0; } .ap-tpsd:first-child { border-top: 0; }
.ap-tpbar { height: 8px; background: var(--bg); border-radius: 6px; overflow: hidden; margin: 5px 0 3px; } .ap-tpbar i { display: block; height: 100%; background: var(--b); border-radius: 6px; }
.ap-tpwk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 160px; }
.ap-tpwk button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 3px; padding: 0; min-width: 0; color: var(--mu); font-size: 12px; font-weight: 600; }
.ap-tpwk .v { font-size: 10px; height: 14px; white-space: nowrap; }
.ap-tpwk .b { flex: 1; width: 100%; max-width: 28px; background: var(--bg); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.ap-tpwk .b i { display: block; width: 100%; background: color-mix(in srgb, var(--b) 45%, transparent); border-radius: 6px; }
.ap-tpwk .on { color: var(--b); } .ap-tpwk .on .b i { background: var(--b); } .ap-tpwk button:disabled { opacity: .4; }
.ap-tprp { display: flex; align-items: center; gap: 8px; margin-top: 8px; min-width: 0; } .ap-tprp input { flex: 1; min-width: 0; accent-color: #f97316; }
.ap-tprp span { font-size: 13px; font-weight: 700; color: #9a3412; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.ap-av.sm { width: 44px; height: 44px; font-size: 16px; position: relative; overflow: visible; }
.ap-av.sm .ap-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border: 2px solid var(--card); box-shadow: none; }
.ap-tsite { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; background: var(--bg); border-radius: 12px; font-size: 14px; min-width: 0; }
.ap-tsite > i { color: var(--b); font-size: 18px; flex: none; }
.ap-nav a span { font-size: 10.5px; }

/* 27/11/2026 (partie E) : bandeau « Pas de réseau / en attente d'envoi » sous l'en-tête */
.ap-off { position: sticky; top: calc(58px + var(--safe-t)); z-index: 19; display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #334155; color: #fff; font-size: 14px; font-weight: 600; }
.ap-off > i { font-size: 20px; }

/* 27/11/2026 (demande de l'utilisateur) : « Je pars vers… » — toucher = choisir (cadre en couleur + coche), le départ se confirme en bas */
.ap-opt .ap-opt-ck { font-size: 24px; color: var(--b); display: none; flex: none; }
.ap-opt.sel { border-color: var(--b); box-shadow: 0 0 0 3px var(--b-soft); }
.ap-opt.sel .ap-opt-ck { display: inline-block; }
.ap-pick { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto 10px; font-weight: 700; min-width: 0; }
.ap-pick > i { color: var(--b); font-size: 20px; flex: none; }
.ap-pfoot .ap-acts { max-width: 640px; margin: 0 auto; }
.ap-srch { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1.5px solid var(--bd); border-radius: 14px; padding: 0 12px; margin-bottom: 10px; }
.ap-srch i { font-size: 20px; color: var(--mu); } .ap-srch input { border: 0; outline: 0; background: transparent; height: 46px; flex: 1; font-size: 16px; color: var(--tx); min-width: 0; }

/* 27/11/2026 (demande de l'utilisateur) : planning = un bloc par jour qui a des rendez-vous ; jours vides grisés dans la barre */
.ap-wkd em { font-style: normal; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--b); color: var(--b-ink); display: inline-flex; align-items: center; justify-content: center; }
.ap-wkd button.on em { background: var(--b-ink); color: var(--b); }
.ap-dblk { padding: 4px 14px 6px; margin-bottom: 12px; scroll-margin-top: 70px; }
.ap-dblk.today { border: 2px solid var(--b); }
.ap-dblkh { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bd); }
.ap-dblkh .d { width: 46px; height: 50px; border-radius: 12px; background: var(--b-soft); color: var(--b); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.05; }
.ap-dblkh .d b { font-size: 19px; } .ap-dblkh .d small { font-size: 11px; font-weight: 600; }
.ap-dblk.today .ap-dblkh .d { background: var(--b); color: var(--b-ink); }
.ap-drdv { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--bd); min-width: 0; } .ap-dblkh + .ap-drdv { border-top: 0; }
.ap-drdv .tm { font-weight: 700; color: var(--b); width: 48px; flex: none; font-size: 15px; }
.ap-dblk.past .ap-drdv { opacity: .65; }

/* 27/11/2026 (demande de l'utilisateur) : page entière — grande flèche de retour, titre jamais coupé (plus petit sur 2 lignes si besoin), pas de « Fermer » en bas */
.ap-phead { gap: 12px; }
.ap-pback { height: 42px; padding: 0 16px 0 10px; border: 0; border-radius: 12px; background: rgba(255,255,255,.22); color: inherit; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex: none; }   /* 27/11/2026 : taille normale, plus long, avec « Retour » */
.ap-pback i { font-size: 22px; }
.ap-pback:active { transform: scale(.94); }
.ap-ptitle { flex: 1; min-width: 0; font-size: clamp(15px, 4.6vw, 19px); font-weight: 700; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 27/11/2026 : tous les jours se touchent ; aujourd'hui = contour ; jour choisi = rempli */
.ap-wkd button.tdy { box-shadow: inset 0 0 0 2px var(--b); }
.ap-wkd button:active { transform: scale(.94); }
.ap-wkf { display: flex; gap: 8px; margin-top: 10px; }
.ap-wkf button { flex: 1; height: 40px; border-radius: 12px; border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ap-wkf button.on { background: var(--b-soft); border-color: var(--b); color: var(--b); }

/* 27/11/2026 (demande de l'utilisateur) : Profil › Mes heures jour par jour */
.ap-wkd .hh { font-size: 10.5px; font-weight: 700; color: var(--mu); margin-top: 1px; } .ap-wkd button.on .hh { color: var(--b-ink); }
.ap-hst { background: var(--bg); border-radius: 12px; padding: 10px 12px; } .ap-hst small { display: block; color: var(--mu); font-size: 12px; } .ap-hst b { font-size: 18px; }
.ap-hsub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mu); margin: 12px 0 4px; }
.ap-hrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--bd); font-size: 14px; min-width: 0; } .ap-hsub + .ap-hrow { border-top: 0; }
.ap-hrow > i { color: var(--b); font-size: 18px; flex: none; } .ap-hrow b { white-space: nowrap; }
.ap-tl { position: relative; padding: 2px 0 6px; }
.ap-tli { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; position: relative; }
.ap-tli .t { width: 44px; flex: none; font-weight: 700; font-size: 14px; color: var(--tx); padding-top: 3px; }
.ap-tli > i { width: 30px; height: 30px; border-radius: 50%; background: var(--b-soft); color: var(--b); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; flex: none; position: relative; z-index: 1; }
.ap-tli:not(:last-child)::before { content: ''; position: absolute; left: 68px; top: 37px; bottom: -7px; width: 2px; background: var(--bd); }
.ap-tli.start_work > i { background: var(--ok-s); color: var(--ok); } .ap-tli.pause_start > i { background: var(--wa-s); color: var(--wa); } .ap-tli.end_work > i, .ap-tli.cancel_route > i { background: var(--da-s); color: var(--da); }

/* 27/11/2026 (gardé par l'utilisateur) : rester appuyé 2 secondes sur un chantier = départ ; la couleur se remplit pendant l'appui */
.ap-page .ap-opt { position: relative; overflow: hidden; touch-action: pan-y; }
.ap-page .ap-opt > * { position: relative; z-index: 1; }
.ap-page .ap-opt::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--b-soft); z-index: 0; }
.ap-page .ap-opt.hold::after { width: 100%; transition: width var(--hold, 2s) linear; }

/* 27/11/2026 (demande de l'utilisateur) : Paramètres de l'application — façon de choisir un chantier ; Profil en haut */
.ap-pm { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-top: 1px solid var(--bd); background: none; color: var(--tx); padding: 12px 2px; text-align: left; }
.ap-pm:first-child { border-top: 0; }
.ap-pm > i:first-child { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); color: var(--mu); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.ap-pm b { display: block; font-size: 15px; } .ap-pm small { display: block; font-size: 12.5px; }
.ap-pm .ck { font-size: 24px; color: var(--b); visibility: hidden; flex: none; }
.ap-pm.on > i:first-child { background: var(--b-soft); color: var(--b); } .ap-pm.on .ck { visibility: visible; } .ap-pm.on b { color: var(--b); }
.ap-head .ap-ib + .ap-ib { margin-left: 10px; }   /* 27/11/2026 : cloche bien séparée du Profil (gros doigts) */
.ap-ib.on { background: rgba(255,255,255,.35); }
.ap-head > .ap-ib { width: 48px; height: 48px; font-size: 25px; border-radius: 14px; }   /* 27/11/2026 : boutons du haut plus grands */

/* 27/11/2026 (demande de l'utilisateur) : menu du Profil (sous le bouton en haut à droite) ; Mon parcours, Mon profil, Mes notes */
.ap-umenu { position: fixed; top: calc(62px + var(--safe-t)); right: 10px; z-index: 55; width: min(330px, calc(100vw - 20px)); background: var(--card); border: 1px solid var(--bd); border-radius: 18px; box-shadow: 0 14px 40px rgba(15,23,42,.22); padding: 8px; animation: apFade .15s; }
.ap-umh { display: flex; align-items: center; gap: 10px; padding: 8px 6px 12px; border-bottom: 1px solid var(--bd); margin-bottom: 4px; }
.ap-umx { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--bg); color: var(--tx); font-size: 22px; flex: none; }
.ap-umi { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--tx); padding: 11px 8px; border-radius: 12px; text-align: left; }
.ap-umi > i:first-child { width: 40px; height: 40px; border-radius: 12px; background: var(--b-soft); color: var(--b); display: inline-flex; align-items: center; justify-content: center; font-size: 21px; flex: none; }
.ap-umi b { display: block; font-size: 15px; } .ap-umi small { display: block; font-size: 12.5px; }
.ap-umi > i:last-child { color: var(--mu); font-size: 20px; }
.ap-umi.on { background: var(--bg); box-shadow: inset 3px 0 0 var(--b); color: var(--tx); }   /* 27/11/2026 : lisible aussi en mode sombre (fond du thème, trait de couleur à gauche) */
.ap-umi.on > i:first-child { background: var(--b); color: var(--b-ink); } .ap-umi.on small { color: var(--mu); }
.ap-umi.da { color: var(--da); margin-top: 4px; border-top: 1px solid var(--bd); border-radius: 0 0 12px 12px; } .ap-umi.da > i:first-child { background: var(--da-s); color: var(--da); }
.ap-umi:active { transform: scale(.98); }
.ap-vt { font-size: 20px; font-weight: 800; margin: 4px 2px 12px; display: flex; align-items: center; gap: 8px; } .ap-vt i { color: var(--b); }
.ap-note { padding: 12px 14px; margin-bottom: 8px; } .ap-note:active { border-color: var(--b); }
.ap-note-b { white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }

/* 27/11/2026 (demande de l'utilisateur) : loupe en haut (Chantiers, Interventions, Planning) */
.ap-sbar { position: sticky; top: calc(58px + var(--safe-t)); z-index: 18; display: flex; align-items: center; gap: 8px; background: var(--card); border-bottom: 1px solid var(--bd); padding: 8px 12px; }
.ap-sbar > i { font-size: 22px; color: var(--mu); }
.ap-sbar input { flex: 1; min-width: 0; height: 44px; border: 1.5px solid var(--bd); border-radius: 12px; padding: 0 12px; font-size: 16px; background: var(--bg); color: var(--tx); outline: 0; }
.ap-sbar input:focus { border-color: var(--b); }
.ap-sbar button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--bg); color: var(--tx); font-size: 22px; flex: none; }

/* 27/11/2026 (demande de l'utilisateur) : Mes demandes, Mes documents (privés), Aide */
.ap-rqb { border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); border-radius: 14px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.ap-rqb i { font-size: 28px; color: var(--b); } .ap-rqb:active { transform: scale(.97); border-color: var(--b); }
.ap-rq { padding: 12px 14px; margin-bottom: 8px; }
.ap-rqa { margin-top: 10px; padding: 8px 10px; background: var(--bg); border-radius: 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.ap-fl { display: block; font-size: 13px; font-weight: 600; color: var(--mu); } .ap-fl .ap-in { margin-top: 4px; color: var(--tx); font-weight: 400; }
.ap-priv { display: flex; align-items: center; gap: 8px; background: var(--ok-s); color: #065f46; border-radius: 12px; padding: 9px 12px; font-size: 13.5px; }
html[data-mode="dark"] .ap-priv { color: #6ee7b7; }
.ap-doc { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--bd); padding: 10px 0; min-width: 0; } .ap-doc:first-child { border-top: 0; }
.ap-doc-o { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; color: var(--tx); }
.ap-doc-x { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--da-s); color: var(--da); font-size: 21px; flex: none; }
.ap-help { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .ap-help .ap-btn { flex: 1 1 30%; min-height: 48px; font-size: 15px; text-decoration: none; }

/* 27/11/2026 : Mon parcours — boutons « Mon bilan » et « Habilitations » ; page Mon bilan (tuiles, calendrier du mois) */
.ap-pvh { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; flex-wrap: wrap; }
.ap-pvb { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--bd); background: var(--card); color: var(--b); font-weight: 700; font-size: 14px; white-space: nowrap; position: relative; }
.ap-pvb i { font-size: 19px; } .ap-pvb:active { transform: scale(.96); } .ap-pvb:disabled { opacity: .5; }
.ap-pvb em { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--b); color: var(--b-ink); display: inline-flex; align-items: center; justify-content: center; }
.ap-pvb.wa { color: var(--wa); border-color: var(--wa); } .ap-pvb.wa em { background: var(--wa); color: #fff; }
@media (max-width: 420px) { .ap-pvh .ap-grow { display: none; } .ap-pvh .ap-vt { width: 100%; } .ap-pvb { flex: 1; justify-content: center; } }
.ap-btiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ap-btile { background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.ap-btile i { font-size: 22px; color: var(--mu); } .ap-btile small { color: var(--mu); font-size: 13px; margin-top: 4px; }
.ap-btile b { font-size: 24px; font-weight: 800; line-height: 1.2; } .ap-btile span { color: var(--mu); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-btile.ok i, .ap-btile.ok b { color: var(--ok); } .ap-btile.da i, .ap-btile.da b { color: var(--da); } .ap-btile.in i { color: var(--in); } .ap-btile.wa i { color: var(--wa); } .ap-btile.pu i { color: #7c3aed; }
.ap-bcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.ap-bcal > small { font-size: 12px; color: var(--mu); font-weight: 700; padding-bottom: 2px; }
.ap-bcal button { border: 0; border-radius: 10px; min-height: 46px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); color: var(--tx); }
.ap-bcal button b { font-size: 15px; } .ap-bcal button span { font-size: 10px; font-weight: 700; min-height: 12px; }
.ap-bcal .work { background: var(--ok-s); color: var(--ok); } .ap-bcal .missed { background: var(--da-s); color: var(--da); }
.ap-bcal .conge, .ap-bcal .absence { background: #ede9fe; color: #6d28d9; } .ap-bcal .weekend, .ap-bcal .future, .ap-bcal .before { opacity: .55; }
.ap-bcal .tdy { box-shadow: inset 0 0 0 2px var(--b); } .ap-bcal .on { outline: 3px solid var(--b); outline-offset: 1px; } .ap-bcal button:active { transform: scale(.94); }
.ap-bleg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--mu); justify-content: center; }
.ap-bleg span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--bg); }
.ap-bleg .work::before { background: var(--ok); } .ap-bleg .missed::before { background: var(--da); } .ap-bleg .conge::before { background: #7c3aed; } .ap-bleg .weekend::before { background: var(--bd); }
.ap-bday { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
@media (prefers-color-scheme: dark) { .ap-bcal .conge, .ap-bcal .absence { background: #2e1f4f; color: #c4b5fd; } }
/* 27/11/2026 : Mon bilan — journées comptées (1 / ½), tableau « Détail des jours » */
.ap-bdays .v { display: flex; align-items: baseline; gap: 2px; line-height: 1.1; margin: 2px 0; } .ap-bdays .v b { font-size: 34px; font-weight: 800; color: var(--ok); } .ap-bdays .v span { font-size: 20px; font-weight: 700; color: var(--mu); }
.ap-bchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ap-bchips span { font-size: 12.5px; padding: 4px 10px; border-radius: 14px; background: var(--bg); color: var(--tx); } .ap-bchips b { font-weight: 800; }
.ap-bchips .f { background: var(--ok-s); color: var(--ok); } .ap-bchips .h { background: var(--in-s); color: var(--in); } .ap-bchips .s { background: var(--wa-s); color: var(--wa); }
.ap-bcal button { position: relative; } .ap-bcal button em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; }
.ap-btab { padding: 4px 14px; } .ap-btab .th, .ap-btab .tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--bd); font-size: 14px; }
.ap-btab .th { font-size: 12px; color: var(--mu); font-weight: 700; text-transform: uppercase; } .ap-btab span:nth-child(2), .ap-btab span:nth-child(3) { text-align: right; }
.ap-btab .c { font-weight: 700; color: var(--mu); } .ap-btab .c.f { color: var(--ok); } .ap-btab .c.h { color: var(--in); }
.ap-btab .tot { border-bottom: 0; font-weight: 800; }
/* 27/11/2026 : bouton Photo au centre de la barre du bas (rond, couleur de l'entreprise, un peu plus haut) */
/* 27/11/2026 (demande de l'utilisateur, « comme les pros et les VTC ») : fiche — retour + PASTILLE d'état en haut, BARRE D'ACTION fixe en bas (au-dessus du menu) */
.ap-fhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .ap-fhead .ap-back { margin: 0; min-width: 0; } .ap-fhead .ap-back { flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ap-fpill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; flex: none; background: var(--card); border: 1.5px solid var(--bd); }
.ap-fpill .ap-dot { width: 10px; height: 10px; margin: 0; }
.ap-fpill.en_route { color: var(--in); border-color: var(--in); background: var(--in-s); } .ap-fpill.sur_site { color: var(--ok); border-color: var(--ok); background: var(--ok-s); } .ap-fpill.en_pause { color: var(--wa); border-color: var(--wa); background: var(--wa-s); }
.ap-fbar { position: fixed; left: 0; right: 0; bottom: calc(64px + var(--safe-b)); z-index: 19; padding: 10px 12px 16px; background: var(--nav); border-top: 1px solid var(--bd); box-shadow: 0 -6px 18px rgba(15,23,42,.10); }
.ap-fbar-in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-fbar-in.x { grid-template-columns: 1fr 58px; } .ap-fbar-in > :only-child { grid-column: 1 / -1; }
.ap-fbar .ap-btn { margin: 0; min-height: 54px; font-size: 16.5px; }
.ap-fbar .ap-fx { padding: 0; font-size: 24px; }
.ap-fbar-sp { height: 84px; }   /* 28/11/2026 : barre descendue un peu (demande de l'utilisateur) */
/* 27/11/2026 (demande de l'utilisateur, « comme les VTC ») : GLISSER POUR VALIDER (rond blanc à faire glisser vers la droite) */
.ap-slrow { display: grid; grid-template-columns: 1fr; gap: 10px; width: 100%; } .ap-slrow.x { grid-template-columns: 1fr 58px; } .ap-slrow.p { grid-template-columns: minmax(104px, 34%) 1fr; }
.ap-slrow .ap-btn { margin: 0; min-height: 58px; } .ap-slrow .ap-fx { padding: 0; font-size: 24px; }
.ap-fbar-in { display: block; }
.ap-sl { position: relative; height: 58px; border-radius: 16px; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; cursor: grab; background: var(--b); color: var(--b-ink); }
.ap-sl.ok { background: var(--ok); color: #fff; } .ap-sl.da { background: var(--da); color: #fff; } .ap-sl.in { background: var(--b); color: var(--b-ink); }
.ap-sl-t { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px 0 64px; font-weight: 700; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ap-sl:not(.ok-done) .ap-sl-t { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.55) 0%, #000 40%, rgba(0,0,0,.55) 80%); -webkit-mask-size: 250% 100%; animation: apSlShine 2.4s linear infinite; }
@keyframes apSlShine { from { -webkit-mask-position: 100% 0; } to { -webkit-mask-position: -150% 0; } }
.ap-sl-k { position: absolute; left: 4px; top: 4px; bottom: 4px; width: 54px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none; }
.ap-sl.ok .ap-sl-k { color: var(--ok); } .ap-sl.da .ap-sl-k { color: var(--da); } .ap-sl.in .ap-sl-k { color: var(--b); }
.ap-sl.hint .ap-sl-k { animation: apSlHint .7s ease; } @keyframes apSlHint { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(46px); } 70% { transform: translateX(14px); } }
.ap-sl.ok-done { cursor: default; }
@media (max-width: 360px) { .ap-sl-t { font-size: 15px; padding-left: 62px; } }
/* 27/11/2026 (demande de l'utilisateur) : appareil photo de l'application pour la PHOTO DE PREUVE (plein écran, jamais la galerie) */
.ap-cam { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; flex-direction: column; }
.ap-cam-top { padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: rgba(0,0,0,.6); }
.ap-cam-top b { font-size: 16px; } .ap-cam-top b i { color: #4ade80; } .ap-cam-top small { opacity: .8; }
.ap-cam-view { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.ap-cam-view video, .ap-cam-view img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.ap-cam-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 6px; font-size: 16px; }
.ap-cam-msg i { font-size: 40px; } .ap-cam-msg small { opacity: .75; }
.ap-cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 16px calc(18px + var(--safe-b)); background: rgba(0,0,0,.6); }
.ap-cam-bar.ok { grid-template-columns: 1fr 1fr; }
.ap-cam-bar .ap-btn { margin: 0; min-height: 52px; } .ap-cam-bar .ap-btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.3); }
.ap-cam-shoot { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: transparent; padding: 5px; display: flex; }
.ap-cam-shoot i { flex: 1; border-radius: 50%; background: #fff; } .ap-cam-shoot:active i { transform: scale(.9); } .ap-cam-shoot:disabled { opacity: .4; }

/* ---------- 27/11/2026 (demande de l'utilisateur) : « MA JOURNÉE » — blocs dans l'ordre du moment, tâches, consignes, matériel, météo, équipe ---------- */
.ap-blk { margin-bottom: 4px; }
.ap-bh { display: flex; align-items: center; gap: 6px; } .ap-bh > i { font-size: 15px; } .ap-bh .ap-tag { text-transform: none; letter-spacing: 0; }
.ap-next { border-left: 4px solid var(--b); }
.ap-next-w { font-size: 13px; font-weight: 700; color: var(--b); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 2px; }
.ap-qk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 2px; }
.ap-qk button { border: 1px solid var(--bd); background: var(--bg); border-radius: 12px; padding: 8px 4px; font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.ap-qk button i { font-size: 22px; color: var(--b); }
.ap-qk button:active { transform: scale(.97); }
/* tâches et matériel : grosses cases à cocher */
.ap-cklist { padding: 4px 6px; }
.ap-ck { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: transparent; padding: 10px 8px; border-radius: 12px; min-height: 52px; }
.ap-ck + .ap-ck { border-top: 1px solid var(--bd); border-radius: 0; }
.ap-ck .ck { font-size: 28px; color: var(--mu); flex: none; line-height: 1; }
.ap-ck.on .ck { color: var(--ok); }
.ap-ck.imp .ck { color: var(--da); }
.ap-ck-t { display: block; font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.ap-ck.on .ap-ck-t { text-decoration: line-through; color: var(--mu); font-weight: 500; }
.ap-ck:active { background: var(--bg); }
.ap-bsub { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--mu); min-width: 0; }
/* consignes */
.ap-cs { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--wa-s); margin-bottom: 8px; border: 1px solid transparent; }
.ap-cs .ic { font-size: 22px; color: var(--wa); flex: none; }
.ap-cs.imp { background: var(--da-s); border-color: rgba(220,38,38,.35); } .ap-cs.imp .ic { color: var(--da); }
.ap-cs.seen { background: var(--card); border-color: var(--bd); opacity: .75; } .ap-cs.seen .ic { color: var(--mu); }
.ap-cs-t { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--da); }
.ap-cs-x { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.ap-cs-ok { font-size: 13px; color: var(--ok); font-weight: 700; flex: none; white-space: nowrap; }
.ap-cs .ap-link { align-self: center; }
/* météo */
.ap-wx-i { font-size: 44px; color: var(--b); flex: none; }
.ap-wx-t { font-size: 26px; font-weight: 800; line-height: 1.1; }
.ap-wx-h { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.ap-wx-h::-webkit-scrollbar { display: none; }
.ap-wx-h > div { flex: 1 0 52px; background: var(--bg); border-radius: 12px; padding: 6px 4px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ap-wx-h small { font-size: 11px; color: var(--mu); } .ap-wx-h small.r { color: var(--in); font-weight: 700; } .ap-wx-h i { font-size: 20px; color: var(--b); } .ap-wx-h b { font-size: 14px; }
/* équipe du chantier */
.ap-crew { padding: 8px 0; } .ap-crew + .ap-crew { border-top: 1px solid var(--bd); }
/* ranger mes blocs (responsable) */
.ap-arr { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; border: 1.5px dashed var(--bd); background: transparent; color: var(--mu); border-radius: 14px; padding: 12px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.ap-arr i { font-size: 20px; }
.ap-rg { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--bd); border-radius: 14px; padding: 8px 8px 8px 4px; margin-bottom: 8px; min-width: 0; position: relative; }
.ap-rg.drag { z-index: 5; box-shadow: 0 10px 28px rgba(0,0,0,.22); border-color: var(--b); }
.ap-rg-h { width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--mu); touch-action: none; cursor: grab; flex: none; }
.ap-rg-i { font-size: 22px; color: var(--b); flex: none; }
.ap-rg .ap-grow { font-weight: 600; min-width: 0; }
.ap-rg-b { border: 0; background: var(--bg); width: 38px; height: 38px; border-radius: 10px; font-size: 22px; color: var(--tx); flex: none; }
.ap-crew .ap-av.sm { width: 36px; height: 36px; font-size: 13px; flex: none; }
.ap-bh-t { white-space: nowrap; flex: none; }
.ap-bh-x { margin-left: auto; flex: 1 1 0; min-width: 0; display: flex; justify-content: flex-end; overflow: hidden; padding-left: 8px; }
.ap-bh-x .ap-ell { display: block; max-width: 100%; }

/* ---------- 28/11/2026 (demande de l'utilisateur) : page « Installer l'application » (lien envoyé par le panel ; navigateur bloqué) ---------- */
.ap-inst-b { max-width: 470px; width: 100%; margin: -28px auto 0; padding: 0 16px 30px; display: flex; flex-direction: column; gap: 12px; }
.ap-inst-b .ap-card { margin: 0; }
.ap-inst-b .ap-al { margin: 0; }
.ap-ist { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; line-height: 1.35; }
.ap-ist + .ap-ist { border-top: 1px solid var(--bd); }
.ap-ist .n { width: 26px; height: 26px; border-radius: 50%; background: var(--b); color: var(--b-ink); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.ap-ist > i { font-size: 24px; color: var(--b); flex: none; }
.ap-inst #ap_inst { margin-bottom: 8px; }
@keyframes apDown { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }   /* 28/11/2026 : petit message qui arrive d'en haut */
/* 28/11/2026 (demande de l'utilisateur) : « Je pars vers un chantier » en cartes, comme le bloc « En route », en plus petit */
.ap-pc { padding: 12px 14px; margin-bottom: 10px; }
.ap-pc-t { display: block; font-size: 15.5px; margin-top: 6px; cursor: pointer; }
.ap-pc .ap-link.ap-pc-go { height: 34px; font-size: 13px; padding: 0 10px; }
.ap-pc-sl { margin-top: 10px; }
.ap-pc-sl .ap-sl { height: 46px; border-radius: 13px; }
.ap-pc-sl .ap-sl-k { width: 44px; border-radius: 10px; font-size: 23px; }
.ap-pc-sl .ap-sl-t { font-size: 14.5px; padding-left: 54px; }
/* 28/11/2026 (demande de l'utilisateur) : responsable — rester appuyé sur un chantier = nouveau rendez-vous (la couleur se remplit pendant l'appui) */
#ap_sl .ap-li[data-site] { position: relative; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#ap_sl .ap-li[data-site] > * { position: relative; z-index: 1; }
#ap_sl .ap-li[data-site]::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--b-soft); z-index: 0; }
#ap_sl .ap-li[data-site].hold::after { width: 100%; transition: width var(--hold, 1s) linear; }
.ap-holdhint { font-size: 12.5px; margin: -2px 4px 10px; display: flex; gap: 6px; align-items: center; }
.ap-rp { display: flex; align-items: center; gap: 12px; padding: 10px 2px; cursor: pointer; min-width: 0; }
.ap-rp + .ap-rp { border-top: 1px solid var(--bd); }
.ap-rp small { display: block; font-size: 12.5px; }
.ap-cb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border: 2px solid var(--bd); border-radius: 7px; background: var(--card); margin: 0; flex: none; position: relative; cursor: pointer; }
.ap-cb:checked { background: var(--b); border-color: var(--b); }
.ap-cb:checked::after { content: ''; position: absolute; left: 7px; top: 2px; width: 6px; height: 12px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
#ap_rh, #ap_rd { width: 100%; }
#ap_rn { height: auto; padding: 10px 14px; resize: vertical; }

/* 28/11/2026 (demande de l'utilisateur) : pastille d'état cliquable (→ Ma journée) ; tuile et fenêtre « Signaler un problème » */
button.ap-fpill { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.ap-fpill:active { transform: scale(.97); }
.ap-crb.is { border-color: var(--da); } .ap-crb.is i { color: var(--da); }
html[data-mode="dark"] .ap-crb.is i { color: var(--da); }
.ap-isk { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ap-isk button { border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); border-radius: 14px; min-height: 56px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; text-align: left; min-width: 0; }
.ap-isk button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ap-isk button i { font-size: 24px; color: var(--wa); flex: none; }
.ap-isk button.da i { color: var(--da); }
.ap-isk button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ap-isk button.on { border-color: var(--da); background: var(--da-s); }
/* 28/11/2026 : une tuile seule sur la dernière ligne du compte rendu prend toute la largeur */
.ap-cr .ap-crb:last-child:nth-child(3n+1) { grid-column: 1 / -1; min-height: 58px; flex-direction: row; }
/* 28/11/2026 (demande de l'utilisateur) : photos et documents de la fiche sur UNE rangée, qu'on fait défiler au doigt (on voit le bout de la suivante) */
.ap-strip { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; cursor: grab; overscroll-behavior-x: contain; }
.ap-strip::-webkit-scrollbar { display: none; }
.ap-strip > * { scroll-snap-align: start; flex: none; }
.ap-strip .ap-ph { width: calc((100% - 16px) / 3.3); }
.ap-strip img, .ap-strip a { -webkit-user-drag: none; user-select: none; }
.ap-sdoc { width: calc((100% - 8px) / 2.2); min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--bd); color: inherit; text-decoration: none; }
.ap-sdoc b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ap-sdoc small { font-size: 12.5px; }
.ap-sdoc:active { transform: scale(.98); }
/* 28/11/2026 (demande de l'utilisateur) : bouton « Travaux à faire » en haut de la fiche + page de lecture */
.ap-txbtn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 12px; border-radius: 16px; border: 1.5px solid var(--b); background: var(--card); color: var(--tx); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 4px 14px rgba(37,99,235,.12); }
.ap-txbtn:active { transform: scale(.985); }
.ap-txbtn-i { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--b); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ap-txbtn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-txbtn-t b { font-size: 16px; }
.ap-txbtn-t small { color: var(--mu); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-txbtn .ap-tag { flex: none; }
.ap-txbtn-c { font-size: 24px; color: var(--mu); flex: none; }
.ap-txhd { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; }
.ap-txsz { display: flex; gap: 6px; flex: none; }
.ap-txsz button { width: 44px; height: 40px; border-radius: 12px; border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); font: inherit; font-weight: 700; font-size: 15px; }
.ap-txsz button:active { border-color: var(--b); }
.ap-txx { line-height: 1.6; word-break: break-word; padding: 16px 18px; }
.ap-txx.s0 { font-size: 14.5px; } .ap-txx.s1 { font-size: 16px; } .ap-txx.s2 { font-size: 18px; } .ap-txx.s3 { font-size: 20.5px; }
.ap-txx p { margin: 0 0 .75em; }
.ap-txx .ap-txh { font-size: 1.12em; font-weight: 800; margin: 1.1em 0 .45em; padding-bottom: .3em; border-bottom: 1px solid var(--bd); color: var(--tx); }
.ap-txx .ap-txh:first-child { margin-top: 0; }
.ap-txl { display: flex; gap: 10px; margin: 0 0 .45em; }
.ap-txb { flex: none; width: 1.1em; color: var(--b); font-weight: 800; } .ap-txb.n { width: auto; min-width: 1.4em; }
/* 28/11/2026 : « Travaux du devis » dans la page de lecture : une ligne = n°, désignation (+ détail), quantité ; jamais de prix */
.ap-txw { display: flex; gap: 10px; align-items: flex-start; padding: .55em 0; border-top: 1px solid var(--bd); }
.ap-txh + .ap-txw, .ap-txw:first-child { border-top: 0; }
.ap-txw-n { flex: none; min-width: 2.2em; color: var(--mu); font-weight: 700; font-size: .9em; padding-top: .1em; }
.ap-txw-b { flex: 1; min-width: 0; word-break: break-word; }
.ap-txw-l { font-weight: 600; }
.ap-txw-d { color: var(--mu); font-size: .9em; margin-top: 2px; }
.ap-txw-q { flex: none; font-weight: 700; font-size: .85em; padding: 3px 9px; border-radius: 999px; background: var(--in-s); color: var(--in); white-space: nowrap; }
html[data-mode="dark"] .ap-txw-q { color: #8fb0ff; }
/* 28/11/2026 (demande de l'utilisateur) : bouton « Notes du chantier » + page des notes */
.ap-ntb { border-color: var(--bd); box-shadow: none; }
.ap-ntb .ap-txbtn-i { background: var(--wa-s); color: var(--wa); }
.ap-ntl { padding: 0; background: transparent; border: 0; box-shadow: none; }
.ap-ntc { background: var(--card); border: 1px solid var(--bd); border-left: 4px solid var(--bd); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.ap-ntc.pb { border-left-color: var(--da); } .ap-ntc.bl { border-left-color: var(--b); }
.ap-ntc-h { display: flex; justify-content: space-between; gap: 10px; font-size: .8em; color: var(--mu); margin-bottom: 6px; }
.ap-ntc-h > span:last-child { flex: none; }
.ap-ntc .ap-tag { margin-bottom: 6px; display: inline-block; }
.ap-ntc-x { white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
/* 28/11/2026 (demande de l'utilisateur) : lignes du devis faites (appui 1 s) + avancement en haut de « Travaux à faire » */
.ap-txpg { margin-bottom: 10px; }
.ap-txw { position: relative; border-radius: 10px; }
.ap-txw-ck { display: none; color: var(--ok); font-size: 1.15em; }
.ap-txw.ok .ap-txw-ck { display: inline; } .ap-txw.ok .ap-txw-n > span { display: none; }
.ap-txw.ok .ap-txw-l { color: var(--mu); text-decoration: line-through; text-decoration-color: var(--ok); }
.ap-txw.ok { background: var(--ok-s); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.ap-txw.can { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; touch-action: pan-y; }
.ap-txw.can::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px; background: rgba(22,163,74,.18); pointer-events: none; }
.ap-txw.can.hold::after { width: 100%; transition: width 1s linear; }
.ap-txw.busy { opacity: .55; }
/* 29/11/2026 (partie B, demande de l'utilisateur) : réception du chantier signée sur place (page de signature dans l'application) */
.ap-rcpf { display: block; width: 100%; height: calc(100vh - 92px); height: calc(100dvh - 92px); border: 0; border-radius: 14px; background: #f3f5f9; }
.ap-txbtn.ap-rcb { border-color: var(--ok, #16a34a); box-shadow: 0 4px 14px rgba(22,163,74,.14); }
.ap-txbtn.ap-rcb .ap-txbtn-i { background: var(--ok-s, #dcfce7); color: var(--ok, #16a34a); }
/* 29/11/2026 (demande de l'utilisateur) : COMME UNE VRAIE APPLICATION — pas de sélection de texte, pas de menu ni de recherche
   du téléphone (« Toucher pour rechercher », définition, Copier / Tout sélectionner) à l'appui sur un texte, un lien ou une image.
   Seules les cases où l'on écrit gardent la sélection (corriger son texte). Pas de zoom par double appui. (app.js : menu bloqué aussi) */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body { touch-action: manipulation; }
img, a { -webkit-user-drag: none; }
input, textarea, select, [contenteditable="true"], [contenteditable=""] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* 29/11/2026 (demande de l'utilisateur) : PRIORITÉS : bande URGENT, colonnes Urgent · Ensuite · Plus tard, écran « Trier » */
.ap-li.ap-urg, .ap-pk.ap-urg, .ap-card.ap-urg { border-color: #fda4af; box-shadow: inset 5px 0 0 #e11d48; position: relative; }
.ap-urgb { position: absolute; top: -1px; right: 12px; background: #e11d48; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; border-radius: 0 0 6px 6px; padding: 1px 7px; }
.ap-lane { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin: 12px 2px 6px; display: flex; align-items: center; gap: 6px; color: var(--mu); }
.ap-lane::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; } .ap-lane.l1 { color: #e11d48; } .ap-lane.l1::before { background: #e11d48; } .ap-lane.l2::before { background: #f59e0b; }
.ap-lane b { font-weight: 700; background: var(--b-soft); color: var(--mu); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.ap-prio-go { width: 100%; margin-bottom: 4px; }
.ap-pkl { min-height: 46px; border-radius: var(--r); }
.ap-pk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); margin-bottom: 8px; min-width: 0; cursor: pointer; }
.ap-pk .h { flex: none; width: 34px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: var(--mu); touch-action: none; cursor: grab; }
.ap-pk.drag { opacity: .85; border-color: var(--b); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ap-pk .ap-urgb { position: static; border-radius: 6px; flex: none; }
.ap-pke { border: 2px dashed var(--bd); border-radius: var(--r); color: var(--mu); font-size: 12px; text-align: center; padding: 10px; margin-bottom: 8px; }
.ap-pk ~ .ap-pke { display: none; }
/* 29/11/2026 (demande de l'utilisateur) : photo de profil ronde, placée par la personne ; photo à la place de l'icône du profil */
.ap-crop { display: flex; justify-content: center; padding: 18px 0 8px; }
.ap-crop-f { border-radius: 50%; overflow: hidden; position: relative; touch-action: none; background: #111; box-shadow: 0 0 0 4px var(--b), 0 8px 28px rgba(0,0,0,.3); cursor: grab; }
.ap-crop-f img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; -webkit-user-select: none; user-select: none; }
.ap-crop-z { display: flex; align-items: center; gap: 10px; max-width: 320px; margin: 12px auto 0; color: var(--mu); font-size: 22px; }
.ap-crop-z input { flex: 1; accent-color: var(--b); }
.ap-ib.ap-hasav { padding: 0; overflow: hidden; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.ap-ib.ap-hasav img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 29/11/2026 (demande de l'utilisateur) : icône ronde « Priorités » au milieu du menu du bas (rester appuyé : trier) */
.ap-nav a.ap-navph { color: var(--b); font-weight: 600; }
.ap-nav a.ap-navph i { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; background: var(--b); color: var(--b-ink, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 14px rgba(0,0,0,.25); border: 4px solid var(--nav); transition: transform .15s; }
.ap-nav a.ap-navph.on i { background: #e11d48; }
.ap-nav a.ap-navph.hold i { transform: scale(.88); box-shadow: 0 0 0 6px rgba(225,29,72,.35); }
html[data-mode="dark"] .ap-nav a.ap-navph { color: #8fb0ff; }
/* 29/11/2026 : en-tête (logo + nom) */
.ap-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ap-logow { position: relative; flex: none; }
/* 29/11/2026 (demande de l'utilisateur) : Priorités : 3 boutons côte à côte (Urgent · Ensuite · Plus tard) */
.ap-prseg button { font-size: 14px; padding: 0 4px; white-space: nowrap; }
.ap-prseg button .d { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex: none; }
.ap-prseg button.l1 .d { background: #e11d48; } .ap-prseg button.l2 .d { background: #f59e0b; }
.ap-prseg button.l1.on { background: #e11d48; color: #fff; } .ap-prseg button.l2.on { background: #f59e0b; color: #fff; } .ap-prseg button.l3.on { background: #6b7280; color: #fff; }
.ap-prseg button.on .d { background: #fff; }
@media (max-width: 380px) { .ap-prseg button { font-size: 12.5px; gap: 3px; } }
/* 29/11/2026 (demande de l'utilisateur) : mode Gestion / Terrain dans le menu du profil ; icône du profil en mode Gestion ; menu qui défile seul */
.ap-umenu { max-height: calc(100vh - 62px - var(--safe-t) - 16px); max-height: calc(100dvh - 62px - var(--safe-t) - 16px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ap-umbg { position: fixed; inset: 0; z-index: 54; background: rgba(15,23,42,.18); touch-action: none; }
.ap-umi.ap-umode { background: var(--b); color: #fff; border-radius: 12px; margin-bottom: 6px; }   /* lisible en clair comme en sombre : fond plein, texte blanc */
.ap-umi.ap-umode small, .ap-umi.ap-umode > i:last-child { color: rgba(255,255,255,.85); }
.ap-umi.ap-umode > i:first-child { background: rgba(255,255,255,.2); color: #fff; }
.ap-umi.ap-umode.g { background: #d97706; }
.ap-ib.ap-gmode { background: #f59e0b; color: #fff; }
/* 29/11/2026 (demande de l'utilisateur) : Planning : bouton (i) plus grand = infos du rendez-vous */
.ap-rdvi { width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--b-soft); color: var(--b); font-size: 26px; display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: center; }
.ap-rdvi:active { transform: scale(.94); }
/* 29/11/2026 (demande de l'utilisateur) : mise à jour automatique : heure de la dernière mise à jour, tirer vers le bas pour actualiser */
.ap-upd { text-align: center; font-size: 11px; color: var(--mu); padding: 4px 0 0; min-height: 15px; }
.ap-ptr { position: fixed; left: 50%; top: calc(62px + var(--safe-t)); z-index: 30; width: 40px; height: 40px; margin-top: -40px; border-radius: 50%; background: var(--card); color: var(--b); box-shadow: 0 4px 14px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-size: 22px; opacity: 0; transform: translate(-50%, 0); transition: opacity .15s; pointer-events: none; }
.ap-ptr.on { opacity: 1; } .ap-ptr.go { color: #fff; background: var(--b); }
.ap-ptr.spin i { animation: apSpin .7s linear infinite; }
@keyframes apSpin { to { transform: rotate(360deg); } }
/* 29/11/2026 (demande de l'utilisateur) : rappels choisis dans « Nouveau rendez-vous » */
.ap-rmc { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-rmc .ap-chip { cursor: pointer; font-weight: 600; color: var(--tx); }
.ap-rmc .ap-chip.on { background: var(--b); border-color: var(--b); color: var(--b-ink, #fff); }
/* 30/11/2026 (demande de l'utilisateur) : page d'installation : QR code (ordinateur), gros bouton (téléphone) */
.ap-qr { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; }
.ap-qrimg { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.18); margin-bottom: 8px; line-height: 0; }
.ap-qrimg img { width: 210px; height: 210px; image-rendering: pixelated; }
.ap-qr b { font-size: 17px; } .ap-qr .ap-mu { font-size: 13.5px; max-width: 320px; }
.ap-qrurl { font-weight: 600; margin-top: 4px; opacity: .8; }
.ap-instbig { width: 100%; height: 56px; font-size: 17px; }
/* 30/11/2026 (demande de l'utilisateur) : connexion et installation : le logo de l'entreprise (même image que l'icône de l'application) */
.ap-login .top .lg.ap-lgimg { background: #fff; overflow: hidden; padding: 0; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.ap-login .top .lg.ap-lgimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 30/11/2026 : rappels au choix (« Autre » : nombre + minutes / heures / jours) */
.ap-rmo { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.ap-rmo .ap-in { width: auto; margin: 0; height: 40px; padding: 0 10px; }
.ap-rmo input.ap-in { width: 70px; }
.ap-rmc .ap-chip i { font-size: 14px; margin-left: 2px; }
/* 03/12/2026 (demande de l'utilisateur) : LOCALISATION OBLIGATOIRE dans l'application Android — écran bloquant tant qu'elle n'est pas acceptée et allumée */
.ap-trk { position: fixed; inset: 0; z-index: 9000; background: var(--bg); overflow-y: auto; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; }
.ap-trk-in { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.ap-trk-ic { width: 84px; height: 84px; border-radius: 50%; background: var(--da-s); color: var(--da); display: flex; align-items: center; justify-content: center; font-size: 46px; margin: 10px auto 0; }
.ap-trk h2 { margin: 0; text-align: center; font-size: 22px; }
.ap-trk p { margin: 0; color: var(--mu); text-align: center; }
.ap-trk-l { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); padding: 6px 14px; }
.ap-trk-r { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bd); min-width: 0; }
.ap-trk-r:last-child { border-bottom: 0; }
.ap-trk-r > i { font-size: 24px; flex: 0 0 auto; }
.ap-trk-r.ok > i { color: var(--ok); } .ap-trk-r.ko > i { color: var(--da); }
.ap-trk-r span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ap-trk-r small { display: block; color: var(--mu); white-space: normal; }
.ap-trk-on { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ok); background: var(--ok-s); border-radius: 12px; padding: 8px 12px; margin-top: 10px; min-width: 0; }
.ap-trk-on span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-trk-void { color: var(--da); background: var(--da-s, rgba(220,38,38,.12)); } .ap-trk-void span { white-space: normal; }   /* 03/12/2026 : journée non valable */
.ap-trk-no { color: var(--da); }

/* 03/12/2026 (demande de l'utilisateur) : bandeau « Rendez-vous passé » avec × (vu) ; historique des rendez-vous (Planning › Historique) */
.ap-alx { flex: none; width: 34px; height: 34px; margin: -6px -6px -6px 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.08); color: inherit; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
html[data-mode="dark"] .ap-alx { background: rgba(255,255,255,.1); }
.ap-wkf button { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-rhf { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.ap-rhf::-webkit-scrollbar { display: none; }
.ap-rhf button { flex: none; height: 36px; padding: 0 12px; border-radius: 18px; border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.ap-rhf button.on { background: var(--b-soft); border-color: var(--b); color: var(--b); }
.ap-rhf button:disabled { opacity: .45; }
.ap-rhf em { font-style: normal; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bd); display: inline-flex; align-items: center; justify-content: center; }
.ap-rh { display: flex; gap: 12px; align-items: flex-start; }
.ap-rh[role=button]:active { transform: scale(.99); }
.ap-rhi { flex: none; width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bd); color: var(--mu); }
.ap-rhi.da { background: var(--da-s); color: var(--da); } .ap-rhi.wa { background: var(--wa-s); color: var(--wa); } .ap-rhi.in { background: var(--in-s); color: var(--in); }
.ap-tag.mu, html[data-mode="dark"] .ap-tag.mu { background: var(--bd); color: var(--mu); }
.ap-rhi.ok { background: var(--ok-s); color: var(--ok); }   /* 03/12/2026 : rendez-vous faits */
/* 03/12/2026 (demande de l'utilisateur) : détail d'un rendez-vous : ce qui s'est passé, dans l'ordre */
.ap-rdtl { padding: 4px 14px; }
.ap-rdt { display: flex; gap: 12px; padding: 10px 0; position: relative; min-width: 0; }
.ap-rdt + .ap-rdt { border-top: 1px solid var(--bd); }
.ap-rdt .ap-rhi { flex: none; }
.ap-rdt .ap-rhi.mu { background: var(--bd); color: var(--mu); }
.ap-rdw { margin-top: 4px; background: var(--b-soft); border-left: 3px solid var(--b); border-radius: 6px; padding: 5px 9px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-rhf button.da { color: var(--da); border-color: var(--da); } .ap-rhf button.da.on { background: var(--da-s); }   /* 03/12/2026 : « Non honorés » en rouge */

/* 03/12/2026 (demande de l'utilisateur) : COURSES — bloc « Mes courses », la course pas à pas, demande d'achat, Gestion › Courses (app.js : coursePage, supRequest, courseForm, gSup) */
.ap-sup-act { border-left: 4px solid var(--ok); cursor: pointer; }
.ap-sup-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--ok-s); color: var(--ok); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.ap-sup-li { cursor: pointer; }
.ap-sup-li-i { font-size: 24px; color: var(--b); flex: none; }
.ap-sup-tags { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.ap-sup-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 12px; }
.ap-sup-steps span { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; background: var(--bg); color: var(--mu); font-size: 18px; min-width: 0; }
.ap-sup-steps small { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-sup-steps span.ok { background: var(--ok-s); color: var(--ok); }
.ap-sup-steps span.on { background: var(--b); color: var(--b-ink); }
.ap-sup-kv { margin-top: 10px; display: grid; gap: 6px; }
.ap-sup-kv > div { display: flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
.ap-sup-kv > div > i { color: var(--b); font-size: 18px; flex: none; }
.ap-sup-kv > div > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sup-where { display: grid; gap: 12px; }
.ap-sup-wi { font-size: 24px; color: var(--b); flex: none; }
.ap-sup-items { padding: 4px 14px; }
.ap-sup-item { padding: 10px 0; }
.ap-sup-item + .ap-sup-item { border-top: 1px solid var(--bd); }
.ap-sup-item.manque .ap-grow { text-decoration: line-through; color: var(--mu); }
.ap-sup-q { flex: none; min-width: 52px; color: var(--b); }
.ap-sup-got { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ap-sup-got button { height: 40px; border-radius: 10px; border: 1.5px solid var(--bd); background: var(--card); color: var(--mu); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.ap-sup-got button.on.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.ap-sup-got button.on.wa { background: #f59e0b; border-color: #f59e0b; color: #3b2503; }
.ap-sup-got button.on.da { background: var(--da); border-color: var(--da); color: #fff; }
.ap-sup-got button:active { transform: scale(.97); }
.ap-sup-ph { position: relative; overflow: hidden; }
.ap-sup-ph span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 4px; }
.ap-sup-hist { padding: 6px 14px; }
.ap-sup-hist > div { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; }
.ap-sup-hist > div + div { border-top: 1px solid var(--bd); }
.ap-sup-hist .tm { flex: none; width: 82px; color: var(--mu); font-size: 12.5px; padding-top: 2px; }
.ap-sup-it { display: grid; grid-template-columns: 1fr 1fr 40px; grid-template-areas: "l l l" "q u x"; gap: 6px; padding: 8px 0; }
.ap-sup-it + .ap-sup-it { border-top: 1px dashed var(--bd); }
.ap-sup-it [data-k=label] { grid-area: l; } .ap-sup-it [data-k=qty] { grid-area: q; } .ap-sup-it [data-k=unit] { grid-area: u; }
.ap-sup-it .ap-in { height: 46px; font-size: 16px; }
.ap-sup-rm { grid-area: x; border: 0; background: var(--da-s); color: var(--da); border-radius: 12px; font-size: 20px; }
.ap-sup-pl { cursor: pointer; border-left: 3px solid var(--ok); padding-left: 10px; }
.ap-sup-note { margin-top: 10px; background: var(--bg); border-left: 3px solid var(--b); border-radius: 6px; padding: 7px 10px; font-size: 14px; color: var(--tx); word-break: break-word; }
.ap-dot.course { background: #7c3aed; box-shadow: 0 0 0 4px rgba(124,58,237,.18); }   /* 04/12/2026 : en course (Équipe) */
/* 04/12/2026 (demande de l'utilisateur) : « Oublié ? » en texte cliquable à droite de « Mot de passe » (connexion) */
.ap-lrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; } .ap-lrow label { margin-bottom: 0 !important; }
.ap-forgot { border: 0; background: none; padding: 4px 0; color: var(--b); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
html[data-mode="dark"] .ap-forgot { color: #b9cbff; }
/* 04/12/2026 (demande de l'utilisateur) : petite barre « Attention » (journée non valable) ; touchée, le détail va dans la cloche */
.ap-trk-att { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; border: 0; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: var(--da-s, rgba(220,38,38,.12)); color: var(--da); font-size: 13.5px; text-align: left; cursor: pointer; }
.ap-trk-att > i { font-size: 17px; flex: none; } .ap-trk-att b { flex: none; } .ap-trk-att span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .9; }
.ap-trk-att small { flex: none; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; opacity: .85; }
/* 04/12/2026 (demande de l'utilisateur) : règles de l'application à lire et accepter */
.ap-rul { z-index: 9100; }
.ap-rul-ic { color: var(--b) !important; background: var(--b-s, rgba(23,97,253,.12)) !important; }
.ap-rul-s, .ap-rul-ck, .ap-rul-msg, .ap-trk .ap-rul-s p, .ap-page .ap-rul-s p { text-align: left; }
.ap-rul .ap-btn:disabled { opacity: .45; }
.ap-trk .ap-rul-s p { color: inherit; opacity: .92; }
.ap-rul-l { display: flex; flex-direction: column; gap: 10px; }
.ap-rul-s { background: var(--card); border: 1px solid var(--bd); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.ap-rul-s b { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.ap-rul-s b span { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--b); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.ap-rul-s p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ap-rul-ck { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--bd); font-weight: 600; cursor: pointer; }
.ap-rul-ck input { width: 22px; height: 22px; flex: none; accent-color: var(--b); }
.ap-rul-ck:has(input:disabled) { opacity: .55; }
.ap-rul-read .ap-trk-in { max-width: none; }
.ap-rul-msg { padding: 12px 14px; border-radius: var(--r); background: var(--wa-s, rgba(217,119,6,.12)); font-size: 14px; } .ap-rul-msg b { display: block; margin-bottom: 4px; color: var(--wa); }

/* 05/12/2026 (demande de l'utilisateur) : TOURNÉE — bloc « Ma tournée » de Ma journée, arrêts, résumé ; choix du mode */
.ap-tour-act { border-left: 4px solid #0891b2; }
.ap-tour-act.pz { border-left-color: var(--wa); }
.ap-tour-ic { width: 44px; height: 44px; border-radius: 50%; background: rgba(8,145,178,.14); color: #0891b2; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.ap-tour-act.pz .ap-tour-ic { background: var(--wa-s, rgba(217,119,6,.14)); color: var(--wa); }
.ap-tour-ic.ok { background: var(--ok-s); color: var(--ok); }
.ap-tour-h { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-tour-mates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-tour-mates .ap-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tour-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ap-tour-kinds button { border: 1.5px solid var(--bd); background: var(--card); color: var(--tx); border-radius: 14px; min-height: 76px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; line-height: 1.15; text-align: center; }
.ap-tour-kinds button i { font-size: 26px; color: #0891b2; }
.ap-tour-kinds button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ap-tour-kinds button:active { transform: scale(.96); }
.ap-tour-kinds button:disabled { opacity: .45; }
.ap-tour-kinds button[data-tkind="chantier"] i { color: var(--b); }   /* 05/12/2026 : chantier pendant la tournée */
.ap-tour-si.k-chantier { background: rgba(23,97,253,.15); color: var(--b); }
.ap-tour-site { margin-top: 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--b); background: rgba(23,97,253,.12); }
.ap-tour-site > .ap-row > i { font-size: 26px; color: var(--b); }
.ap-tour-sl { max-height: 46vh; overflow-y: auto; }
.ap-tour-sl .ap-opt.on { border-color: var(--ok); }
.ap-tour-kinds button[data-tkind="achat"] i { color: var(--ok); } .ap-tour-kinds button[data-tkind="garage"] i { color: var(--wa); } .ap-tour-kinds button[data-tkind="controle"] i { color: #7c3aed; }
.ap-tour-list .ap-tour-st { cursor: pointer; }
.ap-tour-si { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex: none; background: rgba(8,145,178,.12); color: #0891b2; }
.ap-tour-si.k-achat { background: var(--ok-s); color: var(--ok); } .ap-tour-si.k-garage { background: var(--wa-s, rgba(217,119,6,.14)); color: var(--wa); } .ap-tour-si.k-controle { background: rgba(124,58,237,.12); color: #7c3aed; }
.ap-tour-sum { cursor: pointer; }
.ap-tour-inv { border-left: 4px solid var(--wa); }
.ap-tour-ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.ap-tour-ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.ap-tour-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 4px; text-align: center; }
.ap-tour-kpi div { background: var(--bg); border-radius: 12px; padding: 8px 2px; min-width: 0; }
.ap-tour-kpi b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ap-tour-kpi small { color: var(--mu); font-size: 11.5px; }
.ap-dot.tour { background: #0891b2; box-shadow: 0 0 0 4px rgba(8,145,178,.18); }
.ap-mpick.on { background: var(--bg); } .ap-mpick.on > i:last-child { color: var(--ok); }
/* 05/12/2026 (demande de l'utilisateur) : Mon bilan › un jour = où il a travaillé ; Gestion › Équipe › Employés prêtés (régie) */
.ap-bwhere { margin-top: 6px; } .ap-bwhere .ap-hrow:first-child { border-top: 0; }
.ap-rgcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--bd); color: var(--tx); font: inherit; }
.ap-rgcard b { display: block; font-size: 16px; } .ap-rgcard small { display: block; font-size: 13px; } .ap-rgcard > i { font-size: 22px; color: var(--mu); }
.ap-rgi { display: block; width: 100%; padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--bd); color: var(--tx); font: inherit; }
.ap-rgi:active, .ap-rgcard:active { transform: scale(.98); }
.ap-rgnums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--mu); align-items: center; } .ap-rgnums b { color: var(--tx); }
.ap-rgp { padding: 12px; } .ap-rgp .ap-bcal { margin-top: 10px; }
.ap-rgcal .half { background: var(--wa-s); color: var(--wa); } .ap-rgcal .zero { color: var(--mu); }
.ap-rgcal button.fx { position: relative; } .ap-rgcal button.fx::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #7c3aed; }
.ap-bleg .half::before { background: var(--wa); } .ap-bleg .fx::before { background: #7c3aed; border-radius: 50%; }
.ap-rgfx { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #ede9fe; color: #5b21b6; font-size: 13px; } .ap-rgfx div { margin-top: 2px; font-style: italic; }
html[data-mode="dark"] .ap-rgfx { background: #2e1f4f; color: #c4b5fd; }
.ap-rgch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ap-rgch button { border: 1.5px solid var(--bd); background: var(--bg); color: var(--tx); border-radius: 12px; min-height: 46px; font-size: 15px; font-weight: 600; }
.ap-rgch button.on { background: var(--b); border-color: var(--b); color: var(--b-ink); }
.ap-rgvoid b, .ap-rgvoid .ap-ell { text-decoration: line-through; opacity: .6; }
.ap-rglink { cursor: pointer; } .ap-rglink:active { opacity: .7; }
/* 05/12/2026 : liste des acomptes de la régie — pas de trait au-dessus de la première ligne */
.ap-rgpays > .ap-hrow:first-child { border-top: 0; }

/* 06/12/2026 (demande de l'utilisateur : « tous les select, beau, joli et pro ») : sélecteur de l'application (app.js, pkEnhance / pkOpen) */
.ap-chx-src { display: none !important; }
.ap-chx { display: flex; align-items: center; gap: 10px; text-align: left; color: var(--tx); cursor: pointer; padding-right: 8px; box-shadow: 0 1px 2px rgba(15,23,42,.05); transition: border-color .15s, box-shadow .15s; }
.ap-chx .ap-chx-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ap-chx.ph .ap-chx-t { color: var(--mu); font-weight: 400; }
.ap-chx .ap-chx-c { width: 32px; height: 32px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--b); background: var(--b-soft); background: color-mix(in srgb, var(--b) 13%, transparent); transition: transform .2s; }
.ap-chx.open { border-color: var(--b); box-shadow: 0 0 0 3px color-mix(in srgb, var(--b) 18%, transparent); }
.ap-chx.open .ap-chx-c { transform: rotate(180deg); }
.ap-chx:disabled { opacity: .55; cursor: default; }
.ap-chx .ap-chx-n { flex: none; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--b); color: var(--b-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ap-rmo .ap-chx { gap: 4px; padding-right: 4px; } .ap-rmo .ap-chx .ap-chx-c { width: 24px; height: 24px; font-size: 18px; border-radius: 8px; }
.ap-chx-bg .ap-sheet { padding-bottom: 0; }
.ap-chx-qw { position: sticky; top: -10px; z-index: 2; background: var(--card); padding: 6px 0 8px; margin-top: 6px; }
.ap-chx-qw .mdi { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--mu); pointer-events: none; }
.ap-chx-qw .ap-chx-q { height: 48px; padding-left: 42px; font-size: 16px; }
.ap-chxl { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ap-chxo { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 12px; border-radius: 14px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--tx); text-align: left; transition: border-color .15s, background .15s, box-shadow .15s, transform .08s; }
.ap-chxo:active { transform: scale(.985); }
.ap-chxo .t { flex: 1; min-width: 0; font-size: 16.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-chxo .t small { display: block; font-size: 13px; font-weight: 400; color: var(--mu); overflow: hidden; text-overflow: ellipsis; }
.ap-chxo.none .t { font-weight: 500; color: var(--mu); }
.ap-chxo .av, .ap-tour-mate .av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--b); background: var(--b-soft); background: color-mix(in srgb, var(--b) 15%, transparent); }
.ap-chxo .ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--b); background: color-mix(in srgb, var(--b) 13%, transparent); }
.ap-chxo .ck { width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid var(--bd); display: flex; align-items: center; justify-content: center; font-size: 17px; color: transparent; transition: background .15s, border-color .15s; }
.ap-chxl.multi .ck { border-radius: 8px; }
.ap-chxo.on { border-color: var(--b); background: color-mix(in srgb, var(--b) 9%, var(--bg)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--b) 14%, transparent); }
.ap-chxo.on .ck { background: var(--b); border-color: var(--b); color: var(--b-ink); }
.ap-chxo:disabled { opacity: .45; }
.ap-chx-ft { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; background: var(--card); padding: 12px 0 calc(14px + var(--safe-b)); margin-top: 6px; box-shadow: 0 -10px 14px -12px rgba(15,23,42,.35); }
.ap-chx-ft .ap-btn { flex: 1; }
/* 06/12/2026 : coéquipiers de la tournée (le chef peut les déposer) */
.ap-tour-crew { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ap-tour-mate { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--bd); }
.ap-tour-mate .av { width: 36px; height: 36px; font-size: 14px; }
.ap-tour-mate .av.wa { color: var(--wa); background: var(--wa-s); }
.ap-tour-mate .ap-btn { flex: none; width: auto; padding: 0 12px; }
