/* Djolof RH — espace salarié (2.61.0)
   Aux couleurs de Djolof Chicken : rouge crête, orange, jaune, noir. Pensé d'abord pour le téléphone :
   en-tête avec salutation et chiffres, barre de navigation en bas, grands boutons, demandes avec suivi d'étapes. */
:root { --portal-max: 980px; --rouge: #D41A12; --rouge-f: #A8160F; --orange: #F29A00; --jaune: #FFBD00; --jaune-p: #FFF3CC; --noir: #1E1A19;
  --gris: #7A716D; --ligne: #E7E3E0; --fond: #F5F4F2; --grad: linear-gradient(135deg, #D41A12 0%, #E2410C 55%, #F29A00 100%); --mod: #D41A12; --mod-soft: #FDECEA; }
body.portal { background: var(--fond); color: var(--noir); }
.pi { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 22px -12px rgba(212,26,18,.8); }
.btn-primary:hover { filter: brightness(1.05); color: #fff; background: var(--grad); }
.btn .pi { width: 18px; height: 18px; }
input:focus, select:focus, textarea:focus { border-color: var(--rouge); outline: 3px solid rgba(255,189,0,.35); }

/* ---------- En-tête ---------- */
.ps-head { position: relative; overflow: hidden; color: #fff; background: var(--grad); padding-bottom: 54px; isolation: isolate; }
.ps-head::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,189,0,.7), transparent 65%); }
.ps-pattern { position: absolute; inset: 0; z-index: -1; opacity: .13; background-image: radial-gradient(circle at 10px 10px, #fff 1.6px, transparent 2px); background-size: 22px 22px;
  mask-image: linear-gradient(100deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(100deg, #000, transparent 70%); }
.ps-in { max-width: var(--portal-max); margin: 0 auto; padding: 14px 20px 0; }
.ps-bar { display: flex; align-items: center; gap: 12px; }
.ps-logo { height: 46px; width: auto; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 4px 8px; }
.ps-sp { flex: 1; }
.ps-out { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; border-radius: 12px; padding: 8px 12px; font: 600 13.5px inherit; font-family: inherit; cursor: pointer; }
.ps-out:hover { background: rgba(255,255,255,.22); }
.ps-hello { display: flex; align-items: center; gap: 16px; margin: 22px 0 18px; }
.ps-me { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.ps-me .av { --s: 68px; box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 10px 24px -8px rgba(0,0,0,.4); font-size: 24px; }
.ps-kick { margin: 0; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.88); }
.ps-hello h1 { margin: 0; font-size: clamp(26px, 6vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.ps-meta { margin: 4px 0 0; font-size: 13.5px; color: rgba(255,255,255,.85); font-weight: 500; }
.ps-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ps-stats button { text-align: left; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.15); color: #fff; border-radius: 16px; padding: 12px 14px; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-family: inherit; transition: transform .15s, background .15s; }
.ps-stats button:hover { transform: translateY(-2px); background: rgba(255,255,255,.22); }
.ps-stats b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ps-stats span { font-size: 12.5px; color: rgba(255,255,255,.88); font-weight: 600; }

/* ---------- Navigation : onglets sur ordinateur, barre du bas sur téléphone ---------- */
.ps-nav { position: relative; z-index: 5; max-width: calc(var(--portal-max) - 40px); margin: -30px auto 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px;
  background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(30,26,25,.05), 0 18px 36px -18px rgba(30,26,25,.35); }
.ps-nav button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; padding: 12px 8px; border-radius: 13px; cursor: pointer;
  font: 700 14px inherit; font-family: inherit; color: var(--gris); transition: background .15s, color .15s; }
.ps-nav button:hover { background: var(--fond); color: var(--noir); }
.ps-nav button.active { color: #fff; background: var(--grad); box-shadow: 0 8px 18px -10px rgba(212,26,18,.9); }
.ps-nav .ps-plus:not(.active) { color: var(--rouge); }
.ps-dot { position: absolute; top: 4px; right: 8px; font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--jaune); color: var(--noir);
  font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- Contenu ---------- */
.portal-wrap { max-width: var(--portal-max); margin: 0 auto; padding: 22px 20px 60px; }
.ps-enter > * { animation: psIn .35s cubic-bezier(.2,.8,.2,1) backwards; }
.ps-enter > *:nth-child(2) { animation-delay: .04s; } .ps-enter > *:nth-child(3) { animation-delay: .08s; } .ps-enter > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes psIn { from { opacity: 0; transform: translateY(8px); } }
.portal-card { background: #fff; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(30,26,25,.04), 0 10px 26px -18px rgba(30,26,25,.3); }
.portal-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.portal-card .sub, .ps-title .sub { color: var(--gris); font-size: 13.5px; margin: 0 0 16px; }
.ps-h { font-size: 15.5px !important; margin-bottom: 12px !important; }
.ps-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.ps-title h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.ps-title .sub { margin: 0; }
.portal-foot { text-align: center; color: #A39893; font-size: 12.5px; margin-top: 26px; }
.hint { font-size: 12.5px; color: var(--gris); margin-top: 6px; }
.empty { text-align: center; color: var(--gris); padding: 18px; margin: 0; }

/* Mon dossier */
.ps-prof-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.ps-prof-top .av { --s: 64px; font-size: 22px; }
.ps-prof-top .sub { margin: 2px 0 0; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-chips span { display: inline-flex; align-items: center; gap: 7px; background: var(--fond); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--gris); font-weight: 600; }
.ps-chips span b { color: var(--noir); }
.ps-chips span .pi { width: 17px; height: 17px; color: var(--rouge); }
.ps-chips span.ok { background: #E6F4EC; } .ps-chips span.ok .pi { color: #1F7A4D; }
.dossier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.dossier-grid .it { padding: 11px 14px; background: var(--fond); border-radius: 14px; }
.dossier-grid .it .k { font-size: 12px; color: var(--gris); font-weight: 700; }
.dossier-grid .it .v { font-size: 15px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.ps-tip { display: flex; gap: 12px; align-items: center; background: var(--jaune-p); border: 1px solid #F2DE9A; border-radius: 16px; padding: 12px 16px; color: #6B4C00; }
.ps-tip .pi { color: var(--rouge); } .ps-tip p { margin: 0; font-size: 14px; }
.ps-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--rouge); cursor: pointer; text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 2px; }

/* Mes demandes */
.ps-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ps-filter button { border: 1px solid var(--ligne); background: #fff; border-radius: 99px; padding: 7px 14px; font: 700 13.5px inherit; font-family: inherit; color: #4A4240; cursor: pointer; }
.ps-filter button small { color: var(--gris); margin-left: 3px; }
.ps-filter button.active { background: var(--noir); border-color: var(--noir); color: #fff; } .ps-filter button.active small { color: var(--jaune); }
div.req { position: relative; background: #fff; border-radius: 18px; padding: 16px 18px 16px 20px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.9); overflow: hidden;
  box-shadow: 0 1px 2px rgba(30,26,25,.04), 0 10px 24px -18px rgba(30,26,25,.35); }
div.req::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--jaune); }
div.req.st-en-cours::before { background: var(--orange); } div.req.st-traitee::before { background: #1F9D5C; } div.req.st-refusee::before { background: var(--rouge); } div.req.st-annulee::before { background: #C9C2BE; }
div.req .rh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ps-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: var(--grad); color: #fff; box-shadow: 0 8px 16px -8px rgba(212,26,18,.8); }
.ps-ico .pi { width: 21px; height: 21px; }
.ps-rt { display: flex; flex-direction: column; min-width: 0; } .ps-rt strong { font-size: 15.5px; }
div.req .sp { flex: 1; }
div.req .meta { color: var(--gris); font-size: 13px; margin-top: 6px; }
div.req .msg { margin: 10px 0 0; font-size: 14px; white-space: pre-line; background: var(--fond); border-radius: 12px; padding: 10px 12px; }
div.req .resp { margin-top: 12px; padding: 12px 14px; background: var(--jaune-p); border: 1px solid #F2DE9A; border-radius: 14px; font-size: 14px; }
div.req .resp .lbl { font-size: 12px; color: var(--rouge-f); font-weight: 800; margin-bottom: 3px; }
.ps-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 4px; padding: 0; position: relative; }
.ps-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #B5ACA7; text-align: center; }
.ps-steps li::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--ligne); z-index: 0; }
.ps-steps li:first-child::before { display: none; }
.ps-steps li.on::before { background: var(--grad); }
.ps-steps i { position: relative; z-index: 1; font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--ligne); font-size: 12px; }
.ps-steps li.on { color: var(--noir); }
.ps-steps li.on i { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 12px -6px rgba(212,26,18,.8); }
.ps-steps li.on.ko i { background: var(--noir); } .ps-steps li.on.ko { color: var(--rouge); }
.ps-act { margin-top: 10px; display: flex; justify-content: flex-end; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.files a { display: inline-flex; align-items: center; gap: 7px; background: var(--fond); border: 1px solid var(--ligne); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; color: var(--noir); text-decoration: none; font-weight: 600; }
.files a .pi { width: 17px; height: 17px; color: var(--gris); }
.files a:hover { border-color: var(--rouge); }
.files a.rh { background: var(--noir); border-color: var(--noir); color: #fff; } .files a.rh .pi { color: var(--jaune); }
.ps-empty { text-align: center; padding: 34px 22px; }
.ps-empty > .pi { width: 54px; height: 54px; padding: 12px; border-radius: 18px; background: var(--grad); color: #fff; margin-bottom: 10px; }

/* Nouvelle demande : tuiles */
.ps-fam { margin-bottom: 14px; } .ps-fam:last-child { margin-bottom: 0; }
.ps-fam > p { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--gris); }
.ps-fam > p .pi { width: 18px; height: 18px; color: var(--rouge); }
.ps-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ps-tile { text-align: left; border: 1.5px solid var(--ligne); background: #fff; border-radius: 14px; padding: 13px 14px; font: 700 14px inherit; font-family: inherit; color: var(--noir); cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s; position: relative; }
.ps-tile::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #C9C2BE; font-size: 20px; }
.ps-tile:hover { border-color: var(--rouge); transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(212,26,18,.7); }
.ps-tile:hover::after { color: var(--rouge); }
.ps-chosen { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--ligne); }
.ps-chosen div { flex: 1; display: flex; flex-direction: column; } .ps-chosen strong { font-size: 16px; }
.ps-send { width: 100%; padding: 14px; font-size: 15.5px; border-radius: 14px; }
.file-drop { display: block; border: 1.5px dashed #D4CEC9; border-radius: 14px; padding: 18px; text-align: center; color: var(--gris); font-size: 13.5px; cursor: pointer; background: var(--fond); }
.file-drop:hover { border-color: var(--rouge); }
.file-drop.has { border-color: #1F9D5C; color: #1F7A4D; background: #EEF8F2; } .file-drop .pi { vertical-align: -4px; }
.sigpad { border: 1.5px dashed #D4CEC9; border-radius: 14px; background: #fff; width: 100%; max-width: 520px; }
.sigpad canvas { width: 100%; height: 150px; touch-action: none; display: block; cursor: crosshair; }

/* Écran d'inscription (portail.php?inscription=1) */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(60% 50% at 100% 0%, rgba(255,189,0,.18), transparent 70%), radial-gradient(50% 40% at 0% 100%, rgba(212,26,18,.1), transparent 70%), var(--fond); }
.auth-box { width: 100%; max-width: 460px; background: #fff; border-radius: 24px; box-shadow: 0 30px 60px -28px rgba(30,26,25,.4); overflow: hidden; position: relative; }
.auth-box::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--rouge), var(--orange), var(--jaune)); }
.auth-head { text-align: center; padding: 24px 26px 6px; } .auth-head img { height: 62px; margin-bottom: 8px; }
.auth-head h1 { font-size: 22px; margin: 0; font-weight: 800; } .auth-head p { color: var(--gris); font-size: 13.5px; margin: 6px 0 0; }
.auth-body { padding: 14px 26px 26px; }
.portal-tabs { display: flex; gap: 6px; background: var(--fond); padding: 5px; border-radius: 14px; margin-bottom: 18px; }
.portal-tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 11px; font: 700 14px inherit; font-family: inherit; color: var(--gris); cursor: pointer; }
.portal-tabs button.active { background: var(--grad); color: #fff; }
.auth-switch { text-align: center; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--ligne); font-size: 13.5px; color: var(--gris); }
.auth-switch a { color: var(--rouge); font-weight: 800; text-decoration: none; }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  .ps-head { padding-bottom: 18px; }
  .ps-in { padding: 12px 16px 0; }
  .ps-out span { display: none; } .ps-out { padding: 8px; }
  .ps-logo { height: 40px; }
  .ps-hello { margin: 16px 0 14px; } .ps-me .av { --s: 56px; font-size: 20px; }
  .ps-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ps-stats button { padding: 10px 12px; } .ps-stats b { font-size: 22px; }
  .ps-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); margin: 0; max-width: none; border-radius: 22px; padding: 6px; z-index: 50;
    box-shadow: 0 -2px 10px rgba(30,26,25,.04), 0 16px 40px -10px rgba(30,26,25,.45); }
  .ps-nav button { flex-direction: column; gap: 3px; padding: 8px 2px 7px; font-size: 10.5px; border-radius: 15px; }
  .ps-nav button .pi { width: 22px; height: 22px; }
  .ps-nav .ps-plus .pi { width: 26px; height: 26px; }
  .ps-nav .ps-plus:not(.active) { color: #fff; background: var(--grad); margin-top: -16px; box-shadow: 0 10px 20px -8px rgba(212,26,18,.8); border: 3px solid #fff; border-radius: 18px; }
  .ps-dot { top: 2px; right: 50%; margin-right: -22px; }
  .portal-wrap { padding: 16px 14px 120px; }
  .portal-card { padding: 16px; border-radius: 18px; }
  .ps-title h2 { font-size: 20px; }
  .ps-title .btn { display: none; }
  .ps-tiles { grid-template-columns: 1fr; }
  .dossier-grid { grid-template-columns: 1fr 1fr; }
  #ptoasts { bottom: 100px !important; }
}
@media (max-width: 380px) { .dossier-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ps-enter > * { animation: none; } .ps-stats button:hover, .ps-tile:hover { transform: none; } }

/* Pointage : carte aux couleurs Djolof (noir du logo, disque jaune) */
.pt-card { background: linear-gradient(150deg, #1E1A19, #3A2A26 70%, #5A2A18) !important; border-radius: 22px !important; box-shadow: 0 20px 40px -22px rgba(30,26,25,.8); }
.pt-b.in { background: linear-gradient(135deg, #FFBD00, #F29A00) !important; color: #1E1A19 !important; }
.pt-b:not(.in) { background: linear-gradient(135deg, #D41A12, #A8160F) !important; }

b.req { color: var(--rouge); font-weight: 800; }
.ps-logo { height: 52px; }
@media (max-width: 760px) { .ps-logo { height: 44px; } }

/* Circuit de validation (2.67.0) : demandes à signer par le Food Manager / Manager régional */
.ps-dot-r { background: var(--rouge) !important; color: #fff !important; }
.vl-card .vl-grid { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.vl-sigs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.vl-sigs > div { background: var(--fond); border-radius: 12px; padding: 8px 10px; max-width: 260px; }
.vl-sigs small { display: block; font-size: 11.5px; color: var(--gris); font-weight: 700; margin-bottom: 4px; }
.vl-sigs img { max-height: 54px; max-width: 220px; display: block; background: #fff; border-radius: 6px; }
.vl-sigs em { display: block; font-size: 12.5px; margin-top: 4px; color: #4A4240; }
.vl-act { margin-top: 12px; display: flex; justify-content: flex-end; }
.vl-sign { width: 100%; }
.vl-sign .sigpad canvas { height: 140px; }
@media (max-width: 760px) { .vl-act .btn-primary { width: 100%; justify-content: center; } }
