/* Espace client — compte */

/* Écrans d'accès : connexion, création de compte, vérification, back-office, nouveau mot de passe.
   Formulaire à gauche, panneau illustré à droite ; le panneau disparaît sur petit écran. */
.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);background:#fff}
.auth-shell [hidden],.auth-shell[hidden]{display:none!important}
.auth-side{display:flex;flex-direction:column;min-height:100vh;padding:28px clamp(24px,5vw,64px) 24px}
.auth-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.auth-logo{display:block;width:146px;height:auto}
.auth-back{color:#606779;font-size:14px!important;font-weight:500}
.auth-back:hover{color:#061844}
.auth-main{flex:1;width:100%;max-width:420px;margin:0 auto;display:flex;flex-direction:column;justify-content:center;padding:22px 0}
.auth-intro{text-align:center;margin-bottom:20px}
.auth-intro .eyebrow{display:block;margin-bottom:10px;color:#80612b;letter-spacing:.16em}
.auth-shell h1,.auth-shell h2{margin:0 0 10px;color:#061844;font-size:36px!important;line-height:1.12!important}
.auth-intro p{margin:0 auto;max-width:370px;color:#606779;font-size:15px!important;line-height:1.55!important}
.auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:5px;margin-bottom:18px;background:#f5f0e6;border-radius:999px}
.auth-switch button{padding:11px 12px;border-radius:999px;background:transparent;color:#606779;font-size:14px!important;transition:background .2s,color .2s,box-shadow .2s}
.auth-switch button[aria-selected=true]{background:#fff;color:#061844;box-shadow:0 4px 14px #0618441a}
.auth-form{gap:12px}
.auth-form .account-field{gap:6px}
.auth-form .account-field>label{padding-left:18px;color:#39445a;font-size:13px!important}
.auth-form .account-field input{height:48px;padding:0 22px;border:1px solid #d9cbaa;border-radius:999px;background:#fff;transition:border-color .2s,box-shadow .2s}
.auth-form .account-field input::placeholder{color:#9aa1b0}
.auth-form .account-field input:focus-visible{outline:none;border-color:#C9A55A;box-shadow:0 0 0 4px #c9a55a33}
.auth-form .account-row{gap:12px}
.auth-password{position:relative}
.auth-form .auth-password input{padding-right:54px}
.auth-eye{position:absolute;top:50%;right:7px;width:38px;height:38px;padding:0;display:grid;place-items:center;border-radius:50%;background:transparent;color:#606779;transform:translateY(-50%)}
.auth-eye:hover{background:#f5f0e6;color:#061844}
.auth-eye svg{width:20px;height:20px}
.auth-eye[aria-pressed=true] .auth-eye-open,.auth-eye[aria-pressed=false] .auth-eye-off{display:none}
.auth-link{padding:0;border-radius:0;background:none;color:#80612b;font-size:14px!important;cursor:pointer}
.auth-link:hover{background:none;color:#061844;text-decoration:underline}
.auth-forgot-link{align-self:flex-end;margin-top:-2px}
.auth-center-link{align-self:center}
.auth-shell .auth-submit{width:100%;height:50px;margin-top:6px;padding:0 24px;justify-content:center;border-radius:999px;background:#061844;color:#fff;font-size:15px!important;transition:background .2s,box-shadow .2s,transform .2s}
.auth-shell .auth-submit:hover{background:#0d2a66;box-shadow:0 10px 24px #06184433;transform:translateY(-1px)}
.auth-shell .auth-submit[disabled]{opacity:.6;pointer-events:none}
.auth-form .consent-note{margin:0;text-align:center;font-size:13px!important}
.auth-shell .account-status{margin:0;text-align:center}
.auth-shell .account-status:empty{min-height:0}
.auth-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 24px;margin-top:22px}
.auth-foot{margin:0;text-align:center;color:#606779;font-size:14px!important}
.auth-foot a{color:#80612b;font-weight:600}

/* Panneau illustré : scène DUNYA, cartes flottantes qui rappellent l'application, légende. */
.auth-showcase{position:relative;display:flex;flex-direction:column;justify-content:center;min-height:calc(100vh - 32px);margin:16px 16px 16px 0;padding:44px 40px 36px;border-radius:32px;background:radial-gradient(circle at 18% 12%,#fcf9f2 0,#fcf9f200 42%),#f3ead6;overflow:hidden}
.auth-slides{position:relative;display:grid;flex:1;align-items:center}
.auth-slide{grid-area:1/1;margin:0;display:flex;flex-direction:column;align-items:center;gap:30px;opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease;pointer-events:none}
.auth-slide.is-active{opacity:1;transform:none;pointer-events:auto}
.auth-visual{position:relative;width:min(100%,540px)}
.auth-visual>img{display:block;width:100%;height:auto;max-height:58vh;object-fit:contain;mix-blend-mode:multiply}
.auth-bubble{position:absolute;width:72px;height:72px;display:grid;place-items:center;border:1px solid #e7dfce;border-radius:50%;background:#fff;box-shadow:0 12px 30px #06184418;animation:auth-float 6s ease-in-out infinite}
.auth-bubble img{width:42px;height:42px}
.auth-bubble-a{top:2%;left:0}
.auth-bubble-b{top:34%;right:-2%;animation-delay:-3s}
.auth-card{position:absolute;left:-3%;bottom:4%;display:flex;align-items:center;gap:14px;min-width:230px;padding:14px 18px 14px 14px;border:1px solid #e7dfce;border-radius:20px;background:#fff;box-shadow:0 18px 40px #0618441f;text-align:left;animation:auth-float 7s ease-in-out infinite -1.5s}
.auth-card strong{display:block;color:#061844;font-size:15px!important}
.auth-card small{display:block;margin-top:2px;color:#606779;font-size:13px!important}
.auth-chip{display:inline-block;margin-top:8px;padding:3px 10px;border:1px solid #d9cbaa;border-radius:999px;color:#80612b;font-size:12px!important;font-weight:600}
.auth-ring{--value:0;flex:none;width:58px;height:58px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(#C9A55A calc(var(--value) * 1%),#efe6d2 0)}
.auth-ring b{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#061844;font-size:12px!important}
.auth-card-icon{flex:none;width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#061844;color:#fff}
.auth-card-icon svg{width:22px;height:22px}
.auth-card-icon.is-success{background:#e5f0e8;color:#2f6b46}
.auth-slide figcaption{max-width:440px;margin:0;text-align:center;color:#061844;font-size:26px!important;line-height:1.3!important}
.auth-dots{display:flex;justify-content:center;gap:8px;margin-top:22px}
.auth-dots button{width:8px;height:8px;padding:0;border-radius:999px;background:#d9cbaa;transition:width .3s,background .3s}
.auth-dots button[aria-current=true]{width:28px;background:#061844}
.auth-showcase-navy{justify-content:flex-end;padding:0;background:#0b1d4f}
.auth-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%}
.auth-showcase-caption{position:relative;margin:0;padding:140px 48px 44px;background:linear-gradient(#06184400,#061844 60%);color:#fff;font-size:26px!important;line-height:1.3!important}
.auth-showcase-caption strong{color:#e4c988}
@keyframes auth-float{0%,100%{translate:0 0}50%{translate:0 -8px}}
@media(prefers-reduced-motion:reduce){.auth-bubble,.auth-card{animation:none}.auth-slide{transition:none}}
@media(max-width:1180px){.auth-card{left:0;min-width:0}.auth-bubble{width:60px;height:60px}.auth-bubble img{width:34px;height:34px}.auth-slide figcaption{font-size:22px!important}}
@media(max-width:960px){.auth-shell{grid-template-columns:1fr}.auth-showcase{display:none}.auth-side{padding:22px 22px 24px}}
@media(max-width:520px){.auth-shell h1,.auth-shell h2{font-size:30px!important}.auth-form .account-row{grid-template-columns:1fr}.auth-main{padding:28px 0}}

/* Cartes et panneaux de l'application */

.account-card{background:#fff;border:1px solid #e7dfce;border-radius:24px;box-shadow:0 20px 50px #06184412;overflow:hidden}

.account-panel{padding:36px}
.account-form{display:flex;flex-direction:column;gap:18px}
.account-field{display:flex;flex-direction:column;gap:8px}
.account-field>label{display:flex;flex-direction:column;gap:8px}
.account-field input,.account-field select,.account-field textarea{border:1px solid #d9cbaa;border-radius:12px;padding:13px 16px;background:#fff;width:100%}
.account-field input[type=file]{border:1px dashed #d9cbaa;padding:11px 14px}
.account-field small{color:#606779}
.account-field input:focus-visible,.account-field select:focus-visible,.account-field textarea:focus-visible{outline:2px solid #C9A55A;outline-offset:2px}
.account-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.account-form .pill{margin-top:6px;justify-content:center}
.account-form .pill[disabled]{opacity:.6;pointer-events:none}
.account-status{min-height:20px;color:#7a4a12}
.account-status.is-success{color:#146c3f}
.account-status.is-error{color:#b3261e}

.consent-note{color:#606779}



/* App shell */
.account-app{min-height:100vh;display:grid;grid-template-columns:264px 1fr;background:#f7f5f0}
/* Échelle typographique propre à l'application : plus dense que le site vitrine,
   dont typography.css impose des tailles en !important. */
.account-app h1{font-size:20px!important;line-height:1.25!important}
.account-app h2{font-size:19px!important;line-height:1.3!important}
.account-app h3{font-size:16px!important;line-height:1.35!important}
.account-app h4{font-size:15px!important;line-height:1.4!important}
.account-app .eyebrow{font-size:10px!important;letter-spacing:.14em;margin-bottom:10px}

.account-sidebar{background:#061844;color:#fff;display:flex;flex-direction:column;padding:28px 18px;position:sticky;top:0;align-self:start;height:100vh;overflow-y:auto}
.account-sidebar-logo{display:flex;align-items:center;gap:13px;padding:12px 14px;margin-bottom:24px}
/* Seul l'emblème est conservé (recadrage à gauche du logo complet) pour aligner le
   libellé sur celui des entrées de menu. */
.account-sidebar-logo img{width:19px;height:19px;flex:none;object-fit:cover;object-position:left center}
.account-sidebar-logo span{font-family:Grifter,"DM Sans",sans-serif;font-size:15px;letter-spacing:.02em;color:#fff}
/* margin-left:auto et align-items:center viennent de la règle nav{} du site vitrine : on les neutralise. */
.account-nav{position:static;display:flex;flex-direction:column;align-items:stretch;gap:3px;flex:1;width:100%;margin:0}
.account-nav button{display:flex;align-items:center;gap:13px;padding:12px 14px;border-radius:12px;background:transparent;color:#c7d0e2;text-align:left;width:100%}
.account-nav button svg{flex:none;width:19px;height:19px}
.account-nav button:hover{background:#ffffff12;color:#fff}
.account-nav button[aria-selected=true]{background:#C9A55A;color:#061844}
.account-nav-count{margin-left:auto;background:#ffffff18;color:#e6ecf6;border-radius:99px;padding:2px 9px;font-size:11px;font-weight:600}
.account-nav-short{display:none}
.account-nav button[aria-selected=true] .account-nav-count{background:#06184422;color:#061844}
.account-sidebar-foot{border-top:1px solid #ffffff20;margin-top:18px;padding-top:18px;display:flex;flex-direction:column;gap:2px}
.account-sidebar-foot a,.account-sidebar-foot button{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;background:transparent;color:#c7d0e2;text-align:left;width:100%}
.account-sidebar-foot a:hover,.account-sidebar-foot button:hover{background:#ffffff12;color:#fff}
.account-sidebar-foot svg{flex:none;width:18px;height:18px}

.account-main{min-width:0;display:flex;flex-direction:column}
.account-topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 40px;background:#fff;border-bottom:1px solid #e7dfce;position:sticky;top:0;z-index:20}
.account-topbar h1{margin:0!important;font-size:20px!important;line-height:1.2!important}
.account-topbar-user{display:flex;align-items:center;gap:12px;flex:none}
.account-avatar{position:relative;overflow:hidden;width:38px;height:38px;border-radius:50%;background:#f5f0e6;color:#061844;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:none}
/* L'illustration recouvre les initiales ; si elle manque, les initiales restent. */
.account-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.account-avatar-picker{margin:4px 0 22px}
.account-avatar-picker-title{margin:0 0 10px;color:#061844;font-weight:600}
.account-avatar-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:10px;max-width:560px}
.account-avatar-choice{padding:0;aspect-ratio:1;border-radius:50%;overflow:hidden;background:#f5f0e6;border:3px solid transparent;transition:border-color .15s}
.account-avatar-choice img{display:block;width:100%;height:100%;object-fit:cover}
.account-avatar-choice:hover{border-color:#d9cbaa}
.account-avatar-choice[aria-pressed=true]{border-color:#C9A55A}
.account-topbar-user span{color:#606779}
.account-topbar-logo{display:none}
.account-topbar-actions{display:none;align-items:center;gap:6px;flex:none}
.account-icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;border-radius:10px;background:#f5f0e6;color:#061844}
.account-icon-btn svg{width:19px;height:19px}
.account-icon-btn:hover{background:#061844;color:#fff}
.account-icon-btn[aria-selected=true]{background:#061844;color:#fff}
.account-topbar-badge{position:absolute;top:1px;right:1px;min-width:16px;padding:0 4px;border-radius:99px;background:#C9A55A;color:#061844;font-size:9px;font-weight:700;line-height:16px;text-align:center}
.account-icon-btn[aria-selected=true] .account-topbar-badge{background:#C9A55A;color:#061844}
.account-content{padding:32px 40px 72px;flex:1;min-width:0}

.account-stats{max-width:1400px;margin:0 0 36px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.account-stat{background:#fff;border:1px solid #e7dfce;border-radius:18px;padding:22px;display:flex;align-items:center;gap:16px}
.account-stat-icon{flex:none;width:44px;height:44px;border-radius:12px;background:#f5f0e6;color:#80612b;display:flex;align-items:center;justify-content:center}
.account-stat-icon svg{width:22px;height:22px}
.account-stat b{display:block;font-size:22px!important;color:#061844;font-weight:700;line-height:1.1}
.account-stat span{color:#606779}

.account-tabpanel{max-width:1400px}
.account-panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:26px}
.account-panel-head h3{margin:0}
.account-subhead{margin-top:44px}
/* Onglets de section d'une fiche, partagés par l'espace client et le back-office. */
.account-steps{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:22px 0}
.account-steps button{display:flex;align-items:center;gap:9px;padding:10px 16px;border-radius:99px;background:#fff;border:1px solid #e7dfce;color:#606779}
.account-steps button:hover:not([disabled]){border-color:#C9A55A}
.account-steps button[aria-current=step]{background:#061844;border-color:#061844;color:#fff}
.account-steps button[disabled]{opacity:.45;pointer-events:none}
.account-step-num{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#f5f0e6;color:#80612b;font-size:11px;font-weight:700}
.account-steps button[aria-current=step] .account-step-num{background:#C9A55A;color:#061844}
.account-steps .is-done .account-step-num{background:#dff3e6;color:#146c3f}
/* Sur mobile, les onglets défilent horizontalement plutôt que d'empiler plusieurs rangées de pastilles. */
@media(max-width:720px){
  .account-steps{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;margin:18px 0}
  .account-steps li{flex:0 0 auto}
  .account-steps button{white-space:nowrap}
}
.account-pager{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}
.account-pager button{padding:9px 16px;border-radius:99px;background:#ECECEC;color:#061844}
.account-pager button:hover:not([disabled]){background:#061844;color:#fff}
.account-pager button[disabled]{opacity:.45;pointer-events:none}
.account-pager span{color:#606779}
.account-back{background:#ECECEC;color:#061844;border-radius:99px;padding:10px 18px;margin-bottom:20px}
.account-back:hover{background:#061844;color:#fff}
.account-block{margin-top:28px;padding-top:24px;border-top:1px solid #ECECEC}
.account-block h3{margin:0 0 16px}
.account-mini-pill{padding:10px 16px!important}
.account-access{flex:1 1 100%;margin-top:14px;padding-top:14px;border-top:1px solid #ECECEC}
.account-access h4{margin:16px 0 8px}
.account-access p{margin:0 0 10px}
.account-requirement{flex-direction:column;align-items:stretch}
.account-requirement .account-item-actions{justify-content:flex-start}
.account-divider{border:0;border-top:1px solid #ECECEC;margin:28px 0}

.account-list{display:flex;flex-direction:column;gap:14px}
.account-item{border:1px solid #e7dfce;border-radius:18px;padding:22px;display:flex;justify-content:space-between;gap:20px;align-items:center;flex-wrap:wrap;background:#fff}
.account-item-main{min-width:0}
.account-item-main h4{margin:0 0 6px}
.account-item-main small{display:block;color:#606779}
.account-badge{display:inline-block;padding:7px 14px;border-radius:99px;white-space:nowrap}
.account-badge.status-received{background:#f5f0e6;color:#80612b}
.account-badge.status-analyzing{background:#e2e8f4;color:#061844}
.account-badge.status-awaiting_documents{background:#fbe8c9;color:#7a4a12}
.account-badge.status-processing{background:#e2e8f4;color:#061844}
.account-badge.status-completed{background:#dff3e6;color:#146c3f}
.account-badge.status-archived{background:#ECECEC;color:#606779}
.account-badge.status-confirmed{background:#dff3e6;color:#146c3f}
.account-badge.status-cancelled{background:#ECECEC;color:#606779}
.account-badge.status-registered{background:#dff3e6;color:#146c3f}
.account-badge.status-unread{background:#C9A55A;color:#061844}
.account-item-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.account-item-actions button{padding:10px 18px;border-radius:99px;background:#ECECEC;color:#061844}
.account-item-actions button:hover{background:#061844;color:#fff}
.account-empty{border:1px dashed #d9cbaa;border-radius:18px;padding:36px;text-align:center;color:#606779;background:#fff}

.account-new-form{border:1px solid #e7dfce;border-radius:20px;padding:28px;background:#faf7ef;margin-bottom:26px}
.account-new-form h4{margin:0 0 18px}

/* Slot picker for appointments */
.account-slots{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin:18px 0}
.account-slot{border:1px solid #d9cbaa;border-radius:14px;padding:14px 16px;text-align:left;background:#fff}
.account-slot[aria-pressed=true]{background:#061844;color:#fff;border-color:#061844}
.account-slot strong{display:block}
.account-slot small{display:block;color:inherit;opacity:.75}

/* Dossier detail dialog */
dialog.account-detail{max-width:760px;width:90%;padding:40px}
.account-detail-close{position:absolute;top:16px;right:20px;background:none;font-size:var(--type-h3)}
.account-timeline{list-style:none;margin:20px 0;padding:0;display:flex;flex-direction:column;gap:14px}
.account-timeline li{border-left:2px solid #C9A55A;padding-left:16px}
.account-timeline time{display:block;color:#606779}
.account-doc-list{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-direction:column;gap:8px}
.account-doc-list li{display:flex;justify-content:space-between;gap:10px;padding:10px 14px;background:#faf7ef;border-radius:10px}
.account-doc-list button{background:none;color:#80612b;text-decoration:underline;padding:0}
.account-upload{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:28px}
.account-messages{display:flex;flex-direction:column;gap:12px;max-height:280px;overflow:auto;margin-bottom:16px;padding-right:4px}
.account-message{background:#faf7ef;border-radius:14px;padding:14px 16px}
.account-message small{display:block;color:#606779;margin-top:6px}
.account-message-form{display:flex;gap:10px}
.account-message-form textarea{flex:1;border:1px solid #d9cbaa;border-radius:14px;padding:12px 14px;resize:vertical;min-height:52px}


@media(max-width:960px){
  .account-app{grid-template-columns:1fr}
  /* La barre navy disparaît : logo, notifications et actions passent dans l'en-tête blanc. */
  .account-sidebar{display:contents}
  .account-sidebar-logo,.account-sidebar-foot{display:none}
  .account-topbar-logo{display:block;width:118px;height:auto}
  .account-topbar-actions{display:flex}
  .account-topbar h1,.account-topbar-user{display:none}
  /* Menu principal : barre fixe en bas, cinq colonnes égales — ne peut pas déborder. */
  .account-nav{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:50;flex:none;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px));background:#061844;border-top:1px solid #ffffff26}
  .account-nav button{position:relative;flex-direction:column;justify-content:center;gap:4px;width:100%;min-width:0;padding:7px 2px;border-radius:10px;text-align:center}
  .account-nav button svg{width:20px;height:20px}
  .account-nav button[aria-selected=true]{background:#ffffff14;color:#e0c88f}
  /* Les notifications vivent uniquement dans la cloche de l'en-tête. */
  .account-nav button[data-dash-tab=notifications]{display:none}
  .account-nav-label{display:none}
  .account-nav-short{display:block;font-size:10px!important;line-height:1.2;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .account-nav-count{position:absolute;top:1px;left:calc(50% + 3px);margin:0;padding:0 5px;font-size:9px;background:#C9A55A;color:#061844}
  .account-topbar{padding:12px 16px;gap:12px}
  .account-content{padding:18px 18px 100px}
  .account-stats{grid-template-columns:1fr 1fr}
  .account-item-main{overflow-wrap:anywhere}
}
@media(max-width:720px){.account-card{border-radius:18px}.account-panel{padding:26px}.account-row{grid-template-columns:1fr}.account-item{padding:18px}}
@media(max-width:520px){.account-stats{grid-template-columns:1fr}.account-topbar-user>span:not(.account-avatar){display:none}dialog.account-detail{padding:22px}}
