/* =============================================================================
   ITAA Life Portal — styles.css
   Version : 1.0.0 — Front statique
   Description : Feuille de style principale — desktop first, responsive
   ============================================================================= */

/* =============================================================================
   0. RESET & BASE
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Aptos, Aptos Display, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9375rem;      /* 15px */
  line-height: 1.6;
  color: #1e2d3d;
  background-color: #FFFFFF;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.app-locked {
  overflow: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* =============================================================================
   1. VARIABLES
   ============================================================================= */

:root {
  /* Couleurs ITAA */
  --blue:          #142F4B;
  --blue-mid:      #1a3d60;
  --blue-light:    #e8edf3;
  --gold:          #D39D5D;
  --gold-hover:    #c28a47;
  --gold-light:    #fdf3e7;
  --bg:            #F5F7FA;
  --white:         #FFFFFF;
  --text:          #1e2d3d;
  --text-muted:    #6b7b8d;
  --text-light:    #9aabbb;

  /* Statuts */
  --pending-bg:    #FFF9EC;
  --pending-text:  #9a6700;
  --pending-dot:   #f0a500;
  --progress-bg:   #EBF4FF;
  --progress-text: #1565c0;
  --progress-dot:  #1976d2;
  --review-bg:     #EEF2FF;
  --review-text:   #4259b2;
  --review-dot:    #5c6dd6;
  --done-bg:       #EDF7F0;
  --done-text:     #1a6b35;
  --done-dot:      #2e7d32;
  --error-bg:      #FDECEA;
  --error-text:    #b71c1c;
  --error-dot:     #d32f2f;
  --neutral-bg:    #F1F4F7;
  --neutral-text:  #738395;
  --neutral-dot:   #97A6B4;

  /* Layout */
  --nav-height:    60px;
  --header-height: 76px;
  --content-max:   1200px;
  --content-pad:   2rem;

  /* Espacements */
  --sp-xs:   0.375rem;
  --sp-sm:   0.75rem;
  --sp-md:   1.25rem;
  --sp-lg:   2rem;
  --sp-xl:   3rem;

  /* Rayons */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;

  /* Ombres */
  --shadow-xs:  0 1px 3px rgba(20, 47, 75, 0.07);
  --shadow-sm:  0 2px 8px rgba(20, 47, 75, 0.09);
  --shadow-md:  0 4px 20px rgba(20, 47, 75, 0.10);
  --shadow-lg:  0 8px 30px rgba(20, 47, 75, 0.13);

  /* Transitions */
  --transition: 180ms ease;
}

/* =============================================================================
   1B. LOGIN GATE
   ============================================================================= */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(211, 157, 93, 0.22), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(102, 156, 214, 0.20), transparent 42%),
    linear-gradient(135deg, #0e2238 0%, #142F4B 45%, #1a3d60 100%);
  overflow: hidden;
  isolation: isolate;
}

.login-screen.hidden {
  display: none;
}

.login-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.login-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  will-change: transform;
  animation: loginAuroraDrift 22s ease-in-out infinite;
}
.login-aurora-blob-1 {
  width: 520px; height: 520px;
  top: -160px; left: -140px;
  background: radial-gradient(circle, rgba(211, 157, 93, 0.55), rgba(211, 157, 93, 0));
  animation-delay: 0s;
}
.login-aurora-blob-2 {
  width: 460px; height: 460px;
  bottom: -180px; right: -120px;
  background: radial-gradient(circle, rgba(120, 180, 235, 0.45), rgba(120, 180, 235, 0));
  animation-delay: -7s;
  animation-duration: 26s;
}
.login-aurora-blob-3 {
  width: 380px; height: 380px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(211, 157, 93, 0.30), rgba(211, 157, 93, 0));
  animation-delay: -13s;
  animation-duration: 30s;
}
.login-aurora-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.45), transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.45), transparent 75%);
}

