/*
 * Projunior — Base : typographie, fond, liens, focus, mise en page de contenu.
 */

body {
    font-family: var(--pj-font);
    font-size: var(--pj-text-base);
    line-height: var(--pj-lh);
    color: var(--pj-ink);
    background-color: var(--pj-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Titres --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--pj-font);
    color: var(--pj-ink);
    line-height: var(--pj-lh-tight);
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1, .h1 { font-size: var(--pj-text-2xl); font-weight: 700; }
h2, .h2 { font-size: var(--pj-text-xl); }
h3, .h3 { font-size: var(--pj-text-lg); }
h4, .h4 { font-size: var(--pj-text-md); }

/* Chiffres tabulaires partout où l'on compte / facture */
table, .pj-num, .pj-stat__value, .pj-money {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.pj-money, .pj-ref {
    font-family: var(--pj-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ---- Liens ---------------------------------------------------------- */
a {
    color: var(--pj-blue-700);
    text-decoration: none;
    transition: color var(--pj-dur) var(--pj-ease);
}

a:hover {
    color: var(--pj-blue-800);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

/* ---- Focus visible : anneau marigold cohérent ----------------------- */
:focus-visible {
    outline: 2px solid var(--pj-orange);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ---- Lien d'évitement (accessibilité) ------------------------------- */
.pj-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1080;
    background: var(--pj-navy);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 var(--pj-radius) 0;
    font-weight: 500;
}

.pj-skip:focus {
    left: 0;
    color: #fff;
    text-decoration: none;
}

/* ---- Séparateurs / texte discret ------------------------------------ */
hr { border-color: var(--pj-line); opacity: 1; }
.text-muted, small.text-muted { color: var(--pj-slate) !important; }

/* ==================================================================== */
/* Écran d'authentification (login, mot de passe, invitation)           */
/* — rendu hors app-shell, centré sur un fond calcaire.                 */
/* ==================================================================== */
.pj-auth {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: var(--pj-space-5);
    background:
        radial-gradient(1200px 500px at 50% -10%, var(--pj-orange-50), transparent 60%),
        var(--pj-canvas);
}

.pj-auth__card {
    width: 100%;
    max-width: 420px;
    background: var(--pj-surface);
    border: 1px solid var(--pj-line);
    border-radius: var(--pj-radius-lg);
    box-shadow: var(--pj-shadow);
    padding: var(--pj-space-6);
}

.pj-auth__brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: var(--pj-space-5);
}

.pj-auth__card h1 {
    font-size: var(--pj-text-xl);
    margin-bottom: var(--pj-space-4);
}

/* ---- Marque (point marigold + mot-symbole) -------------------------- */
.pj-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pj-ink);
}

.pj-brand__mark {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 8px;
    background: var(--pj-orange);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    flex: none;
}

.pj-brand__name { line-height: 1.05; }
.pj-brand__name small {
    display: block;
    font-size: var(--pj-text-xs);
    font-weight: 400;
    color: var(--pj-slate);
    letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
