/* Adaptation sans framework de frontend/auth.css du vercel-shared-auth-kit. */
.shared-auth-page {
  --shared-auth-blue: #0d6efd;
  --shared-auth-blue-hover: #075bd9;
  --shared-auth-text: #181818;
  --shared-auth-muted: #687083;
  --shared-auth-border: #d9dce3;
  --shared-auth-danger: #db2636;
  --shared-auth-heading: "Syne", Arial, sans-serif;
  --shared-auth-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff url("assets/login-bg.jpg") center / cover no-repeat;
  color: var(--shared-auth-text);
  font-family: var(--shared-auth-body);
}
.shared-auth-page::after { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: linear-gradient(90deg, #6ee5ff, #0d6efd, #b222ff, #ec2aa1); content: ""; }
.shared-auth-wordmark { position: absolute; top: 30px; left: 40px; color: var(--shared-auth-text); font-family: var(--shared-auth-heading); font-size: 34px; font-weight: 700; line-height: 1; }
.shared-auth-onepoint { position: absolute; right: 44px; bottom: 40px; z-index: 1; display: block; line-height: 0; opacity: 0.9; transition: opacity 180ms ease, transform 180ms ease; }
.shared-auth-onepoint:hover { opacity: 1; transform: translateY(-1px); }
.shared-auth-onepoint:focus-visible, .shared-auth-eye:focus-visible, .shared-auth-contact:focus-visible { outline: 2px solid var(--shared-auth-blue); outline-offset: 3px; }
.shared-auth-onepoint img { display: block; width: auto; height: 34px; }
.shared-auth-card { position: relative; z-index: 1; box-sizing: border-box; width: 480px; max-width: 92vw; padding: 44px 48px 40px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px -24px rgb(24 24 24 / 22%), 0 2px 8px rgb(24 24 24 / 5%); animation: shared-auth-card-in 600ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.shared-auth-title { margin: 0 0 8px; color: var(--shared-auth-text); font-family: var(--shared-auth-heading); font-size: 34px; font-weight: 700; line-height: 1.15; text-align: center; }
.shared-auth-subtitle { margin: 0 0 30px; color: var(--shared-auth-muted); font-size: 14px; line-height: 1.5; text-align: center; }
.shared-auth-form, .shared-auth-field { display: flex; flex-direction: column; }
.shared-auth-form { gap: 18px; }
.shared-auth-field { gap: 8px; }
.shared-auth-label { color: var(--shared-auth-text); font-size: 14px; font-weight: 600; }
.shared-auth-input-wrapper { position: relative; display: flex; align-items: center; }
.shared-auth-input { box-sizing: border-box; width: 100%; padding: 12px 44px 12px 14px; border: 1px solid var(--shared-auth-border); border-radius: 9px; outline: none; background: #fff; color: var(--shared-auth-text); font: inherit; font-size: 14px; }
.shared-auth-field:first-child .shared-auth-input { padding-right: 14px; }
.shared-auth-input:focus { border-color: var(--shared-auth-blue); }
.shared-auth-eye { position: absolute; right: 8px; display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--shared-auth-muted); cursor: pointer; }
.shared-auth-eye:hover { color: var(--shared-auth-text); }
.shared-auth-error { display: none; margin: -8px 0 0; color: var(--shared-auth-danger); font-size: 12px; line-height: 1.35; }
.shared-auth-error.visible { display: block; }
.shared-auth-submit { width: 100%; margin-top: 6px; padding: 14px 24px; border: 0; border-radius: 999px; background: var(--shared-auth-blue); color: #fff; cursor: pointer; font-family: var(--shared-auth-heading); font-size: 15px; font-weight: 700; }
.shared-auth-submit:hover { background: var(--shared-auth-blue-hover); box-shadow: 0 6px 20px rgb(13 110 253 / 30%); }
.shared-auth-submit:disabled { cursor: wait; opacity: 0.7; }
.shared-auth-or { display: flex; align-items: center; gap: 16px; margin: 24px 0 20px; color: var(--shared-auth-muted); font-size: 14px; }
.shared-auth-or::before, .shared-auth-or::after { flex: 1; height: 1px; background: #e3e5ea; content: ""; }
.shared-auth-help { margin: 0 0 16px; color: var(--shared-auth-text); font-size: 14px; text-align: center; }
.shared-auth-contact { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; padding: 13px 24px; border: 1.5px solid var(--shared-auth-text); border-radius: 999px; background: #fff; color: var(--shared-auth-text); font-family: var(--shared-auth-heading); font-size: 15px; font-weight: 700; text-decoration: none; }
.shared-auth-contact:hover { border-color: var(--shared-auth-blue); background: #eef5ff; color: var(--shared-auth-blue); }
@keyframes shared-auth-card-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .shared-auth-card { animation: none; } }
@media (max-width: 900px) { .shared-auth-page { background-position: 68% center; } }
@media (max-width: 560px) { .shared-auth-card { padding: 34px 26px 30px; } .shared-auth-wordmark { top: 20px; left: 22px; font-size: 28px; } .shared-auth-onepoint { right: 22px; bottom: 22px; } .shared-auth-onepoint img { height: 26px; } }

/* H106 — template Connexion Neo, sans modification de la session ou du formulaire. */
.shared-auth-page {--shared-auth-blue:var(--color-primary);--shared-auth-blue-hover:var(--blue-hover,var(--color-primary));--shared-auth-text:var(--text-1);--shared-auth-muted:var(--text-2);--shared-auth-border:var(--border);--shared-auth-danger:var(--tag-error-text);--shared-auth-heading:var(--font-heading);--shared-auth-body:var(--font-body);overflow-y:auto;box-sizing:border-box;padding:64px 24px 112px;background-color:var(--bg);}
.shared-auth-card {max-width:100%;background:var(--surface);flex-shrink:0;}
.shared-auth-input,.shared-auth-contact {background:var(--surface);}
.shared-auth-input {min-height:44px;}.shared-auth-eye {width:44px;height:44px;right:2px;}.shared-auth-input-wrapper .shared-auth-input {padding-right:52px;}
.shared-auth-or::before,.shared-auth-or::after {background:var(--border);}
.shared-auth-submit,.shared-auth-contact {min-height:48px;}
.shared-auth-submit {color:var(--color-white);}.shared-auth-contact:hover {background:var(--blue-light);}
.shared-auth-preferences {position:absolute;right:24px;top:24px;display:flex;gap:8px;z-index:2;}
.shared-auth-preferences .neo-language-toggle,.shared-auth-preferences .theme-toggle {display:inline-flex;align-items:center;justify-content:center;min-width:44px;width:44px;height:44px;padding:0;box-sizing:border-box;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--surface);color:var(--text-1);font:700 14px/1.5 var(--font-heading);cursor:pointer;}
.shared-auth-page :is(button,a,input):focus-visible {outline:2px solid var(--color-primary);outline-offset:3px;}
html[data-theme="dark"] .shared-auth-wordmark,html[data-theme="dark"] .shared-auth-onepoint img {filter:invert(1);}
@media(max-width:560px){.shared-auth-page{padding:88px 20px 96px}.shared-auth-preferences{right:16px;top:16px}}
@media(max-height:580px){.shared-auth-page{align-items:flex-start;padding-top:88px}.shared-auth-onepoint{position:fixed;bottom:14px;right:14px}}

html[data-theme="dark"] .shared-auth-wordmark {filter:none;}
html[data-theme="dark"] .shared-auth-page {background-image:linear-gradient(color-mix(in srgb,var(--bg) 78%,transparent),color-mix(in srgb,var(--bg) 78%,transparent)),url("assets/login-bg.jpg");}

/* Connexion EDF : composants partagés et mêmes rôles sémantiques que le workspace. */
html .edf-auth-page {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:24px;align-items:center;justify-items:center;justify-content:stretch;padding:24px 40px;min-height:100svh;background:var(--bg);background-image:none;overflow-y:auto;}
html[data-theme="dark"] .edf-auth-page {background:var(--bg);background-image:none;}
.edf-auth-page::after {height:3px;background:var(--gradient-line);}
.edf-auth-header {display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;min-width:0;}
.edf-auth-identity .edf-auth-client {box-sizing:border-box;width:108px;min-width:108px;height:48px;padding:8px 10px;flex:0 0 108px;}
html .edf-auth-page .edf-auth-client-logo {box-sizing:border-box!important;width:88px!important;height:32px!important;max-width:88px!important;max-height:32px!important;padding:0!important;border-radius:0!important;background:transparent!important;filter:none!important;content:normal!important;}
.edf-auth-identity {display:flex;align-items:center;gap:16px;min-width:0;}
.edf-auth-heading {display:flex;flex-direction:column;gap:2px;font:14px/1.35 var(--font-heading);color:var(--text-2);}
.edf-auth-heading strong {font-size:20px;color:var(--text-1);}
.edf-auth-page .shared-auth-preferences {position:static;flex-shrink:0;}
.edf-auth-page .shared-auth-card {width:min(440px,100%);min-width:0;max-width:100%;padding:32px;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-md,none);margin:0;}
.edf-auth-page .shared-auth-title {font-size:30px;line-height:1.2;}
.edf-auth-page .shared-auth-subtitle {margin-bottom:28px;}
.edf-auth-page .shared-auth-input {min-height:46px;}
.edf-auth-page .shared-auth-submit {background:var(--color-primary);color:var(--bg);}
.edf-auth-page .shared-auth-submit:hover {background:var(--blue-hover);box-shadow:none;}
.edf-auth-page .shared-auth-help {margin:24px 0 12px;color:var(--text-2);font-size:13px;}
.edf-auth-page .shared-auth-contact {min-height:44px;border:1px solid var(--border);font-size:14px;color:var(--color-primary);}
.edf-auth-page .shared-auth-error {font-size:14px;}
.edf-auth-footer {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 24px;width:100%;font-size:12px;line-height:1.5;color:var(--text-2);padding:4px 0 8px;}
.edf-auth-footer a {display:flex;align-items:center;gap:8px;color:var(--text-2);text-decoration:none;min-height:32px;}
.edf-auth-footer a:hover {color:var(--color-primary);text-decoration:underline;}
.edf-auth-neo {display:flex;align-items:center;justify-content:center;width:72px;height:28px;background:transparent;}
.edf-auth-neo img {display:block;width:64px;height:20px;object-fit:contain;filter:none;}
@media(max-width:560px){html .edf-auth-page{padding:16px;gap:24px}.edf-auth-header{gap:8px}.edf-auth-identity{gap:8px}.edf-auth-heading{font-size:12px}.edf-auth-heading strong{font-size:16px}.edf-auth-page .shared-auth-card{padding:26px 22px}.edf-auth-page .shared-auth-preferences{gap:4px}.edf-auth-page .shared-auth-title{font-size:28px}}
@media(max-width:360px){.edf-auth-identity{gap:6px}.edf-auth-heading{max-width:84px}.edf-auth-page .shared-auth-preferences .neo-language-toggle,.edf-auth-page .shared-auth-preferences .theme-toggle{width:40px;min-width:40px}}
@media(max-width:560px){.edf-auth-identity .edf-auth-client{width:88px;min-width:88px;flex-basis:88px}html .edf-auth-page .edf-auth-client-logo{width:68px!important;max-width:68px!important}}
html[data-theme="dark"] .edf-auth-page .edf-auth-client-logo {content:url("assets/edf/logo-edf-white.svg")!important;}
html[data-theme="dark"] .edf-auth-neo img {content:url("assets/brand/neo-white.png");}

.edf-auth-page #login-form[hidden] { display: none; }
.edf-auth-page .shared-auth-card:has(#edf-startup-status:not([hidden])) { animation: none; }


.edf-skeleton-shape { display:block; border-radius:var(--radius-sm, 6px); background:color-mix(in srgb, var(--text-1) 10%, var(--surface)); }
.edf-startup-skeleton { display: grid; gap: 12px; margin-bottom: 24px; }
.edf-skeleton-tiles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.edf-skeleton-panel { height: 46px; }
.edf-skeleton-title { width: 62%; height: 16px; }
.edf-skeleton-line { width: 84%; height: 12px; }
.edf-skeleton-folder { width: min(40%, 120px); aspect-ratio: 459 / 363; border-radius: var(--radius-md); }
.edf-skeleton-meta { width: 100%; height: 34px; }
.edf-project-skeleton { pointer-events: none; }
.edf-project-loading-status:not([hidden]) { margin: 12px 36px 0; color: var(--text-2); }
@media (max-width: 600px) { .edf-project-loading-status { margin-inline: 20px; } }

#app-shell[data-edf-startup] > :not(.sidebar, .main-content, .edf-startup-announcement),
#app-shell[data-edf-startup] .main-content > .view:not(.edf-previewing) { display: none; }
#app-shell[data-edf-startup] .main-content > .edf-previewing { display: block; }
#app-shell[data-edf-startup] #view-projects.edf-previewing { display: flex; flex-direction: column; min-height: 100vh; }
#app-shell[data-edf-startup] .sidebar-item.active:not([aria-current]) { background: transparent; color: var(--text-2); }
#app-shell[data-edf-startup] .sidebar-item[aria-current="page"] { background: var(--blue-50); color: var(--color-primary); }
#app-shell[data-edf-startup] :is(.user-session, .workflow-canvas-wrapper) { display: none; }
.edf-startup-announcement, #projects-list-view:has(.edf-project-skeleton) .edf-project-loading-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.edf-startup-side-search { min-height: 45px; }
.edf-startup-header .neo-header-actions { display: flex; align-items: center; gap: 12px; }
.edf-header-control { width: 40px; height: 40px; border-radius: 50%; }
.edf-header-contact { width: 140px; height: 44px; border-radius: 999px; }
html[data-theme="dark"] .edf-startup-header .neo-header-wordmark img { content: url("assets/edf/logo-edf-white.svg"); }
.edf-view-skeleton { display: grid; align-content: start; gap: 12px; pointer-events: none; animation: none; }
.edf-view-skeleton-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.edf-skeleton-icon { width: 42px; height: 42px; border-radius: 12px; }
.edf-skeleton-badge { width: 56px; height: 12px; }
.edf-skeleton-footer { width: 35%; height: 14px; margin-top: 5px; }
.edf-view-skeleton.agent-card { min-height: 207px; grid-template-columns: minmax(0, 1fr); }
.edf-view-skeleton.workflow-template-card { min-height: 295px; }
.edf-view-skeleton.workflow-template-card .edf-skeleton-icon,
.edf-view-skeleton.pil-stat-card .edf-view-skeleton-head,
.edf-view-skeleton.pil-stat-card .edf-skeleton-footer { display: none; }
.edf-loading-chip { max-width: 100%; height: 44px; border-radius: 999px; background: color-mix(in srgb, var(--text-1) 10%, var(--surface)); }
.edf-loading-chip > * { display: none; }
@media (max-width: 600px) { .edf-header-contact { width: 90px; } }

.edf-view-skeleton.home-stat { min-height: 140px; }
.edf-view-skeleton.home-stat .edf-skeleton-shape { background: rgb(255 255 255 / .20); }
.edf-view-skeleton.home-stat .edf-skeleton-icon { width: 36px; height: 36px; }
.edf-view-skeleton.home-stat .edf-skeleton-title { width: 42px; height: 28px; }
.edf-view-skeleton.home-stat .edf-skeleton-line { width: 72px; }
.edf-view-skeleton.home-stat :is(.edf-skeleton-badge, .edf-skeleton-footer) { display: none; }
[data-edf-home-workflows] .edf-view-skeleton { min-height: 248px; }
[data-edf-home-workflows] .edf-view-skeleton-head { display: none; }

.edf-project-skeleton .project-card-title { min-height: 25px; }
.edf-view-skeleton.agent-card .edf-skeleton-icon { border-radius: 50%; }
.edf-view-skeleton.workflow-template-card .edf-view-skeleton-head { justify-content: flex-end; }
.edf-view-skeleton.workflow-template-card .edf-skeleton-footer { width: 80%; height: 80px; border-radius: 0; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--text-1) 10%, var(--surface)) 0 18px, transparent 18px 26px); }
@media (max-width: 600px) {
  [data-edf-home-workflows] .edf-view-skeleton { min-height: 350px; }
  .edf-view-skeleton.workflow-template-card { min-height: 262px; }
}

.edf-welcome-dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text-1); box-shadow: var(--shadow-2); }
.edf-welcome-dialog::backdrop { background: rgb(8 22 48 / .54); }
.edf-welcome-dialog h2 { margin: 0 0 14px; }
.edf-welcome-dialog p { color: var(--text-2); }
.edf-welcome-position:empty { display: none; }
.edf-welcome-position { font-size: .85rem; margin-bottom: 8px; }
.edf-welcome-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 28px; }

.edf-welcome-offer {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  margin: auto;
  width: min(560px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100dvh - 32px);
}
.edf-welcome-offer .edf-welcome-actions { justify-content: flex-start; }
.home-hero #home-greeting { white-space: normal; }
#app-shell .ai-panel.open {
  top: calc(var(--edf-copilot-top, 97px) + 14px);
  height: auto;
  max-height: none;
}
#app-shell #ai-panel-backdrop { top: var(--edf-copilot-top, 97px); }
@media (max-width: 520px) {
  .edf-welcome-offer .edf-welcome-actions > button { width: 100%; }
}
