/* AdminMind 6.9.89 — cohérence premium Glass sur les pages existantes.
   UI only: aucun flux métier, donnée, Supabase ou handler n'est modifié. */

:root{
  --amGlass:rgba(255,255,255,.68);
  --amGlassStrong:rgba(255,255,255,.82);
  --amGlassLine:rgba(255,255,255,.82);
  --amGlassShadow:0 14px 34px rgba(46,37,73,.075),inset 0 1px 0 rgba(255,255,255,.94);
  --amGlassShadowSoft:0 9px 24px rgba(46,37,73,.055),inset 0 1px 0 rgba(255,255,255,.90);
  --amRadiusXL:24px;
  --amRadiusLG:20px;
  --amRadiusMD:15px;
}

/* Toutes les pages gardent une respiration et une hiérarchie identiques à l'accueil. */
.view>h2,
.documentsTop h2,
.amDemarchesHeadV50 h2{
  letter-spacing:-.62px!important;
  line-height:1.08!important;
}
.view>h2{font-size:25px!important;margin:5px 0 5px!important}
.view>.lead,
.documentsTop p,
.amDemarchesHeadV50 p{
  color:var(--muted)!important;
  line-height:1.48!important;
}

/* ===== À FAIRE ===== */
#tasks .toolbar{
  padding:7px 0 10px!important;
  gap:6px!important;
}
#tasks .filter{
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.58))!important;
  box-shadow:0 5px 14px rgba(45,35,70,.04),inset 0 1px 0 rgba(255,255,255,.92)!important;
  color:var(--muted)!important;
  padding:8px 10px!important;
}
#tasks .filter.active{
  color:#fff!important;
  background:linear-gradient(145deg,#6753d2,#846fe3)!important;
  border-color:rgba(255,255,255,.16)!important;
  box-shadow:0 10px 22px rgba(87,68,185,.20),inset 0 1px 0 rgba(255,255,255,.22)!important;
}
#tasks .cards,
#archive .cards{gap:8px!important}
#tasks .card,
#archive .card{
  border-radius:20px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.60))!important;
  box-shadow:var(--amGlassShadowSoft)!important;
  padding:12px!important;
}
#tasks .cardIcon,
#archive .cardIcon{
  border-radius:13px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.88)!important;
}
#tasks .cardMain b,
#archive .cardMain b{font-size:12.5px!important}
#tasks .cardMain small,
#archive .cardMain small{font-size:10px!important}

/* ===== DOCUMENTS ===== */
#documents .documentsTop{margin-bottom:12px!important}
#documents .documentsTop h2{font-size:25px!important;margin-bottom:4px!important}
#documents .documentsTop p{font-size:10.5px!important;max-width:340px!important}
#documents .docsSearchShell{
  border-radius:22px!important;
  padding:12px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.83),rgba(255,255,255,.58))!important;
  border:1px solid rgba(255,255,255,.82)!important;
  box-shadow:0 15px 34px rgba(45,35,70,.075),inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#documents .docsSearchInput{
  border-radius:14px!important;
  background:rgba(247,245,252,.76)!important;
  border:1px solid rgba(255,255,255,.86)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#documents .docsVoiceBtn{
  border-radius:14px!important;
  background:linear-gradient(145deg,#6955d5,#8772e8)!important;
  box-shadow:0 9px 20px rgba(94,72,200,.20),inset 0 1px 0 rgba(255,255,255,.22)!important;
}
#documents .docsQuickAction{
  border-radius:16px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.58))!important;
  box-shadow:0 8px 19px rgba(45,35,70,.05),inset 0 1px 0 rgba(255,255,255,.92)!important;
}
#documents .docsQuickAction.primary{
  background:linear-gradient(145deg,#6652d1,#846fe3)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.17)!important;
  box-shadow:0 12px 24px rgba(87,68,185,.20),inset 0 1px 0 rgba(255,255,255,.22)!important;
}
#documents .docsSectionHead{margin-top:17px!important;margin-bottom:8px!important}
#documents .docsSectionHead h3{font-size:15px!important}
#documents .docsSectionHead small{font-size:8.5px!important}
#documents .docsFolderGrid{gap:7px!important}
#documents .docsFolder{
  min-height:86px!important;
  border-radius:18px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.83),rgba(255,255,255,.58))!important;
  box-shadow:0 9px 21px rgba(45,35,70,.055),inset 0 1px 0 rgba(255,255,255,.93)!important;
}
#documents .docsFolder.active{
  border-color:rgba(118,92,228,.30)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(237,231,255,.82))!important;
  box-shadow:0 12px 25px rgba(106,82,213,.11),inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#documents .docsFolderIcon{font-size:19px!important}
