:root{
  --personal-brand:#490154;
  --personal-brand-deep:#31013a;
  --personal-brand-soft:#f4edf6;
  --personal-red:#ef001f;
  --personal-line:#e4dde7;
  --personal-muted:#6f6874;
  --personal-shadow:0 10px 28px rgba(49,1,58,.07);
}

/* Barre utilisateur commune : les mêmes contrôles historiques changent
   d'emplacement, pas de comportement. */
body:not(.shell-v2-active) #appShell > header{overflow:visible}
body:not(.shell-v2-active) .v7-user-bar{
  position:fixed;
  inset:0 0 auto var(--r2k-sidebar-width,220px);
  z-index:1095;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  height:72px;
  padding:0 28px;
  background:#fff;
  border-bottom:1px solid var(--personal-line);
}
body:not(.shell-v2-active) .v7-user-menu{position:relative}
body:not(.shell-v2-active) .v7-user-trigger{
  display:grid;
  grid-template-columns:42px minmax(120px,auto) 18px;
  align-items:center;
  min-height:54px;
  margin:0;
  padding:5px 10px;
  gap:10px;
  color:#211529!important;
  background:#fff!important;
  border:1px solid transparent!important;
  border-radius:12px;
  box-shadow:none!important;
  text-align:left;
}
body:not(.shell-v2-active) .v7-user-trigger:hover,body:not(.shell-v2-active) .v7-user-trigger[aria-expanded="true"]{
  background:#faf7fb!important;
  border-color:var(--personal-line)!important;
}
body:not(.shell-v2-active) .v7-user-trigger .user-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:50%;
  color:var(--personal-brand);
  background:var(--personal-brand-soft);
  background-position:center;
  background-size:cover;
  font-weight:800;
}
body:not(.shell-v2-active) .v7-user-trigger .user-info{display:flex;min-width:0;flex-direction:column}
body:not(.shell-v2-active) .v7-user-trigger .user-info strong,body:not(.shell-v2-active) .v7-user-trigger .user-info small{
  max-width:220px;
  overflow:hidden;
  color:#211529!important;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body:not(.shell-v2-active) .v7-user-trigger .user-info strong{font-size:13px}
body:not(.shell-v2-active) .v7-user-trigger .user-info small{color:var(--personal-muted)!important;font-size:11px}
body:not(.shell-v2-active) .v7-user-chevron{
  width:8px;
  height:8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  color:var(--personal-brand);
  transform:rotate(45deg);
  transition:transform 150ms ease;
}
body:not(.shell-v2-active) .v7-user-trigger[aria-expanded="true"] .v7-user-chevron{transform:rotate(225deg)}
body:not(.shell-v2-active) .v7-user-menu-panel{
  position:absolute;
  top:calc(100% + 7px);
  right:0;
  z-index:1200;
  width:230px;
  padding:7px;
  background:#fff;
  border:1px solid var(--personal-line);
  border-radius:12px;
  box-shadow:0 16px 38px rgba(34,10,40,.16);
}
body:not(.shell-v2-active) .v7-user-menu-panel[hidden]{display:none}
body:not(.shell-v2-active) .v7-user-menu-item{
  display:flex;
  align-items:center;
  width:100%;
  min-height:42px;
  margin:0;
  padding:9px 12px;
  color:var(--personal-brand)!important;
  background:#fff!important;
  border:0!important;
  border-radius:8px;
  box-shadow:none!important;
  font-size:13px;
  font-weight:700;
  text-align:left;
}
body:not(.shell-v2-active) .v7-user-menu-item:hover,body:not(.shell-v2-active) .v7-user-menu-item.active{background:var(--personal-brand-soft)!important}
body:not(.shell-v2-active) .v7-user-menu-logout{color:#c81925!important;border-top:1px solid var(--personal-line)!important;border-radius:0 0 8px 8px}

@media(min-width:900px){
  body:not(.shell-v2-active) .workspace{padding-top:72px!important}
}

/* Titres et surfaces communes aux quatre pages de ce lot. */
#accountWorkspace,#articlesWorkspace,#directoryWorkspace,#myIdeasWorkspace{
  color:#171022;
}
#accountWorkspace .workspace-header h1,#articlesWorkspace .workspace-header h1,#directoryWorkspace .workspace-header h1,#myIdeasWorkspace .personal-tools-heading h1{
  color:var(--personal-brand)!important;
  font-size:clamp(28px,2.4vw,36px)!important;
  letter-spacing:-.045em;
}

