
/* ====== Passe de polish premium (Blocs A–D) — CSS uniquement, sous #view-espace, Super Admin exclu pour les contrôles ====== */
/* Échelle : contrôles 42 px (primaire 44 sur mobile), texte 13.5 px / 650, rayon pill ; titres −0.02em ; chiffres 26–30 px */
#view-espace:not(.sa):not(#_a) .btn{min-height:42px;padding:0 18px;font-size:13.5px;font-weight:650;letter-spacing:-.005em;line-height:1.2;white-space:nowrap}
#view-espace:not(.sa):not(#_a) .btn.teal{font-weight:600}
#view-espace:not(.sa):not(#_a) .btn.outline{font-weight:600;color:var(--e-title)}
#view-espace:not(.sa):not(#_a) .esp-head-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#view-espace:not(.sa):not(#_a) .esp-ann-actions .btn{min-height:38px;padding:0 14px;font-size:13px}
#view-espace:not(.sa):not(#_a) .esp-quick .btn,#view-espace:not(.sa):not(#_a) .esp-quick button{min-height:42px}

/* Cartes : une seule respiration (20 px) et un titre de carte homogène */
#view-espace:not(.sa):not(#_a) .esp-h{font-size:15px;font-weight:650;letter-spacing:-.01em;margin:0 0 14px}
#view-espace:not(.sa):not(#_a) .esp-card{padding:22px}
#view-espace:not(.sa):not(#_a) .esp-muted,#view-espace:not(.sa):not(#_a) .esp-acct-row{font-size:13px;line-height:1.5}

/* État vide : un seul cadre (le pointillé), jamais une carte dans une carte */
#view-espace:not(.sa):not(#_a) :is(.esp-card,.esp-list,.esp-ann-list):has(>.esp-empty:only-child){padding:0;border:0;background:transparent;box-shadow:none}
#view-espace:not(.sa):not(#_a) .esp-empty{padding:30px 20px;background:var(--e-card)}
#view-espace:not(.sa):not(#_a) .esp-empty .btn{margin-top:4px}
#view-espace:not(.sa):not(#_a) .esp-empty p:first-of-type{font-size:15px;font-weight:650;color:var(--e-title)}

/* Formulaires : légende en titre de carte, champs unifiés, flèche de liste identique partout */
#view-espace:not(.sa):not(#_a) fieldset{margin:0 0 14px;padding:20px 20px 18px;min-width:0}
#view-espace:not(.sa):not(#_a) fieldset>legend{float:left;width:100%;padding:0;margin:0 0 14px;font-size:15px;font-weight:650;letter-spacing:-.01em;color:var(--e-title)}
#view-espace:not(.sa):not(#_a) fieldset>legend+*{clear:both}
#view-espace:not(.sa):not(#_a) label{font-size:12px;font-weight:650;letter-spacing:0;color:var(--e-muted)}
#view-espace:not(.sa):not(#_a) :is(input,select,textarea){font-size:15px}
#view-espace:not(.sa):not(#_a) select{-webkit-appearance:none;appearance:none;padding-right:40px;background-repeat:no-repeat;background-position:right 14px center;background-size:14px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355666f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")}
html[data-theme="dark"] #view-espace:not(.sa):not(#_a) select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b9c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")}

/* Badges et pastilles : plus discrets */
#view-espace:not(.sa):not(#_a) .esp-b{font-size:11.5px;font-weight:650;padding:4px 10px;letter-spacing:0}

/* Bureau : alignement fin */
@media(min-width:801px){
  #view-espace:not(.sa):not(#_a) .esp-main h1,#view-espace:not(.sa):not(#_a) #esp-titre{letter-spacing:-.025em}
}

