.tc-auth-passkey-box { padding:16px 18px; margin:0 0 20px; border:1px solid #d5e3de; border-radius:8px; background:#f4faf7; }
.tc-auth-passkey-box p { margin:12px 0 0; color:#555; text-align:center; font-size:13px; }
.tc-auth-passkey-button { width:100%; font-size:15px; }
.tc-auth-passkey-box[hidden] { display:none !important; }
.tc-auth-passkey-box[data-tc-passkey-position] { margin-top:16px; }
.tc-auth-passkey-box[data-tc-passkey-position]:first-child { margin-top:0; }
.tc-auth-secondary { padding:10px 16px; border:1px solid currentColor; border-radius:5px; background:transparent; color:inherit; font-weight:600; cursor:pointer; }
.tc-auth-secondary:hover { text-decoration:underline; }
.tc-auth-primary { display:inline-block; padding:11px 18px; border:0; border-radius:5px; background:#17613c; color:white; font-weight:600; cursor:pointer; }
.tc-auth-primary:hover { background:#10482c; color:white; }
.tc-auth-primary:disabled { opacity:.55; cursor:wait; }
.tc-auth-panel button:not(.tc-auth-primary),.tc-auth-profile button:not(.tc-auth-primary) { cursor:pointer; padding:8px 12px; }
.tc-auth-alert { margin-top:8px; font-size:13px; }
.tc-auth-error { color:#a01a1a; background:#fff3f3; border-left:3px solid #b91c1c; padding:9px 12px; margin:8px 0; }
.tc-auth-ok { color:#16603b; margin:12px 0; }
.tc-auth-profile { max-width:760px; padding:20px 22px; background:#fff; border:1px solid #ddd; border-radius:8px; margin:24px 0; box-sizing:border-box; }
.tc-auth-profile h2 { margin-top:0; }
.tc-auth-profile input[type="text"] { max-width:100%; padding:7px; }
.tc-auth-profile label { display:block; margin:10px 0; }
.tc-auth-profile .tc-auth-field { border-top:1px solid #e3e5e3; padding:16px 0; }
.tc-auth-profile code { overflow-wrap:anywhere; line-height:2; }
.tc-auth-keys { list-style:none; padding:0; }
.tc-auth-keys li { display:flex; gap:10px; justify-content:space-between; padding:8px 0; border-bottom:1px solid #eee; align-items:center; }
body.tc-auth-standalone { margin:0; background:#f3f6f5; font-family:system-ui,-apple-system,sans-serif; color:#222; }
.tc-auth-panel { box-sizing:border-box; margin:6vh auto; padding:30px; max-width:480px; border-radius:12px; background:white; box-shadow:0 5px 35px #0001; }
.tc-auth-panel h1 { font-size:24px; }
.tc-auth-panel label:not(.tc-inline) { display:block; font-weight:600; margin:10px 0 5px; }
.tc-auth-panel input:not([type="checkbox"]) { box-sizing:border-box; width:100%; font-size:19px; padding:10px; border:1px solid #bbb; border-radius:5px; }
.tc-auth-panel button { font-size:15px; width:100%; padding:11px !important; margin-top:9px; border-radius:6px; }
.tc-auth-panel .tc-auth-field { padding:10px 0; border-bottom:1px solid #eee; }
.tc-auth-panel .tc-inline { display:flex; align-items:start; gap:7px; font-size:13px; margin:10px 0; }

.tc-auth-passkey-box .tc-auth-device-option {
  display:flex; align-items:flex-start; gap:9px; padding:10px 12px;
  margin:10px 0; border:1px solid #a8a8a8; border-radius:4px;
  background:#fff; color:#222; -webkit-text-fill-color:#222;
  font-size:14px; font-weight:400; line-height:1.5; text-align:left;
}
.tc-auth-passkey-box .tc-auth-device-option input[type="checkbox"] {
  flex:0 0 20px; width:20px; height:20px; margin:1px 0 0;
  appearance:auto; -webkit-appearance:checkbox; color-scheme:light;
  accent-color:#17613c; cursor:pointer;
}

/* Rappel de sécurité sur la première page après connexion (front-office). */
.tc-auth-post-login { box-sizing:border-box; position:fixed; z-index:99999; bottom:20px; right:20px;
  width:min(440px,calc(100vw - 32px)); padding:16px 18px; background:#fff;
  border:1px solid #ddd; border-left:5px solid #2271b1; border-radius:7px;
  box-shadow:0 5px 24px rgba(0,0,0,.18); font:14px/1.5 system-ui,-apple-system,sans-serif;
  color:#252525; text-align:left; }
.tc-auth-post-login-warning { border-left-color:#dba617; }
.tc-auth-post-login p { margin:0 0 10px; }
.tc-auth-post-login p:last-child { margin-bottom:0; }
.tc-auth-post-login a { color:#17613c; font-weight:700; text-decoration:underline; }
@media (max-width:600px) { .tc-auth-post-login { right:16px; bottom:16px; } }

/* TOTP QR code is rendered locally in a canvas; no secret is sent to a remote service. */
#tc-auth-qr-wrapper { display:flex; justify-content:center; max-width:100%; padding:14px; margin:12px 0; background:#fff; border:1px solid #e4e4e4; }
#tc-auth-qr { max-width:100%; height:auto; image-rendering:pixelated; }
.tc-auth-backup-output { margin-top:14px; background:#f8fbf8; border:1px solid #d6e4d9; border-radius:6px; padding:14px; }
.tc-auth-backup-output pre { white-space:pre-wrap; font:600 16px/1.85 ui-monospace,SFMono-Regular,Consolas,monospace; letter-spacing:0.05em; user-select:all; overflow-wrap:anywhere; }
.tc-auth-backup-output button { margin:0 10px 8px 0; }

/* Optional second factor appears INSIDE the original login form, only when needed. */
.tc-auth-login-challenge[hidden], .tc-auth-login-challenge [hidden] { display:none !important; }
.tc-auth-login-challenge { box-sizing:border-box; clear:both; margin:16px 0; padding:16px;
  border:1px solid #c8ddcd; border-radius:7px; background:#f5faf6; }
.tc-auth-login-challenge h3 { font-size:17px; margin:0 0 8px; }
.tc-auth-login-challenge p { margin:8px 0; }
.tc-auth-login-challenge label:not(.tc-auth-trust-option) { display:block; margin:10px 0; font-weight:600; }
.tc-auth-login-challenge select, .tc-auth-login-challenge input.tc-auth-challenge-code {
  display:block; box-sizing:border-box; width:100%; max-width:100%; margin:6px 0; padding:9px;
  border:1px solid #aaa; border-radius:4px; font:inherit; }
.tc-auth-login-challenge .tc-auth-trust-option { display:flex; align-items:flex-start;
  gap:7px; font-size:13px; margin:14px 0 10px; line-height:1.4; }
.tc-auth-login-challenge .tc-auth-trust-option input { margin:2px 0 0; flex:0 0 auto; }
.tc-auth-login-challenge button { margin:4px 5px 6px 0; padding:9px 12px; cursor:pointer; }
.tc-auth-login-challenge button:disabled { opacity:.6; cursor:wait; }
.tc-auth-inline-status { font-size:13px; }
.tc-auth-login-error { font-size:13px; margin:9px 0; }


/* Page de connexion Tracool : un seul panneau, passkey prioritaire, puis mot de passe / 2FA. */
.tc-connexion-page { max-width:420px; margin:0 auto 32px; padding:0 15px; color:inherit; box-sizing:content-box; font-size:15px; line-height:1.5; }
.tc-connexion-page * {box-sizing:border-box;}
.tc-connexion-intro, .tc-connexion-instructions {text-align:center; margin:0 0 12px;}
.tc-connexion-instructions {margin:12px 0 16px;}
.tc-connexion-instructions a, .tc-connexion-forgot a, .tc-connexion-access a {color:inherit; text-decoration:underline;}
.tc-connexion-heading {font-size:17px; font-weight:600; margin:0 0 10px;}
.tc-connexion-card {padding:20px; background:white; border:1px solid #dedede; border-radius:6px;}
.tc-connexion-card .tc-auth-passkey-box {padding:0; border:0; background:transparent; margin:0 0 17px;}
.tc-connexion-card .tc-auth-passkey-box p {font-size:14px; margin:18px 0 10px;}
.tc-connexion-card .tc-auth-passkey-button {font-size:15px;}
.tc-connexion-form > label {display:block; margin:10px 0 5px; font-weight:500;}
.tc-connexion-form > input:not([type=hidden]) {width:100%; padding:11px 12px; background:#fff; border:1px solid #bababa; border-radius:4px; font:inherit;}
.tc-connexion-form .tc-connexion-actions {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-top:18px;}
.tc-connexion-actions label {display:flex; align-items:center; gap:6px; font-size:13px;}
.tc-connexion-forgot {margin:23px 0 0;}
.tc-connexion-access {text-align:center; margin-top:25px;}
.tc-connexion-card .tc-auth-passkey-box[data-tc-passkey-position] {margin-top:16px;}
.tc-connexion-card .tc-auth-passkey-box[data-tc-passkey-position]:first-child {margin-top:0;}
.tc-connexion-card + .tc-connexion-registration {
  border-top:1px solid var(--tcp-line,#dedede); padding-top:16px; margin-top:16px;
}
.tc-connexion-signup-first > .tc-connexion-registration {margin-bottom:16px;}
.tc-connexion-registration > summary {
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  min-height:46px; padding:10px 16px; border-radius:5px;
  background:#c49b6c; color:#101e23; font-weight:700; text-align:center; cursor:pointer;
  list-style:none;
}
.tc-connexion-registration > summary::-webkit-details-marker {display:none;}
.tc-connexion-registration > summary::before {content:"";}
.tc-connexion-registration > summary::after {
  content:""; justify-self:end; width:8px; height:8px;
  border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(-45deg);
}
.tc-connexion-registration[open] > summary::after {transform:rotate(45deg);}
.tc-connexion-registration[open] > form,
.tc-connexion-registration > .tc-auth-error {margin-top:12px;}
.tc-connexion-registration > form {
  padding:16px; border:1px solid var(--tcp-line,#dedede); border-radius:6px;
  background:var(--tcp-surface,transparent);
}
.tc-connexion-password-hint {font-size:13px; font-weight:400;}
@media(max-width:500px) {.tc-connexion-card{padding:16px;}}

/* Theme colours follow the actual site, independently of the OS colour preference. */
.tc-connexion-autonomous-page {max-width:960px; margin:8px auto 32px; padding:0 1rem;}
.tc-connexion-page, body:not(.wp-admin) .tc-auth-profile {color:var(--tcp-ink,inherit);}
.tc-connexion-card, body:not(.wp-admin) .tc-auth-profile {
  color:inherit; background:var(--tcp-surface,transparent); border-color:var(--tcp-line,currentColor);
}
.tc-connexion-page .tc-auth-passkey-box p, body:not(.wp-admin) .tc-auth-profile p {color:inherit;}
.tc-connexion-page .tc-connexion-heading {color:inherit;}
.tc-connexion-page .tc-auth-login-challenge {
  color:inherit; background:var(--tcp-raised,transparent); border-color:var(--tcp-line,currentColor);
}
.tc-connexion-page .tc-auth-primary, body:not(.wp-admin) .tc-auth-profile .tc-auth-primary {
  background:var(--tcp-button,#17613c); color:var(--tcp-button-ink,#fff);
}
.tc-connexion-page .tc-auth-primary:hover, body:not(.wp-admin) .tc-auth-profile .tc-auth-primary:hover {filter:brightness(.9);}
.tc-connexion-signup-first .tc-connexion-signin .tc-connexion-actions > button.tc-auth-primary {
  border:1px solid #a4774d; background:transparent; color:inherit;
}
.tc-connexion-registration > summary:hover {filter:brightness(.94);}
/* Light input surfaces and dark text stay readable under a dark theme. */
body .tc-connexion-page input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
body .tc-connexion-page select,
body .tc-auth-profile input:not([type=hidden]):not([type=checkbox]):not([type=radio]),
body .tc-auth-profile select,
body .tc-auth-panel input:not([type=hidden]):not([type=checkbox]):not([type=radio]) {
  background:#fff !important; color:#222 !important; -webkit-text-fill-color:#222;
  border:1px solid #a8a8a8; color-scheme:light; caret-color:#222;
}
.tc-connexion-page input::placeholder, .tc-auth-profile input::placeholder {color:#626262; opacity:1;}
.tc-connexion-page input:focus-visible, .tc-connexion-page select:focus-visible,
.tc-connexion-page button:focus-visible, .tc-connexion-page a:focus-visible,
.tc-connexion-page summary:focus-visible {
  outline:2px solid var(--tcp-accent,#17613c); outline-offset:3px;
}
