/* =====================================================================
   Provencelia Pro — « Projects » : pages de connexion / mot de passe
   Panneau de marque (vert de la charte) + carte formulaire. Aucune dépendance externe.
   ===================================================================== */

:root {




    --bg:          #f4f5f4;
    --ink:         #1f2421;
    --text:        #333;
    --muted:       #6b7280;
    --border:      #d1d5db;
    --danger:      #b42318;
    --ok:          #15803d;
    --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
body { font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }

/* Panneau de marque */
.auth-brand {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1200px 600px at -10% 110%, rgba(140,190,160,.30), transparent 60%),
        radial-gradient(800px 500px at 110% -10%, rgba(255,255,255,.08), transparent 60%),
        linear-gradient(160deg, var(--green-light) 0%, var(--green) 45%, var(--green-dark) 100%);
    padding: 56px 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-logo { width: 180px; height: auto; display: block; }
.auth-product { font-size: 44px; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; }
.auth-product::after { content: ""; display: block; width: 56px; height: 3px; background: var(--green-xlight); border-radius: 2px; margin-top: 16px; }
.auth-tagline { margin-top: 18px; font-size: 17px; line-height: 1.5; max-width: 30ch; color: rgba(255,255,255,.88); }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; color: rgba(255,255,255,.9); }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; }
.auth-points li::before {
    content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--green-xlight)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23264030' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Zone formulaire */
.auth-main { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 24px 32px; }
.auth-lang { position: absolute; top: 20px; right: 24px; }
.auth-lang select { height: 34px; padding: 0 30px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.auth-lang select:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-card {
    width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 36px 34px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 24px 48px -24px rgba(31,36,33,.25); border: 1px solid #e6e8e6;
}
.auth-logo-mobile { display: none; width: 140px; height: auto; margin-bottom: 22px; }
.auth-card h1 { font-size: 24px; line-height: 1.25; color: var(--ink); }
.auth-sub { margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.auth-notice { margin-top: 18px; padding: 11px 13px; border-radius: 10px; font-size: 14px; line-height: 1.45; }
.auth-notice-error { background: #fdecea; color: var(--danger); border: 1px solid #f6c9c4; }
.auth-notice-ok { background: #e7f6ec; color: var(--ok); border: 1px solid #bfe3cb; }

.auth-form { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input {
    width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.pwd { position: relative; display: block; }
.pwd input { padding-right: 46px; }
.pwd-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.pwd-toggle:hover { color: var(--ink); background: #f3f4f3; }
.pwd-toggle svg { width: 19px; height: 19px; }
.pwd-toggle .eye-closed, .pwd-toggle.is-on .eye-open { display: none; }
.pwd-toggle.is-on .eye-closed { display: block; }

.pwd-rules { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--muted); margin-top: -4px; }
.pwd-rules li, .pwd-match { display: flex; gap: 7px; align-items: center; }
.pwd-rules li::before, .pwd-match:not(:empty)::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); }
.pwd-rules li.is-ok { color: var(--ok); }
.pwd-rules li.is-ok::before, .pwd-match.is-ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 9px no-repeat; }
.pwd-match { font-size: 13px; margin-top: -6px; min-height: 18px; color: var(--danger); }
.pwd-match.is-ok { color: var(--ok); }
.pwd-match:not(.is-ok):not(:empty)::before { border-color: var(--danger); }

.auth-btn {
    height: 48px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background .15s ease; margin-top: 4px;
}
.auth-btn:hover { background: var(--green-light); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-link { display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--green); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-foot { margin-top: 28px; font-size: 12.5px; color: var(--muted); }

.auth-single { grid-template-columns: 1fr; }
.auth-single .auth-logo-mobile { display: block; }

@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-logo-mobile { display: block; }
    .auth-main { justify-content: flex-start; padding-top: 76px; }
    .auth-card { padding: 28px 22px; }
}
@media (max-width: 420px) {
    .pwd-rules { grid-template-columns: 1fr; }
}
@media (pointer: coarse) {
    .field input { font-size: 16px; }
}