@keyframes loginAuroraDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(28px, -22px, 0) scale(1.06); }
  66%      { transform: translate3d(-22px, 18px, 0) scale(0.96); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  box-shadow:
    0 30px 80px rgba(8, 22, 40, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.6) inset,
    0 -1px 0 rgba(20, 47, 75, 0.06) inset;
  padding: 2.1rem 2.1rem 1.85rem;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  overflow: hidden;
  animation: loginCardIn 520ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.login-card-glow {
  position: absolute;
  top: -2px; left: 14%; right: 14%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(211, 157, 93, 0.85), transparent);
  border-radius: 2px;
  pointer-events: none;
}

.login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 35%);
  pointer-events: none;
}

@keyframes loginCardIn {
  0%   { opacity: 0; transform: translateY(14px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
  height: 36px;
  width: auto;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 4px 12px rgba(20, 47, 75, 0.12));
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(211, 157, 93, 0.18), rgba(211, 157, 93, 0.08));
  border: 1px solid rgba(211, 157, 93, 0.35);
  color: #a47535;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.login-kicker::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(211, 157, 93, 0.22);
}

.login-title {
  margin-top: 1rem;
  font-size: 1.78rem;
  line-height: 1.15;
  color: var(--blue);
  letter-spacing: -0.025em;
  font-weight: 700;
}

.login-text,
.login-footnote {
  color: var(--text-muted);
}

.login-text {
  margin-top: 0.75rem;
  font-size: 0.92rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1.4rem;
}

.login-role-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.login-role-option {
  position: relative;
}

.login-role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.login-role-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 47, 75, 0.14);
  background: #FBFCFE;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.login-role-option span:hover {
  border-color: rgba(20, 47, 75, 0.22);
  box-shadow: var(--shadow-xs);
}

.login-role-option input:checked + span {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 18px rgba(20, 47, 75, 0.16);
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
}

.login-input {
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--blue-light);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 47, 75, 0.1);
}

.login-error {
  color: var(--error-text);
  font-size: 0.82rem;
  margin-top: -0.15rem;
}

.login-submit {
  width: 100%;
  margin-top: 0.25rem;
}

.login-footnote {
  margin-top: 1rem;
  font-size: 0.78rem;
}

/* Raffinements premium glass card */
.login-card .login-submit {
  background: linear-gradient(135deg, #d9a868 0%, #c28a47 100%);
  box-shadow:
    0 10px 24px rgba(211, 157, 93, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}
.login-card .login-submit:hover {
  background: linear-gradient(135deg, #c89252 0%, #b07c3a 100%);
  box-shadow:
    0 14px 32px rgba(211, 157, 93, 0.48),
    0 1px 0 rgba(255, 255, 255, 0.40) inset;
  transform: translateY(-1px);
}
.login-card .login-submit:active {
  transform: translateY(0);
}

.login-card .login-input {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(20, 47, 75, 0.14);
}
.login-card .login-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(211, 157, 93, 0.22);
}

.login-card .login-role-option input:focus-visible + span {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
}

/* =============================================================================
   2. HEADER
   ============================================================================= */

.site-header {
  background: var(--blue);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(20, 47, 75, 0.12);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.brand-logo {
  flex-shrink: 0;
}

.brand-logo-image {
  height: 40px;
  width: auto;
}

.brand-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: rgba(255,255,255,.74);
  margin-top: 1px;
  letter-spacing: 0.01em;
}

.env-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(211, 157, 93, .18);
  color: var(--gold);
  border: 1px solid rgba(211, 157, 93, .35);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.header-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.header-link-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* =============================================================================
   2B. PORTAL TOOLBAR / SPACE SWITCHER
   ============================================================================= */

.portal-toolbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 250, 0.98));
  border-bottom: 1px solid rgba(20, 47, 75, 0.08);
}

.portal-toolbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0.95rem var(--content-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.space-switcher {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.space-switcher-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.space-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 54px;
  padding: 0 1rem;
  border: 1px solid rgba(20, 47, 75, 0.12);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition), transform var(--transition);
}

.space-switch-btn:hover:not(:disabled) {
  border-color: rgba(20, 47, 75, 0.24);
  transform: translateY(-1px);
}

.space-switch-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.space-switch-btn.is-locked,
.space-switch-btn:disabled {
  opacity: 0.42;
  box-shadow: none;
  cursor: not-allowed;
}