/* Mon compte. */
#accountWorkspace .account-layout{display:block}
#accountWorkspace .account-card{
  margin:0 0 22px;
  padding:26px;
  border:1px solid var(--personal-line)!important;
  border-radius:15px!important;
  box-shadow:var(--personal-shadow)!important;
}
#accountWorkspace .account-card h2{margin:0 0 20px;color:#20122b;font-size:19px}
#accountWorkspace #accountProfileForm{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:20px 28px;
  align-items:start;
}
#accountWorkspace #profilePhotoControl{
  grid-column:1;
  grid-row:1 / span 2;
  display:flex;
  flex-direction:column;
  align-items:center;
  margin:0;
  padding:8px 12px;
  border:0;
  background:transparent;
  text-align:center;
}
#accountWorkspace #profilePhotoControl .profile-photo-preview{
  width:116px;
  height:116px;
  flex-basis:116px;
  color:var(--personal-brand);
  background:#efe2f3;
  background-position:center;
  background-size:cover;
  font-size:38px;
}
#accountWorkspace #profilePhotoControl .profile-photo-copy strong{font-size:18px}
#accountWorkspace #profilePhotoControl .profile-photo-copy p{margin:3px 0 10px;font-size:12px}
#accountWorkspace #profilePhotoControl .profile-photo-actions{justify-content:center}
#accountWorkspace .account-form-grid{
  grid-column:2;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px 26px;
}
#accountWorkspace .account-form-grid label,#accountWorkspace .account-password-grid label{
  display:grid;
  gap:7px;
  color:#20152a;
  font-size:12px;
  font-weight:800;
}
#accountWorkspace .account-form-grid input,#accountWorkspace .account-password-grid input{
  min-height:46px;
  padding:10px 13px;
  border:1px solid var(--personal-line);
  border-radius:7px;
  background:#fff;
}
#accountWorkspace .account-form-grid input[readonly]{background:#f4f1f5;color:#68606d}
#accountWorkspace .account-actions{
  grid-column:2;
  display:flex;
  justify-content:flex-end;
  margin-top:0;
}
#accountWorkspace .account-actions button{min-width:260px}
#accountWorkspace .account-profile-card .account-actions button{
  color:#fff!important;
  background:var(--personal-red)!important;
  border-color:var(--personal-red)!important;
}
#accountWorkspace .account-password-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px;
}
#accountWorkspace #accountPasswordForm .account-actions{margin-top:22px}
#accountWorkspace #accountPasswordForm .account-actions button{
  color:var(--personal-brand)!important;
  background:#fff!important;
  border-color:var(--personal-brand)!important;
}

/* Le réglage push concerne le téléphone : il reste disponible dans la vue
   mobile, mais n'encombre plus Mon compte sur un poste de travail. */
@media(min-width:651px){
  #accountWorkspace #pushSettingsCard{display:none!important}
}