/* ---- Mobile ≤ 800 : compact + lisible + confortable ---- */
@media(max-width:800px){
  #view-espace:not(.sa):not(#_a) .btn{min-height:44px;font-size:14px}
  #view-espace:not(.sa):not(#_a) .btn.outline{min-height:42px;font-size:13.5px}
  #view-espace:not(.sa):not(#_a) .esp-ann-actions .btn{min-height:40px;font-size:13px;padding:0 12px}
  #view-espace:not(.sa):not(#_a) .esp-card{padding:18px 16px}
  #view-espace:not(.sa):not(#_a) .esp-h{margin-bottom:12px}
  /* Mon compte : trois actions empilées, pleine largeur, la déconnexion en retrait */
  #view-espace:not(.sa):not(#_a) .esp-head-actions{flex-direction:column;align-items:stretch;gap:8px;width:100%}
  #view-espace:not(.sa):not(#_a) .esp-head-actions .btn{width:100%;border-radius:var(--a-r-ctl,12px);white-space:normal}
  #view-espace:not(.sa):not(#_a) .esp-head-actions .btn:last-child{background:transparent;border-color:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;color:var(--e-muted)}
  /* Pied de page mobile : actions de sortie discrètes */
  #view-espace:not(.sa):not(#_a) .esp-side-foot button{min-height:44px;font-size:13px;font-weight:600;color:var(--e-muted)}
  /* Chiffres clés : plus compacts */
  #view-espace:not(.sa):not(#_a) .esp-stat{padding:14px 14px 12px;gap:6px}
  #view-espace:not(.sa):not(#_a) .esp-stat b{font-size:26px;letter-spacing:-.02em}
  #view-espace:not(.sa):not(#_a) .esp-stat :is(span,small){font-size:12px;line-height:1.3}
  /* Formulaires */
  #view-espace:not(.sa):not(#_a) fieldset{padding:16px 16px 14px;margin-bottom:12px}
  #view-espace:not(.sa):not(#_a) fieldset>legend{margin-bottom:12px}
  #view-espace:not(.sa):not(#_a) :is(input:not([type=checkbox]):not([type=radio]),select){min-height:46px}
  #view-espace:not(.sa):not(#_a) .esp-empty{padding:26px 16px}
}
@media(max-width:800px) and (min-width:561px){#view-espace:not(.sa):not(#_a) .esp-head-actions{flex-direction:row;flex-wrap:wrap}#view-espace:not(.sa):not(#_a) .esp-head-actions .btn{width:auto;flex:1 1 auto}}

/* Sélecteur de lieu (Département / Commune / Zone) : même habillage que les autres listes */
#view-espace:not(.sa):not(#_a) .quartier-menu-trigger{min-height:44px;padding:0 14px;font-size:15px;border-radius:var(--a-r-ctl,12px);border-color:var(--a-field-bd,var(--e-line));background-color:var(--e-card);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}
#view-espace:not(.sa):not(#_a) .quartier-menu-trigger>span:last-child{font-size:0;min-width:14px;width:14px;height:14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355666f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/14px no-repeat}
html[data-theme="dark"] #view-espace:not(.sa):not(#_a) .quartier-menu-trigger>span:last-child{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b9c2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")}
#view-espace:not(.sa):not(#_a) .quartier-menu-trigger:focus-visible{outline:2px solid var(--e-brand);outline-offset:2px}
#view-espace:not(.sa):not(#_a) .quartier-menu-trigger:disabled{opacity:.55}
/* Activité : lignes plus compactes, vide discret */
#view-espace:not(.sa):not(#_a) .esp-act{padding:12px 0}
#view-espace:not(.sa):not(#_a) .esp-card:has(>.esp-muted:only-child){padding:16px 18px}
@media(max-width:800px){
  #view-espace:not(.sa):not(#_a) .esp-dash2{gap:12px;margin-bottom:8px}
  #view-espace:not(.sa):not(#_a) .quartier-menu-trigger{min-height:46px}
}
/* Rythme vertical entre blocs du tableau de bord */
#view-espace:not(.sa):not(#_a) .esp-blk:not([hidden])~.esp-blk:not([hidden]){margin-top:30px}
#view-espace:not(.sa):not(#_a) .esp-blk>.esp-h{margin:0 0 12px}
@media(max-width:800px){
  #view-espace:not(.sa):not(#_a) .esp-blk:not([hidden])~.esp-blk:not([hidden]){margin-top:26px}
  #view-espace:not(.sa):not(#_a) .ag-info>div{padding:10px 16px}
  #view-espace:not(.sa):not(#_a) .esp-ann{padding:16px 0}
}
@media(max-width:560px){
  #view-espace:not(.sa):not(#_a) .esp-ph{height:128px}
  #view-espace:not(.sa):not(#_a) .esp-ann-actions{gap:8px}
}
#view-espace:not(.sa):not(#_a) .quartier-menu-wrap{margin-bottom:12px}