.portal-toolbar-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* =============================================================================
   3. NAVIGATION
   ============================================================================= */

.main-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--blue-light);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: var(--header-height);
  z-index: 90;
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.nav-list {
  display: flex;
  gap: 2px;
  height: var(--nav-height);
  align-items: center;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
  position: relative;
  line-height: 1;
}

.nav-btn:hover {
  background: rgba(20, 47, 75, 0.06);
  color: var(--blue);
}

.nav-btn.active {
  background: var(--white);
  color: var(--blue);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2.5px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* =============================================================================
   4. MAIN CONTENT
   ============================================================================= */

.main-content {
  flex: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-lg) var(--content-pad);
}

/* Sections (affichage onglets) */
.section {
  display: none;
  animation: fadeIn 200ms ease;
}

.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* En-tête de section */
.section-header {
  margin-bottom: var(--sp-lg);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-desc {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* =============================================================================
   5. CARTE GÉNÉRIQUE
   ============================================================================= */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20, 47, 75, .05);
  overflow: hidden;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: var(--sp-md);
  padding: var(--sp-lg) var(--sp-lg) 0;
}

/* =============================================================================
   6. DASHBOARD — KPI CARDS
   ============================================================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20, 47, 75, .05);
  padding: var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  transition: box-shadow var(--transition), transform var(--transition);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 24px;
  height: 24px;
}

.kpi-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--blue);
}

.kpi-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Variantes KPI */
.kpi-pending .kpi-icon  { background: var(--pending-bg);  color: var(--pending-text); }
.kpi-offboard .kpi-icon { background: var(--progress-bg); color: var(--progress-text); }
.kpi-done .kpi-icon     { background: var(--done-bg);     color: var(--done-text); }
.kpi-error .kpi-icon    { background: var(--error-bg);    color: var(--error-text); }

/* =============================================================================
   7. DASHBOARD — BOTTOM GRID
   ============================================================================= */

.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-md);
}

/* Activité récente */
.activity-card .card-title,
.quick-actions-card .card-title {
  border-bottom: 1px solid var(--blue-light);
  padding-bottom: var(--sp-md);
  margin-bottom: 0;
}

.activity-list {
  padding: var(--sp-sm) var(--sp-lg) var(--sp-lg);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 1px solid var(--bg);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.dot-done     { background: var(--done-dot); }
.dot-progress { background: var(--progress-dot); }
.dot-error    { background: var(--error-dot); }
.dot-pending  { background: var(--pending-dot); }

.activity-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.4;
}

.activity-time {
  font-size: 0.775rem;
  color: var(--text-light);
}

/* Actions rapides */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
}

.qa-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blue);
  transition: background var(--transition), box-shadow var(--transition);
  text-align: left;
}

.qa-btn svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.qa-btn:hover {
  background: #eef2f6;
  box-shadow: var(--shadow-xs);
}

/* =============================================================================
   8. FORMULAIRES — BASE
   ============================================================================= */

.form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--sp-md);
  align-items: start;
}

.form-layout-single {
  grid-template-columns: 1fr;
  max-width: 800px;
}

.form-card {
  padding: var(--sp-lg);
}

fieldset {
  border: none;
  margin-bottom: var(--sp-lg);
}

.form-legend {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--gold-light);
  margin-bottom: var(--sp-md);
  width: 100%;
  display: block;
}

.form-section-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
  margin-top: -8px;
}

.form-row {
  margin-bottom: var(--sp-md);
}

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-half {
  max-width: 260px;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.3;
}

.required {
  color: #d32f2f;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--blue-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  outline: none;
}

.form-textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.5;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 47, 75, .10);
}

.form-input.autofilled {
  background: #fffaf4;
  border-color: rgba(211, 157, 93, 0.5);
  color: var(--blue);
}

/* Hint sous un champ */
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
  margin-top: 2px;
}

.email-preview-card {
  margin-top: 0.65rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(211, 157, 93, 0.09);
  border: 1px solid rgba(211, 157, 93, 0.2);
}