/* Mes contenus : une liste lisible sur bureau, des cartes empilées sur mobile. */
#articlesWorkspace .articles-library-card{padding:24px 28px!important}
#articlesWorkspace .articles-library-card h2{margin:0 0 22px;font-size:18px}
#articlesWorkspace .articles-library-card h2::after{display:none;content:none}
#articlesWorkspace #savedArticles{display:block}
#articlesWorkspace .saved-content-row{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) minmax(150px,230px) auto;
  align-items:center;
  margin:0;
  padding:18px 0;
  gap:18px;
  border:0;
  border-top:1px solid var(--personal-line);
  border-radius:0;
  background:#fff;
  box-shadow:none;
}
#articlesWorkspace .saved-content-row:first-child{border-top:0}
#articlesWorkspace .saved-content-row:hover{box-shadow:none}
#articlesWorkspace .saved-content-icon{
  position:relative;
  display:block;
  width:48px;
  height:48px;
  border-radius:50%;
  background:#f1e5f4;
}
#articlesWorkspace .saved-content-icon-document::before{
  content:"";
  position:absolute;
  inset:12px 14px;
  border:2px solid var(--personal-brand);
  border-radius:2px;
}
#articlesWorkspace .saved-content-icon-document::after{
  content:"";
  position:absolute;
  left:18px;
  top:20px;
  width:12px;
  height:2px;
  background:var(--personal-brand);
  box-shadow:0 5px 0 var(--personal-brand);
}
#articlesWorkspace .saved-content-icon-lightning::before{
  content:"";
  position:absolute;
  inset:10px 14px;
  background:var(--personal-brand);
  clip-path:polygon(52% 0,100% 0,67% 39%,93% 39%,27% 100%,43% 55%,10% 55%);
}
#articlesWorkspace .saved-content-icon-microphone::before{
  content:"";
  position:absolute;
  left:18px;
  top:10px;
  width:12px;
  height:20px;
  border:2px solid var(--personal-brand);
  border-radius:8px;
}
#articlesWorkspace .saved-content-icon-microphone::after{
  content:"";
  position:absolute;
  left:16px;
  top:23px;
  width:16px;
  height:12px;
  border:2px solid var(--personal-brand);
  border-top:0;
  border-radius:0 0 10px 10px;
}
#articlesWorkspace .saved-content-copy{display:flex;min-width:0;flex-direction:column;gap:3px}
#articlesWorkspace .saved-content-title{overflow-wrap:anywhere;font-size:15px}
#articlesWorkspace .saved-content-type{color:var(--personal-muted);font-size:12px}
#articlesWorkspace .saved-content-date{color:var(--personal-muted);font-size:12px;text-align:right}
#articlesWorkspace .saved-content-actions{display:flex;gap:12px}
#articlesWorkspace .saved-content-actions button{min-width:118px;margin:0}
#articlesWorkspace .saved-content-delete{
  color:#e00020!important;
  background:#fff!important;
  border-color:#e00020!important;
}

/* Mes idées. */
#myIdeasWorkspace{max-width:1450px!important}
#myIdeasWorkspace .ideas-v7-layout{
  display:grid;
  grid-template-columns:minmax(320px,.82fr) minmax(480px,1.18fr);
  gap:24px;
  align-items:start;
}
#myIdeasWorkspace .personal-tools-panel{
  margin:0;
  padding:26px;
  border:1px solid var(--personal-line);
  border-radius:15px;
  box-shadow:var(--personal-shadow);
}
#myIdeasWorkspace .ideas-form-title{display:flex;align-items:center;gap:12px}
#myIdeasWorkspace .ideas-form-title::after{display:none;content:none}
#myIdeasWorkspace .ideas-form-icon{
  position:relative;
  width:44px;
  height:44px;
  flex:0 0 44px;
  border-radius:50%;
  background:var(--personal-brand);
}
#myIdeasWorkspace .ideas-form-icon::before{
  content:"";
  position:absolute;
  left:13px;
  top:20px;
  width:19px;
  height:3px;
  background:#fff;
  border-radius:3px;
  transform:rotate(-45deg);
}
#myIdeasWorkspace .ideas-capture-panel textarea{min-height:260px}
#myIdeasWorkspace .ideas-capture-panel .personal-tools-actions{justify-content:center;margin-top:14px}
#myIdeasWorkspace .ideas-capture-panel .personal-tools-actions button[type="submit"]{
  width:min(100%,240px);
  color:#fff!important;
  background:var(--personal-red)!important;
  border-color:var(--personal-red)!important;
}
#myIdeasWorkspace .personal-tabs{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  margin:-4px 0 20px;
  gap:0;
  border-bottom:1px solid var(--personal-line);
}
#myIdeasWorkspace .personal-tabs button{
  min-height:52px;
  color:#8b8290!important;
  background:#fff!important;
  border:0!important;
  border-bottom:3px solid transparent!important;
  border-radius:0;
  box-shadow:none!important;
}
#myIdeasWorkspace .personal-tabs button[aria-pressed="true"]{
  color:var(--personal-brand)!important;
  border-bottom-color:var(--personal-brand)!important;
}
#myIdeasWorkspace .personal-card-list{display:grid;grid-template-columns:1fr;gap:16px}
#myIdeasWorkspace .personal-card{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
  justify-content:normal;
  min-width:0;
  padding:18px;
  gap:0;
  border-color:var(--personal-line);
  box-shadow:none;
}
#myIdeasWorkspace .personal-card > *{min-width:0}
#myIdeasWorkspace .personal-card-content{overflow-wrap:anywhere;word-break:break-word}
#myIdeasWorkspace .personal-card-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding-top:12px;border-top:1px solid var(--personal-line)}
#myIdeasWorkspace .idea-action{color:var(--personal-brand)!important;background:#fff!important;border-color:var(--personal-line)!important}
#myIdeasWorkspace .idea-action-done,#myIdeasWorkspace .idea-action-active{color:#216b31!important;background:#f7fbf7!important}
#myIdeasWorkspace .idea-action-delete{color:#df001f!important;background:#fff8f8!important}

