/* ============================================================
   OYVIA — Espace prestataire (portail terrain, mobile-first)
   Connexion + planning personnel. Préfixe .pr-
   ============================================================ */
.pr-body { background: var(--bg-subtle); min-height: 100vh; }

/* --- Connexion --- */
.pr-login { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: var(--sp-4); padding: var(--sp-6); position: relative; overflow: hidden; }
.pr-login::before { content: ""; position: absolute; top: -220px; left: 50%; transform: translateX(-50%); width: 900px; height: 600px; background: radial-gradient(ellipse at center, rgba(81,112,255,0.16), transparent 68%); pointer-events: none; }
.pr-login__card { position: relative; width: 100%; max-width: 404px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: var(--sp-8); }
.pr-brand { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.pr-brand__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-600); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.pr-brand__mark svg { width: 20px; height: 20px; }
.pr-login__card > .pr-brand { justify-content: center; }
.pr-login__card h1 { text-align: center; font-size: var(--fs-xl); margin-top: var(--sp-4); }
.pr-login__card > p { text-align: center; color: var(--c-text-soft); font-size: var(--fs-sm); margin-top: 4px; margin-bottom: var(--sp-6); }
.pr-login__form { display: flex; flex-direction: column; gap: var(--sp-4); }
.pr-note { text-align: center; font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: var(--sp-5); }
/* Le retour au site utilise .auth-back (components.css), commun aux 3 écrans de connexion */

/* --- Portail --- */
.pr-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.92); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.pr-user { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.pr-user__meta { text-align: right; min-width: 0; }
.pr-user__meta b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.pr-user__meta small { font-size: var(--fs-xs); color: var(--c-text-muted); }

.pr-main { max-width: 640px; margin-inline: auto; padding: var(--sp-5) var(--sp-4) var(--sp-16); }
.pr-hello b { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); }
.pr-hello span { display: block; color: var(--c-text-soft); font-size: var(--fs-sm); margin-top: 2px; }
.pr-stats { display: flex; gap: var(--sp-3); margin: var(--sp-5) 0; }
.pr-stat { flex: 1; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-sm); }
.pr-stat small { font-size: var(--fs-xs); color: var(--c-text-muted); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.pr-stat b { display: block; font-size: var(--fs-2xl); font-weight: var(--fw-bold); margin-top: 2px; font-variant-numeric: tabular-nums; }

.pr-filter { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.pr-chip { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-full); border: 1px solid var(--c-border); background: var(--c-surface); font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text-soft); cursor: pointer; transition: all var(--t-fast); }
.pr-chip:hover { color: var(--c-text); }
.pr-chip.is-active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.pr-day { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-transform: capitalize; margin: var(--sp-5) 0 var(--sp-2); color: var(--c-text-soft); }
.pr-day--today { color: var(--blue-600); }
.pr-task { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--sp-4); margin-bottom: var(--sp-3); }
.pr-task.is-done { border-color: var(--c-positive-soft); }
.pr-task__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.pr-task__time { font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.pr-task b { font-size: var(--fs-md); }
.pr-task__loc { font-size: var(--fs-sm); color: var(--c-text-soft); margin-top: 2px; }
.pr-task__access { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.pr-task__code { background: var(--bg-subtle); border: 1px solid var(--c-border); border-radius: var(--r-sm); padding: 5px var(--sp-2); font-size: var(--fs-xs); color: var(--c-text-soft); }
.pr-task__code b { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--c-text); }
.pr-task__foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-4); }
.pr-task__pay { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.pr-status { height: 38px; padding: 0 var(--sp-5); border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: var(--fw-semibold); border: 1px solid transparent; cursor: pointer; transition: filter var(--t-fast); }
.pr-status:hover { filter: brightness(0.97); }
.pr-status--a_faire { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.pr-status--en_cours { background: var(--blue-600); color: #fff; }
.pr-status--termine { background: var(--c-positive-soft); color: var(--c-positive-ink); }

/* Photos ajoutées après la fin de l'intervention */
.pr-photos { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--c-border); }
.pr-photos__label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wider); color: var(--c-text-muted); margin-bottom: var(--sp-2); }
.pr-photos__grid { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pr-photos__item { position: relative; width: 64px; height: 64px; border-radius: var(--r-md); overflow: hidden; flex-shrink: 0; }
.pr-photos__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-photos__del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: var(--r-full); background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center; border: 0; }
.pr-photos__del svg { width: 11px; height: 11px; }
.pr-photos__add { width: 64px; height: 64px; border: 1.5px dashed var(--c-border-strong); border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--c-text-soft); font-size: 10px; font-weight: var(--fw-medium); cursor: pointer; flex-shrink: 0; transition: border-color var(--t-fast), color var(--t-fast); }
.pr-photos__add:hover { border-color: var(--blue-600); color: var(--blue-600); }
.pr-photos__add svg { width: 18px; height: 18px; }