.email-preview-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.email-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(20, 47, 75, 0.1);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.email-status-badge.is-manual {
  background: rgba(211, 157, 93, 0.18);
  color: #9f6e31;
}

.email-preview-value {
  font-size: 0.88rem;
  color: var(--blue);
  font-weight: 600;
  word-break: break-word;
}

.email-preview-empty {
  color: var(--text-muted);
  font-weight: 500;
}

.email-alt-suggestion {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.email-alt-suggestion span {
  color: var(--blue);
  font-weight: 600;
}

.hint-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--gold);
}

/* Toggle oui/non */
.toggle-group {
  display: flex;
  gap: var(--sp-md);
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.toggle-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Checklist offboarding */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.check-item:hover {
  border-color: var(--blue-light);
  background: #f0f4f8;
}

.check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.check-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.check-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.check-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.ooo-panel {
  background: rgba(245, 247, 250, 0.72);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  border: 1px solid rgba(20, 47, 75, 0.06);
}

/* =============================================================================
   9. BOUTONS
   ============================================================================= */

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--blue-light);
  margin-top: var(--sp-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  transition: background var(--transition), box-shadow var(--transition), transform 80ms ease;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(211, 157, 93, .35);
}

.btn-primary:hover {
  background: var(--gold-hover);
  box-shadow: 0 4px 16px rgba(211, 157, 93, .45);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-muted);
  border: 1.5px solid var(--blue-light);
}

.btn-secondary:hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* Variante danger (offboarding) */
.btn-danger {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(211, 157, 93, .35);
}

.btn-danger:hover {
  background: var(--gold-hover);
  box-shadow: 0 4px 16px rgba(211, 157, 93, .45);
}

/* =============================================================================
   10. RÉSUMÉ ONBOARDING
   ============================================================================= */

.summary-card {
  padding: var(--sp-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 24px);
}

.summary-card .card-title {
  padding: 0;
  margin-bottom: var(--sp-sm);
}

.summary-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: var(--sp-md);
  line-height: 1.4;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: 9px 0;
  border-bottom: 1px solid var(--bg);
  align-items: flex-start;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.summary-row dd {
  font-size: 0.875rem;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.summary-row-email dd {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.84rem;
}

/* =============================================================================
   11. TABLEAU REQUESTS & LOGS
   ============================================================================= */

.table-card {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--blue-light);
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.table-count {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--blue);
}

.log-notice {
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}

.table-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--blue-light);
}

.filter-badge:hover,
.active-filter {
  background: var(--blue-light);
  color: var(--blue);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg);
}

.data-table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 12px 20px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--blue-light);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bg);
  color: var(--text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: var(--bg);
}

/* ID column */
.td-id {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Log mono */
.td-mono {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.td-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.4;
}

/* Badges de type */
.type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.type-on  { background: var(--done-bg);     color: var(--done-text); }
.type-off { background: var(--progress-bg); color: var(--progress-text); }

/* Badges de statut */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pending  { background: var(--pending-bg);  color: var(--pending-text); }
.status-pending::before  { background: var(--pending-dot); }

.status-progress { background: var(--progress-bg); color: var(--progress-text); }
.status-progress::before { background: var(--progress-dot); }

.status-review   { background: var(--review-bg);   color: var(--review-text); }
.status-review::before   { background: var(--review-dot); }

.status-done     { background: var(--done-bg);     color: var(--done-text); }
.status-done::before     { background: var(--done-dot); }

.status-error    { background: var(--error-bg);    color: var(--error-text); }
.status-error::before    { background: var(--error-dot); }

.status-neutral  { background: var(--neutral-bg);  color: var(--neutral-text); }
.status-neutral::before  { background: var(--neutral-dot); }

/* =============================================================================
   12B. IT MODULE
   ============================================================================= */

.it-section-root {
  display: grid;
  gap: var(--sp-md);
}

.it-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md);
}

.it-kpi-card {
  background: var(--white);
  border: 1px solid rgba(20, 47, 75, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.25rem;
}

.it-kpi-label {
  display: block;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.it-kpi-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.95rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--blue);
}