#documents .docsResult{
  border-radius:18px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.59))!important;
  box-shadow:0 8px 21px rgba(45,35,70,.05),inset 0 1px 0 rgba(255,255,255,.92)!important;
}
#documents .docsResultIcon{
  border-radius:13px!important;
  background:linear-gradient(180deg,#f6f2ff,#ece6ff)!important;
  box-shadow:inset 0 1px 0 #fff!important;
}
#documents .docsSmartLine{
  border-radius:15px!important;
  background:linear-gradient(180deg,rgba(242,237,255,.91),rgba(235,228,255,.72))!important;
  border:1px solid rgba(255,255,255,.84)!important;
}

/* ===== ACTIONS / DÉMARCHES ===== */
#demarches .amDemarchesHeadV50{
  margin:3px 0 13px!important;
}
#demarches .amDemarchesHeadV50>small{
  display:inline-flex!important;
  padding:5px 8px!important;
  border-radius:999px!important;
  background:#eee9ff!important;
  color:#6b55d1!important;
}
#demarches .amDemarchesAskV50{
  border-radius:22px!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(255,255,255,.13),transparent 26%),
    linear-gradient(135deg,#211a43,#3b2f77 64%,#6c57d5 130%)!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 17px 38px rgba(46,35,96,.18),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
#demarches .amDemarchesAskIconV50,
#demarches .amDemarchesAskV50>button{border-radius:13px!important}
#demarches .amDemarchesGridV50{gap:8px!important}
#demarches .amDemarcheCardV50{
  min-height:128px!important;
  border-radius:20px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.83),rgba(255,255,255,.58))!important;
  box-shadow:0 11px 25px rgba(45,35,70,.06),inset 0 1px 0 rgba(255,255,255,.94)!important;
}
#demarches .amDemarcheIconV50{border-radius:12px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important}
#demarches .amLifeStripV50 button{
  border-radius:19px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.58))!important;
  box-shadow:0 9px 22px rgba(45,35,70,.05),inset 0 1px 0 rgba(255,255,255,.93)!important;
}

/* ===== HISTORIQUE ===== */
#archive .search{
  border-radius:17px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.83),rgba(255,255,255,.61))!important;
  box-shadow:0 10px 24px rgba(45,35,70,.055),inset 0 1px 0 rgba(255,255,255,.94)!important;
  margin:11px 0 13px!important;
}

/* ===== MOI ===== */
#profile .accountCard{
  border-radius:23px!important;
  padding:15px!important;
  background:
    radial-gradient(circle at 92% 3%,rgba(129,105,228,.10),transparent 28%),
    linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,.59))!important;
  border:1px solid rgba(255,255,255,.82)!important;
  box-shadow:0 15px 35px rgba(45,35,70,.075),inset 0 1px 0 rgba(255,255,255,.95)!important;
}
#profile .accountAvatar{
  border-radius:14px!important;
  background:linear-gradient(145deg,#ede7ff,#dcd2ff)!important;
  box-shadow:inset 0 1px 0 #fff,0 6px 15px rgba(95,72,184,.09)!important;
}
#profile .profileSectionLabel{
  margin:19px 4px 8px!important;
  font-size:8.8px!important;
  letter-spacing:.72px!important;
}
#profile .setting{
  border-radius:19px!important;
  padding:12px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.59))!important;
  box-shadow:0 8px 21px rgba(45,35,70,.045),inset 0 1px 0 rgba(255,255,255,.93)!important;
}
#profile .settingIcon{
  width:40px!important;height:40px!important;border-radius:13px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important;
}
#profile .settingMain b{font-size:12px!important}
#profile .settingMain small{font-size:9.5px!important;line-height:1.35!important}
#profile .smallAction,
#profile .themeBtn{border-radius:11px!important}

/* ===== FAMILY ===== */
.familyHero{
  border-radius:26px!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(255,255,255,.15),transparent 29%),
    linear-gradient(140deg,#211a43,#3b2f76 61%,#735ee0 130%)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  box-shadow:0 18px 42px rgba(48,38,95,.19),inset 0 1px 0 rgba(255,255,255,.13)!important;
}
.familySection,
.familyHubCard{
  border-radius:20px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.59))!important;
  box-shadow:0 10px 24px rgba(45,35,70,.055),inset 0 1px 0 rgba(255,255,255,.93)!important;
}
.familyHubIcon,
.familyMemberAvatar{box-shadow:inset 0 1px 0 rgba(255,255,255,.9)!important}
.familyCreateName,.familyInviteEmail{
  border-radius:14px!important;
  background:rgba(248,246,252,.76)!important;
  border-color:rgba(255,255,255,.82)!important;
}