/* Répertoire : trois colonnes sur bureau, une seule sur mobile. */
#directoryWorkspace .directory-header{align-items:flex-start}
#directoryWorkspace .directory-header h1{margin-top:0!important}
#directoryWorkspace .directory-search-card{
  margin-bottom:18px;
  padding:18px!important;
  border:1px solid var(--personal-line)!important;
  border-radius:14px!important;
  background:#fff;
  box-shadow:var(--personal-shadow);
}
#directoryWorkspace .directory-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
#directoryWorkspace .directory-stats{margin:16px 0;font-weight:700}
#directoryWorkspace .directory-contact-card{
  display:flex;
  min-width:0;
  flex-direction:column;
  padding:20px;
  border:1px solid var(--personal-line);
  border-radius:14px;
  background:#fff;
  box-shadow:var(--personal-shadow);
}
#directoryWorkspace .directory-contact-main{display:grid;grid-template-columns:54px minmax(0,1fr);gap:14px;align-items:start}
#directoryWorkspace .directory-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  border-radius:50%;
  color:var(--personal-brand);
  background:#efe5f3;
  font-weight:700;
}
#directoryWorkspace .directory-contact-info h3{margin:0 0 3px;color:#23142d;font-size:15px}
#directoryWorkspace .directory-contact-info p{margin:0;color:#62586a;font-size:12px;line-height:1.45}
#directoryWorkspace .directory-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#directoryWorkspace .directory-tags span{padding:3px 7px;border-radius:5px;background:#eef2f7;color:#264d74;font-size:10px}
#directoryWorkspace .directory-tags span:nth-child(3n+2){color:#5c2874;background:#f2eafa}
#directoryWorkspace .directory-tags span:nth-child(3n+3){color:#28633a;background:#eaf5ec}
#directoryWorkspace .directory-contact-details{margin-top:14px;border:1px solid var(--personal-line);border-radius:8px;overflow:hidden}
#directoryWorkspace .directory-copy-line{
  display:flex;
  justify-content:space-between;
  width:100%;
  min-height:38px;
  margin:0;
  padding:8px 10px;
  color:#4a3b55!important;
  background:#fff!important;
  border:0!important;
  border-bottom:1px solid var(--personal-line)!important;
  border-radius:0;
  box-shadow:none!important;
  font-size:11px;
  text-align:left;
}
#directoryWorkspace .directory-copy-value{display:flex;min-width:0;align-items:center;gap:8px}
#directoryWorkspace .directory-copy-value span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#directoryWorkspace .directory-copy-value svg,#directoryWorkspace .directory-location-line svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
  fill:none;
  stroke:var(--personal-brand);
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#directoryWorkspace .directory-copy-icon{position:relative;width:14px;height:14px;border:1px solid var(--personal-brand);border-radius:2px}
#directoryWorkspace .directory-copy-icon::after{content:"";position:absolute;left:-4px;top:-4px;width:10px;height:10px;border:1px solid var(--personal-brand);border-radius:2px;background:#fff}
#directoryWorkspace .directory-location-line{display:flex;align-items:center;gap:8px;padding:9px 10px;color:#655b6b;font-size:11px}
#directoryWorkspace .directory-notes{margin:12px 0 0;color:#655b6b;font-size:11px;line-height:1.45}
#directoryWorkspace .directory-card-actions{display:flex;align-items:center;gap:16px;margin-top:auto;padding-top:16px}
#directoryWorkspace .directory-card-actions button{margin:0;min-height:38px}
#directoryWorkspace .directory-delete-btn{color:#db001f!important;background:transparent!important;border:0!important;box-shadow:none!important}