.it-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: var(--sp-md);
}

.it-panel {
  background: var(--white);
  border: 1px solid rgba(20, 47, 75, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.25rem;
}

.it-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.it-panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}

.it-panel-desc {
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.it-stream-list,
.it-task-list,
.it-request-list {
  display: grid;
  gap: 0.75rem;
}

.it-stream-item,
.it-task-item,
.it-request-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(20, 47, 75, 0.08);
  background: #FCFDFE;
}

.it-stream-main,
.it-task-main {
  display: grid;
  gap: 0.22rem;
}

.it-stream-title,
.it-task-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue);
}

.it-stream-meta,
.it-task-meta,
.it-request-meta,
.it-muted {
  font-size: 0.81rem;
  color: var(--text-muted);
}

.it-tag-list,
.it-meta-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.it-tag,
.it-meta-pill,
.it-scope-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.68rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.it-tag,
.it-meta-pill {
  background: rgba(20, 47, 75, 0.06);
  color: var(--blue);
}

.it-tag.it-tag-gold {
  background: rgba(211, 157, 93, 0.14);
  color: #946228;
}

.it-scope-badge {
  background: var(--blue-light);
  color: var(--blue);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.it-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 47, 75, 0.12);
  background: var(--white);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.it-link-btn:hover {
  border-color: rgba(20, 47, 75, 0.24);
  background: rgba(20, 47, 75, 0.04);
  transform: translateY(-1px);
}

.it-case-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--sp-md);
}

.it-case-list {
  display: grid;
  gap: 0.75rem;
}

.it-case-btn {
  width: 100%;
  text-align: left;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(20, 47, 75, 0.08);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.it-case-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 47, 75, 0.18);
}

.it-case-btn.active {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-color: rgba(20, 47, 75, 0.22);
  box-shadow: var(--shadow-md);
}

.it-case-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.it-case-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--blue);
}

.it-case-sub,
.it-case-foot {
  margin-top: 0.28rem;
  font-size: 0.81rem;
  color: var(--text-muted);
}

.it-case-detail {
  display: grid;
  gap: var(--sp-md);
}

.it-detail-stat-grid,
.it-inventory-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.it-stat-card {
  border-radius: 14px;
  border: 1px solid rgba(20, 47, 75, 0.06);
  background: var(--bg);
  padding: 0.95rem;
}

.it-stat-value {
  display: block;
  font-size: 1.28rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--blue);
}

.it-stat-label {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.it-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-md);
}

.it-list-compact {
  display: grid;
  gap: 0.55rem;
}

.it-list-compact li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.45;
}

.it-list-compact li::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-top: 0.42rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gold);
}

.it-table-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.it-empty {
  padding: 1.3rem 1.4rem;
  border: 1px dashed rgba(20, 47, 75, 0.16);
  border-radius: 18px;
  background: var(--white);
  color: var(--text-muted);
}

/* =============================================================================
   12. LOGS — Actions & résultats
   ============================================================================= */

.log-action {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-mid);
  background: var(--blue-light);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.log-result {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.log-ok    { background: var(--done-bg);     color: var(--done-text); }
.log-warn  { background: var(--pending-bg);  color: var(--pending-text); }
.log-error { background: var(--error-bg);    color: var(--error-text); }

/* =============================================================================
   13. FOOTER
   ============================================================================= */

.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,.55);
  font-size: 0.78rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--sp-md) var(--content-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
}

.footer-version {
  font-size: 0.73rem;
}

/* =============================================================================
   14. TOAST
   ============================================================================= */

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  background: var(--blue);
  color: var(--white);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 360px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
  border-left: 4px solid var(--gold);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.toast-success {
  border-left-color: var(--done-dot);
}

.toast.toast-error {
  border-left-color: var(--error-dot);
}

/* =============================================================================
   15. RESPONSIVE — TABLETTE
   ============================================================================= */