/* ===== PRO ===== */
.proHero{
  border-radius:27px!important;
  background:
    radial-gradient(circle at 94% 1%,rgba(255,255,255,.13),transparent 27%),
    linear-gradient(145deg,#17162b,#292452 67%,#4e3da0 140%)!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 19px 43px rgba(37,31,78,.19),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
.proAiNote,
.proStat,
.proModule,
.proEntity,
.proDocCard{
  border-radius:19px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.59))!important;
  box-shadow:0 9px 23px rgba(45,35,70,.05),inset 0 1px 0 rgba(255,255,255,.93)!important;
}
.proModule.active{
  border-color:rgba(111,85,216,.25)!important;
  background:linear-gradient(145deg,rgba(255,255,255,.88),rgba(238,232,255,.78))!important;
}
.proEntityIcon{
  border-radius:14px!important;
  background:linear-gradient(180deg,#f5f1ff,#eae4ff)!important;
  box-shadow:inset 0 1px 0 #fff!important;
}

/* ===== REVIEW / SUCCESS / PROCESSING ===== */
#review .analysisBox,
#success .successHero,
#processing .processing{
  border-radius:24px!important;
}
#review .analysisBox{
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.83),rgba(255,255,255,.60))!important;
  box-shadow:0 15px 35px rgba(45,35,70,.07),inset 0 1px 0 rgba(255,255,255,.94)!important;
}
#review .field input,
#review .field textarea,
#review .field select{
  border-radius:13px!important;
  background:rgba(248,246,252,.76)!important;
}

/* ===== SHEETS / MODALES ===== */
.sheet,.modal{
  border-radius:30px 30px 0 0!important;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(248,247,252,.94))!important;
  border-top:1px solid rgba(255,255,255,.88)!important;
  box-shadow:0 -22px 60px rgba(24,18,42,.16)!important;
}
.choice,.scenario{
  border-radius:19px!important;
  border:1px solid rgba(255,255,255,.82)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.84),rgba(255,255,255,.61))!important;
  box-shadow:0 8px 20px rgba(45,35,70,.045),inset 0 1px 0 rgba(255,255,255,.93)!important;
}

/* ===== NAVIGATION ===== */
.nav{
  border-top-color:rgba(255,255,255,.76)!important;
  background:rgba(248,247,252,.80)!important;
  box-shadow:0 -10px 30px rgba(42,33,64,.055)!important;
}
.nav button{
  border-radius:15px!important;
}
.nav button.active{
  background:linear-gradient(180deg,#efebff,#e9e3ff)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.96)!important;
}

/* Glass fort seulement sur grands conteneurs afin de préserver la fluidité iPhone. */
@supports((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  #documents .docsSearchShell,
  #profile .accountCard,
  .familyHero,
  .proHero,
  .sheet,.modal{
    -webkit-backdrop-filter:blur(18px) saturate(140%);
    backdrop-filter:blur(18px) saturate(140%);
  }
}

/* Sombre : garder la même profondeur sans cartes blanches. */
html[data-theme="dark"] #tasks .card,
html[data-theme="dark"] #archive .card,
html[data-theme="dark"] #documents .docsSearchShell,
html[data-theme="dark"] #documents .docsQuickAction:not(.primary),
html[data-theme="dark"] #documents .docsFolder,
html[data-theme="dark"] #documents .docsResult,
html[data-theme="dark"] #demarches .amDemarcheCardV50,
html[data-theme="dark"] #demarches .amLifeStripV50 button,
html[data-theme="dark"] #profile .accountCard,
html[data-theme="dark"] #profile .setting,
html[data-theme="dark"] .familySection,
html[data-theme="dark"] .familyHubCard,
html[data-theme="dark"] .proAiNote,
html[data-theme="dark"] .proStat,
html[data-theme="dark"] .proModule,
html[data-theme="dark"] .proEntity,
html[data-theme="dark"] #review .analysisBox{
  background:linear-gradient(180deg,rgba(31,34,45,.91),rgba(24,27,38,.82))!important;
  border-color:rgba(255,255,255,.075)!important;
  box-shadow:0 13px 30px rgba(0,0,0,.21),inset 0 1px 0 rgba(255,255,255,.045)!important;
}
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .modal{
  background:linear-gradient(180deg,rgba(27,30,40,.98),rgba(20,23,33,.98))!important;
  border-top-color:rgba(255,255,255,.07)!important;
}
html[data-theme="dark"] .nav{
  background:rgba(19,22,31,.88)!important;
  border-top-color:rgba(255,255,255,.06)!important;
}
html[data-theme="dark"] .nav button.active{
  background:#2a2440!important;color:#b3a5ff!important;
}

@media(prefers-reduced-motion:reduce){
  #tasks .card,#archive .card,#documents .docsFolder,.familyHubCard{transition:none!important}
}