@media(max-width:1120px) and (min-width:651px){
  #directoryWorkspace .directory-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  #articlesWorkspace .saved-content-row{grid-template-columns:50px minmax(0,1fr) auto}
  #articlesWorkspace .saved-content-date{grid-column:2;text-align:left}
  #articlesWorkspace .saved-content-actions{grid-column:3;grid-row:1 / span 2}
}

@media(max-width:899px){
  body:not(.shell-v2-active) .v7-user-bar{
    position:absolute;
    inset:0 8px auto auto;
    z-index:3;
    width:auto;
    height:var(--r2k-mobile-header,62px);
    padding:0;
    background:transparent;
    border:0;
  }
  body:not(.shell-v2-active) .v7-user-trigger{grid-template-columns:42px 14px;min-height:50px;padding:4px;background:transparent!important;border:0!important}
  body:not(.shell-v2-active) .v7-user-trigger .user-info{display:none}
  body:not(.shell-v2-active) .v7-user-trigger .user-avatar{color:var(--personal-brand);background:#fff}
  body:not(.shell-v2-active) .v7-user-trigger .v7-user-chevron{color:#fff}
  body:not(.shell-v2-active) .v7-user-menu-panel{position:fixed;top:58px;right:8px;width:min(260px,calc(100vw - 16px))}
}

@media(max-width:650px){
  #accountWorkspace,#articlesWorkspace,#directoryWorkspace{padding:24px 16px 104px!important}
  #accountWorkspace .workspace-header h1,#articlesWorkspace .workspace-header h1,#directoryWorkspace .workspace-header h1,#myIdeasWorkspace .personal-tools-heading h1{font-size:27px!important}
  #accountWorkspace .account-card{padding:20px}
  #accountWorkspace #accountProfileForm{display:block}
  #accountWorkspace #profilePhotoControl{margin-bottom:18px}
  #accountWorkspace .account-form-grid,#accountWorkspace .account-password-grid{grid-template-columns:1fr}
  #accountWorkspace .account-actions{display:block;margin-top:20px}
  #accountWorkspace .account-actions button{width:100%;min-width:0}
  #articlesWorkspace .articles-library-card{padding:20px 16px!important}
  #articlesWorkspace .saved-content-row{
    grid-template-columns:52px minmax(0,1fr) minmax(112px,auto);
    align-items:start;
    padding:16px 0;
    gap:12px;
  }
  #articlesWorkspace .saved-content-date{grid-column:2;align-self:end;text-align:left}
  #articlesWorkspace .saved-content-actions{grid-column:3;grid-row:1 / span 2;display:grid;gap:9px}
  #articlesWorkspace .saved-content-actions button{min-width:108px;width:100%;padding:8px}
  #myIdeasWorkspace .ideas-v7-layout{grid-template-columns:1fr;gap:20px}
  #myIdeasWorkspace .personal-tools-panel{padding:20px}
  #myIdeasWorkspace .ideas-capture-panel textarea{min-height:160px}
  #myIdeasWorkspace .personal-card-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  #directoryWorkspace .directory-header-actions{display:grid;width:100%;grid-template-columns:1fr}
  #directoryWorkspace .directory-header-actions button{width:100%}
  #directoryWorkspace .directory-list{grid-template-columns:1fr;gap:16px}
}