@media (max-width: 1024px) {
  :root {
    --content-pad: 1.5rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
    order: -1;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .it-grid-two,
  .it-case-layout,
  .it-split-grid {
    grid-template-columns: 1fr;
  }

  .portal-toolbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .it-kpi-grid,
  .it-detail-stat-grid,
  .it-inventory-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================================================
   16. RESPONSIVE — MOBILE
   ============================================================================= */

@media (max-width: 680px) {
  :root {
    --content-pad: 1rem;
    --nav-height: 52px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-logo-image {
    height: 34px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .env-badge {
    display: none;
  }

  .header-link-btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .nav-list {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm);
  }

  .kpi-card {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-md);
    gap: var(--sp-sm);
  }

  .kpi-value {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .form-row.two-col {
    grid-template-columns: 1fr;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-role-toggle,
  .it-kpi-grid,
  .it-detail-stat-grid,
  .it-inventory-stat-grid {
    grid-template-columns: 1fr;
  }

  .space-switcher {
    width: 100%;
  }

  .space-switch-btn {
    flex: 1;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================================================
   16bis. INTÉGRATION API + MSAL (header chips, login MS, panneau résultat)
   ============================================================================= */

.api-health-chip {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.api-health-unknown { background: #eef2f6; color: #6b7b8d; }
.api-health-ok      { background: #e6f5ec; color: #1e6b3a; }
.api-health-ko      { background: #fbe7e7; color: #a3271f; }

.msal-user-chip {
  background: var(--gold-light);
  color: var(--blue);
  font-weight: 600;
}

.login-msal {
  margin-top: 1.25rem;
  text-align: center;
}
.login-msal-divider {
  position: relative;
  margin: 1rem 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.login-msal-divider::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: #dde4ec;
}
.login-msal-divider span {
  position: relative; padding: 0 0.75rem; background: var(--white);
}
.login-msal-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  width: 100%; justify-content: center;
}
.login-msal-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.msal-ms-logo {
  display: inline-grid; grid-template-columns: 9px 9px; grid-template-rows: 9px 9px;
  gap: 2px; width: 20px; height: 20px;
}
.msal-ms-logo span:nth-child(1) { background: #F25022; }
.msal-ms-logo span:nth-child(2) { background: #7FBA00; }
.msal-ms-logo span:nth-child(3) { background: #00A4EF; }
.msal-ms-logo span:nth-child(4) { background: #FFB900; }
.login-msal-status {
  margin-top: 0.6rem; font-size: 0.8rem; color: var(--text-muted);
}

.api-result-card { margin-top: 1.5rem; }
.api-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; gap: 0.75rem;
}
.api-result-status {
  font-size: 0.78rem; font-weight: 600;
  padding: 0.25rem 0.6rem; border-radius: 999px;
  background: #eef2f6; color: var(--text-muted);
}
.api-status-ok { background: #e6f5ec; color: #1e6b3a; }
.api-status-ko { background: #fbe7e7; color: #a3271f; }

.api-result-list { display: grid; gap: 0.45rem; margin-bottom: 1rem; }
.api-result-list .summary-row { display: flex; gap: 1rem; }
.api-result-list dt {
  flex: 0 0 38%; color: var(--text-muted); font-size: 0.85rem;
}
.api-result-list dd {
  flex: 1; font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 0.86rem; color: var(--text); word-break: break-all;
}

.api-result-actions { margin-bottom: 1rem; }
.api-execute-result {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px dashed #dde4ec;
}
.api-planned-groups-wrapper {
  background: var(--bg); border-radius: 8px; padding: 0.75rem 1rem;
}
.api-planned-groups-label {
  display: block; font-size: 0.78rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem;
}
.api-planned-groups {
  display: grid; gap: 0.35rem;
}
.api-planned-group-item {
  display: flex; align-items: baseline; gap: 0.6rem;
  font-size: 0.85rem;
}
.api-planned-group-item strong { color: var(--blue); }
.api-planned-group-id {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  color: var(--text-muted); font-size: 0.78rem;
}
.api-planned-group-empty { color: var(--text-muted); font-style: italic; }

/* =============================================================================
   17. ACCESSIBILITÉ — FOCUS VISIBLE
   ============================================================================= */

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Réduction des animations si souhaité par le système */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
