/* rh/assets/emp.css — appli employé ¡Vamos! (Poppins, jaune #FFC92E)
   17/11/2026 (soir) : seul le FOND est clair (gris doux, pas blanc) ; les cartes restent sombres comme sur le site
   (fond clair + blocs noirs). Les variables sont « claires » sur la page et « sombres » dans chaque carte.
   Chargée seulement par l'appli employé (index.php, login.php) : l'admin garde son style. */
:root {
  color-scheme: light;
  --page: #e7e6e2;                    /* fond : gris chaud doux, ni blanc ni noir */
  --bg: var(--page); --bg2: #f1f0ec; --bg3: #d8d7d2;
  --jaune: #ffc92e; --gold: #8a6100;
  --red: #dc2626; --blue: #2563eb;
  --text: #1a1c1e; --text2: #5f646b; --border: rgba(0,0,0,.1);
  --radius: 18px; --shadow: 0 2px 6px rgba(0,0,0,.08), 0 10px 24px rgba(0,0,0,.08);
}
html { background: var(--page); }
body { font-family: 'Poppins', system-ui, sans-serif; background: var(--page); color: var(--text); -webkit-font-smoothing: antialiased; }

/* tout ce qui est une carte passe en sombre (et son contenu hérite des couleurs sombres) */
.card, .auth-box, #cloche-liste, .pl-nav, .pl-jour:not(.repos), .pl-jour.repos.auj {
  color-scheme: dark;
  --bg2: #1a1c1e; --bg3: #2a2d31; --gold: #ffc92e;
  --text: #f5f5f5; --text2: #a1a6ad; --border: rgba(255,255,255,.08);
  color: var(--text);
}
.card { background: #1a1c1e; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }

h1 { color: var(--text) !important; font-size: 1.55rem !important; font-weight: 800; letter-spacing: -.01em; }
.card-title { color: var(--text2); font-size: .7rem; font-weight: 700; letter-spacing: .09em; }
.btn { border-radius: 12px; font-family: inherit; }
.btn-primary { background: var(--jaune); color: #1a1c1e; }
.btn-primary:hover { background: #f5b800; }
.btn-secondary { background: var(--bg3); border: 1px solid transparent; color: var(--text); }
.btn-secondary:hover { filter: brightness(1.1); }
input, select, textarea { font-family: inherit; }
.form-group input, .form-group select, .form-group textarea { background: var(--bg3); border-color: transparent; color: var(--text); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--jaune); }
.badge-gold { background: rgba(255,201,46,.16); color: #ffc92e; }
.badge-green { background: rgba(16,185,129,.18); color: #34d399; }
.badge-red { background: rgba(239,68,68,.18); color: #f87171; }
.alert-danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); color: #fca5a5; }

/* icônes au trait */
.emp-ico { display: inline-grid; place-items: center; flex-shrink: 0; }
.emp-ico svg, .emp-nav-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* en-tête : se fond dans le gris de la page */
.emp-header { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.1rem; padding-top: calc(.7rem + env(safe-area-inset-top)); background: rgba(231,230,226,.88);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); }
.emp-logo { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.emp-logo img { height: 26px; width: auto; display: block; }
.emp-logo span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--text2); border-left: 1px solid rgba(0,0,0,.18); padding-left: .55rem; }
.emp-cloche { width: 42px; height: 42px; border-radius: 12px; background: #1a1c1e; border: 0; color: #f5f5f5; display: grid; place-items: center; cursor: pointer; position: relative; }
.emp-cloche svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#cloche-liste { background: #1a1c1e !important; border-color: rgba(255,255,255,.08) !important; box-shadow: 0 14px 36px rgba(0,0,0,.3) !important; }
.emp-top-nav a { display: flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 10px; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--text2); }
.emp-top-nav a.active { background: #1a1c1e; color: #ffc92e; }

/* barre du bas : sombre, comme la barre de commande du site */
.bottom-nav { background: rgba(15,16,18,.94); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-top: 2px solid var(--jaune);
  padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom, 0px)); }
.bottom-nav .bottom-nav-item, .bottom-nav .bottom-nav-item:first-child:nth-last-child(n) ~ .bottom-nav-item, .bottom-nav .bottom-nav-item:first-child:nth-last-child(n) {
  font-size: .69rem !important; font-weight: 600; gap: .25rem; padding: .45rem .1rem; color: #9ca1a8; min-width: 0; }
.bottom-nav-item .emp-nav-ico svg { width: 24px; height: 24px; }
.bottom-nav-item span:last-child { white-space: nowrap; }
.bottom-nav-item.active { color: #ffc92e !important; }
.bottom-nav-item.active .emp-nav-ico { position: relative; }
.bottom-nav-item.active .emp-nav-ico::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; border-radius: 50%; background: var(--jaune); transform: translateX(-50%); }

/* accueil */
.emp-salut { font-size: 1.45rem; font-weight: 800; margin: .2rem 0 1rem; letter-spacing: -.01em; }
.emp-alerte { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; text-decoration: none; background: #2a1517 !important; box-shadow: inset 0 0 0 1px rgba(239,68,68,.45), var(--shadow) !important; padding: .9rem 1rem !important; }
.emp-alerte .emp-ico { color: #f87171; }
.emp-alerte small { color: var(--text2); font-size: .78rem; }
.emp-prochain { margin-bottom: 1rem; background: var(--jaune) !important; color: #1a1c1e; }
.emp-prochain .card-title { color: rgba(0,0,0,.55); }
.emp-prochain-jour { font-size: .9rem; color: #1a1c1e; font-weight: 700; }
.emp-prochain-heure { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: .1rem 0; color: #1a1c1e; }
.emp-prochain-poste { font-size: .8rem; color: rgba(0,0,0,.6); text-transform: uppercase; letter-spacing: .06em; }
.emp-prochain div[style*="color:var(--text2)"] { color: rgba(0,0,0,.6) !important; }
.emp-cp { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; text-decoration: none; }
.emp-cp-val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.emp-cp-val small { font-size: .9rem; color: var(--text2); font-weight: 600; }
.emp-chevron { font-size: 1.8rem; color: var(--text2); }
.emp-contact { width: 100%; justify-content: flex-start !important; gap: .75rem !important; text-align: left; height: auto; padding: .7rem .9rem !important; }
.emp-contact .emp-ico { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,201,46,.14); color: #ffc92e; }
.emp-contact small { display: block; font-size: .76rem; color: var(--text2); font-weight: 500; overflow-wrap: anywhere; }

/* planning : les jours de repos restent sur le fond, en gris */
.pl-jour.repos .pl-date strong, .pl-jour.repos .pl-repos { color: #7a7f86; }

/* profil : déconnexion en bas, discrète */
.emp-deco { display: flex; align-items: center; justify-content: center; gap: .5rem; width: calc(100% - 3rem); margin: .5rem 1.5rem 0; padding: .8rem; border-radius: 12px;
  border: 1px solid rgba(220,38,38,.45); background: transparent; color: var(--red); text-decoration: none; font-weight: 600; font-size: .9rem; }

/* pages de connexion */
.auth-page { background: radial-gradient(900px 420px at 50% -10%, rgba(255,201,46,.35), transparent), var(--page); }
.auth-box { background: #1a1c1e; border: 0; border-radius: 22px; box-shadow: 0 14px 44px rgba(0,0,0,.18); }
.auth-title { color: var(--text); font-weight: 800; }
.pin-key { background: var(--bg3); border: 1px solid transparent; border-radius: 14px; color: var(--text); }
.pin-key:active, .pin-key:hover { filter: brightness(1.15); }
.pin-dot { border-color: rgba(255,255,255,.25); }
.pin-dot.filled { background: var(--jaune); border-color: var(--jaune); }
.pl-jour.passe:not(.repos) { opacity: 1 !important; box-shadow: none; }
.pl-jour.passe:not(.repos) > * { opacity: .45; }

/* 17/11/2026 (soir) : page de connexion à la taille exacte de l'écran (100vh débordait sur téléphone), plus compacte ;
   champ en 16 px (en dessous, certains téléphones zooment ou n'ouvrent pas le clavier) */
.auth-page { min-height: 100vh; min-height: 100dvh; padding: calc(12px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom)); }
.auth-box { padding: 1.4rem 1.25rem 1.25rem; }
.auth-logo { margin-bottom: .35rem; }
.auth-logo img { height: 40px !important; }
.auth-subtitle { margin-bottom: 1rem; }
.auth-box .form-group { margin-bottom: .85rem; }
.auth-box .form-group input { font-size: 16px; padding: .75rem 1rem; }
.auth-box .pin-display { margin-bottom: 1rem; }
.auth-box .pin-keyboard { gap: .45rem; }
.auth-box .pin-key { padding: .8rem; font-size: 1.25rem; }
@media (max-height: 700px) {
  .auth-box { padding: 1rem 1rem .9rem; }
  .auth-logo img { height: 32px !important; }
  .auth-title { font-size: 1.2rem; }
  .auth-box .pin-key { padding: .6rem; font-size: 1.15rem; }
}

/* 17/11/2026 (soir) : barre du haut foncée (logo + cloche), assortie à la barre d'état noire et à la barre du bas */
.emp-header { background: rgba(15,16,18,.95); border-bottom: 0; box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 14px rgba(0,0,0,.12); }
.emp-logo span { color: #a1a6ad; border-left-color: rgba(255,255,255,.2); }
.emp-cloche { background: #2a2d31; color: #f5f5f5; }
.emp-top-nav a { color: #a1a6ad; }
.emp-top-nav a.active { background: rgba(255,201,46,.15); color: #ffc92e; }

/* 17/11/2026 (soir) : plus de vide sous le contenu (une marge de 100 px + 80 px s'ajoutaient sous la barre du bas, qui fait ~75 px) */
body.emp-app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px)); }
body.emp-app div[style="height:100px"] { display: none; }
@media (min-width: 901px) { body.emp-app { padding-bottom: 1.5rem; } }
/* zone de l'heure / barre d'état et rebond du haut : noirs, comme la barre du haut */
html { background: #111215; }

/* 17/11/2026 (soir) : page Équipe — les lignes des personnes en sombre comme les cartes */
.eq-row { color-scheme: dark; --bg2: #1a1c1e; --bg3: #2a2d31; --gold: #ffc92e; --text: #f5f5f5; --text2: #a1a6ad; --border: rgba(255,255,255,.08);
  color: var(--text); background: #1a1c1e !important; border: 0 !important; border-radius: 14px !important; box-shadow: var(--shadow); }

/* 17/11/2026 (soir) : bouton Se déconnecter jaune, texte rouge */
.emp-deco { background: var(--jaune); border: 0; color: #c81e1e; font-weight: 700; box-shadow: var(--shadow); }

/* 17/11/2026 (soir) : sur iPhone la barre d'état (heure, batterie) est transparente ; on peint sa zone en noir comme la barre du haut */
body.emp-app::before, body.auth-page::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: #0f1012; z-index: 1000; pointer-events: none; }

/* 17/11/2026 (soir) : les iPhone récents colorent la zone de l'heure avec la couleur de fond de la page (plus la balise theme-color).
   La page est donc NOIRE, et le gris est une couche fixe posée derrière le contenu. */
html { background: #111215 !important; }
body.emp-app, body.auth-page { background: transparent !important; }
body.emp-app::after, body.auth-page::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--page); }
body.auth-page::after { background: radial-gradient(900px 420px at 50% -10%, rgba(255,201,46,.35), transparent), var(--page); }

/* 17/11/2026 (soir) : zone de l'heure, barre du haut et barre du bas exactement du même noir (avant : barres légèrement transparentes sur le gris = un peu plus claires) */
.emp-header { background: #111215 !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.bottom-nav { background: #111215 !important; }
body.emp-app::before, body.auth-page::before { background: #111215; }

/* 18/11/2026 : bandeau « Installer l'appli » (assets/installer.js), seulement dans le navigateur d'un téléphone */
.inst-bandeau { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 950;
  display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 18px; background: #1a1c1e; color: #f5f5f5;
  box-shadow: 0 12px 34px rgba(0,0,0,.35); border: 1px solid rgba(255,201,46,.35); font-family: 'Poppins', system-ui, sans-serif;
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1); max-width: 560px; margin: 0 auto; }
body.emp-app .inst-bandeau { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.inst-bandeau.visible { transform: none; }
.inst-icone { width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0; }
.inst-texte { flex: 1; min-width: 0; font-size: .8rem; line-height: 1.4; color: #c4c8cd; }
.inst-texte strong { display: block; color: #f5f5f5; font-size: .9rem; margin-bottom: .1rem; }
.inst-texte b { color: #ffc92e; font-weight: 600; }
.inst-partager { width: 17px; height: 17px; vertical-align: -3px; fill: none; stroke: #ffc92e; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.inst-bouton { margin-top: .45rem; font: inherit; font-weight: 700; font-size: .85rem; background: #ffc92e; color: #1a1c1e; border: 0; border-radius: 10px; padding: .45rem 1rem; cursor: pointer; }
.inst-fermer { align-self: flex-start; width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: 50%; background: #2a2d31; color: #a1a6ad; font-size: .8rem; cursor: pointer; }

/* 18/11/2026 : fenêtre « Active les notifications » (assets/notif.js) */
.notif-voile { position: fixed; inset: 0; z-index: 980; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s; }
.notif-voile.visible { opacity: 1; }
.notif-fenetre { width: 100%; max-width: 520px; background: #1a1c1e; color: #f5f5f5; border-radius: 24px 24px 0 0; padding: 1.6rem 1.4rem calc(1.3rem + env(safe-area-inset-bottom, 0px)); text-align: center;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); font-family: 'Poppins', system-ui, sans-serif; }
.notif-voile.visible .notif-fenetre { transform: none; }
.notif-cloche { width: 64px; height: 64px; border-radius: 20px; background: rgba(255,201,46,.14); color: #ffc92e; display: grid; place-items: center; margin: 0 auto .9rem; }
.notif-cloche svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notif-fenetre strong { display: block; font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.notif-fenetre p { font-size: .88rem; color: #a1a6ad; line-height: 1.5; margin: 0 0 1.2rem; }
.notif-oui { display: block; width: 100%; height: 52px; border: 0; border-radius: 14px; background: #ffc92e; color: #1a1c1e; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; margin-bottom: .5rem; }
.notif-non { display: block; width: 100%; height: 44px; border: 0; border-radius: 14px; background: transparent; color: #a1a6ad; font: inherit; font-size: .92rem; cursor: pointer; }
