/* ====== VARIABLES — thème Citask ====== */
:root {
  --bg: #182336;
  --bg-2: #22324a;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover: rgba(255, 255, 255, 0.11);
  --muted: #c7cfdb;
  --text: #f9fafb;
  --text-soft: #e8edf5;
  --accent: #fbbf24;
  --accent-2: #f59e0b;
  --accent-dim: rgba(251, 191, 36, 0.16);
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --info: #60a5fa;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1680px;
}

/* ====== Reset ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === Background pour la page login (1ère page) === */
body.login-page {
  background:
    linear-gradient(180deg, rgba(24, 35, 54, 0.45) 0%, rgba(24, 35, 54, 0.55) 60%, rgba(34, 50, 74, 0.70) 100%),
    url('/assets/bg-login.jpg') center/cover no-repeat fixed;
}

/* === Background pour les pages app (portail + détail) === */
body.app-page {
  background:
    linear-gradient(180deg, rgba(24, 35, 54, 0.62) 0%, rgba(24, 35, 54, 0.70) 50%, rgba(34, 50, 74, 0.80) 100%),
    url('/assets/bg-night.jpg') center/cover no-repeat fixed;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #fcd34d;
}

/* ====== Header ====== */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 14, 28, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 16px rgba(251, 191, 36, 0.08);
  background: #fff;
}

.logo .label-sub {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
  margin-left: 4px;
}

.user-info {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-info strong {
  color: var(--text);
}
.user-info a.logout {
  color: var(--accent);
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.user-info a.logout:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  text-decoration: none;
}

/* ====== Body ====== */
.portal-body {
  max-width: var(--max);
  margin: 32px auto;
  padding: 0 24px;
}

.welcome {
  margin-bottom: 28px;
}
/* En-tête dossier : titre à gauche, bouton d'action à droite */
.dossier-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dossier-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dossier-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.42);
}
.dossier-action-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 760px) {
  .dossier-welcome { flex-direction: column; align-items: flex-start; }
}
.welcome-head {
  display: flex;
  align-items: center;
  gap: 46px;
  padding-left: 8px;
}
.welcome h1 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  background: linear-gradient(135deg, #f9fafb 30%, rgba(251, 191, 36, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome h1 .accent {
  color: var(--accent);
}
.welcome p {
  color: var(--muted);
  font-size: 15px;
}

/* === Logo client === */
.client-logo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: clientLogoFloat 3.5s ease-in-out infinite;
  z-index: 1;
}

/* === Soleil PNG en rotation === */
.client-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -60px;
  background: url('/assets/soleil-v3.webp') center/contain no-repeat;
  z-index: -1;
  animation: sunRaysSpin 30s linear infinite;
  pointer-events: none;
}

.client-logo-wrap:hover {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55),
              0 0 0 8px rgba(251, 191, 36, 0.14),
              0 0 64px rgba(251, 191, 36, 0.55);
}
.client-logo-wrap:hover::before {
  animation-duration: 12s;
}

@keyframes clientLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes sunRaysSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.client-logo-wrap img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}
.client-logo-wrap .emoji-fallback {
  font-size: 40px;
  line-height: 1;
  position: relative;
  z-index: 2;
}

/* === Bannière logo client sur page détail === */
.client-banner {
  display: flex;
  align-items: center;
  gap: 80px;
  margin-bottom: 60px;
  padding-left: 4px;
}
.client-banner .client-logo-wrap {
  width: 72px;
  height: 72px;
}
.client-banner .client-logo-wrap .emoji-fallback {
  font-size: 28px;
}
.client-banner .client-name {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.client-banner .client-name small {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.client-banner .client-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.client-banner .client-name small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

/* ====== Login page ====== */
.login-wrap {
  max-width: 460px;
  margin: 80px auto;
  padding: 44px 40px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-wrap .logo-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: block;
}
.login-wrap h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.login-wrap p.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.login-wrap form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-wrap input {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  transition: all 0.2s ease;
}
.login-wrap input::placeholder {
  color: rgba(199, 207, 219, 0.6);
}
.login-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16);
}
.login-wrap button {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
}
.login-wrap button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4), 0 0 22px rgba(251, 191, 36, 0.28);
}
.login-wrap button:disabled {
  filter: grayscale(0.5);
  cursor: wait;
  transform: none;
}
.login-msg {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
  line-height: 1.5;
}
.login-msg.success {
  color: var(--success);
}
.login-msg.error {
  color: #fca5a5;
}
.login-footer {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(199, 207, 219, 0.7);
}

/* ====== Stats ====== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px 26px;
  border-radius: var(--radius);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.32s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at 70% 0%, rgba(251, 191, 36, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 0 28px rgba(251, 191, 36, 0.14);
}
.stat-card:hover::before {
  opacity: 1;
}
.stat-num {
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.stat-card.green .stat-num {
  color: var(--success);
}
.stat-card.orange .stat-num {
  color: var(--accent);
}
.stat-card.red .stat-num {
  color: var(--danger);
}

/* ====== Filters ====== */
.filters {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  font-size: 14px;
  transition: all 0.2s ease;
}
.search-input::placeholder {
  color: rgba(199, 207, 219, 0.55);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.07);
}
.filter-btn {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}
.filter-btn.active {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}
.filter-btn .btn-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  display: inline-block;
}

/* === Select dropdown filtre mois === */
.filter-select {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath fill='%23c7cfdb' d='M5 6L0 0h10z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}
.filter-select-month {
  padding-left: 38px;
  background-image:
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3e%3cpath fill='%23c7cfdb' d='M5 6L0 0h10z'/%3e%3c/svg%3e"),
    url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3e%3cline x1='16' y1='2' x2='16' y2='6'/%3e%3cline x1='8' y1='2' x2='8' y2='6'/%3e%3cline x1='3' y1='10' x2='21' y2='10'/%3e%3c/svg%3e");
  background-position: right 14px center, 14px center;
  background-size: 10px 6px, 16px 16px;
}
.filter-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
}
.filter-select:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-select option {
  background: var(--bg);
  color: var(--text);
}

/* ====== Table dossiers ====== */
.dossier-table {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  overflow: hidden;
}
.dossier-row {
  padding: 12px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 2fr 1.4fr 0.9fr 1.1fr 0.9fr 0.9fr 40px;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: background 0.24s ease, transform 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.24s ease;
  position: relative;
}
.dossier-row:not(.header):hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
  box-shadow: inset 4px 0 0 var(--accent);
}
.dossier-row:last-child {
  border-bottom: none;
}
.dossier-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.dossier-row.header {
  background: rgba(0, 0, 0, 0.2);
  cursor: default;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.dossier-row.header:hover {
  background: rgba(0, 0, 0, 0.2);
}
.dossier-name {
  font-weight: 600;
  color: var(--text);
}
.dossier-addr {
  font-size: 13px;
  color: var(--muted);
}
.dossier-numdp {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.empty-state {
  padding: 64px 24px;
  text-align: center;
  color: var(--muted);
}

/* === En-tête de mois quand grouped === */
.month-header {
  padding: 18px 22px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.month-header:first-child {
  border-top: none;
}
.month-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.month-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.empty-state h2 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

/* ====== Badges ====== */
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.24s ease;
}
.dossier-row:hover .badge { transform: scale(1.04); }
.badge.accord {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.32);
}
.badge.encours {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.32);
}
.badge.incomplet {
  background: rgba(251, 191, 36, 0.18);
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.4);
}
.badge.refus {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.32);
}
.badge.attente {
  background: rgba(199, 207, 219, 0.12);
  color: var(--muted);
  border: 1px solid rgba(199, 207, 219, 0.22);
}
.badge.probleme {
  background: rgba(236, 72, 153, 0.18);
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.32);
}
.files-count {
  font-size: 13px;
  color: var(--muted);
}
.arrow {
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.dossier-row:hover .arrow {
  transform: translateX(8px);
}

/* ====== Camembert délai tacite ====== */
.tacite-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tacite-ring { overflow: visible; shape-rendering: geometricPrecision; }
/* Contour blanc autour de l'anneau : lisible sur photo, en jour comme en nuit */
.tacite-ring .ring-halo {
  fill: none;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 5.6;
}
.tacite-ring .ring-bg {
  fill: none;
  stroke: rgba(16, 35, 66, 0.18);
  stroke-width: 3.2;
}
.tacite-ring .ring-fg {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}
.tacite-ring.ring-progress .ring-fg { stroke: var(--accent); }
.tacite-ring.ring-progress {
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.45));
}
.tacite-ring.ring-full .ring-fg { stroke: #f97316; }
.tacite-ring.ring-full {
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.55));
}
.tacite-ring.ring-done .ring-fg { stroke: #22c55e; }
.tacite-ring.ring-done {
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.55));
}
.tacite-date {
  font-size: 14px;
}
/* Badge ABF (Architectes des Bâtiments de France) — visible uniquement quand le dossier est en zone ABF */
.tacite-abf {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: #fca5a5;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  cursor: help;
}
.statut-with-ring {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* ====== Détail dossier ====== */
.breadcrumb {
  margin-bottom: 18px;
  margin-left: 156px;
  font-size: 14px;
}
.breadcrumb a {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
}
@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.detail-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  padding: 30px 32px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.32s ease;
  animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.detail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.0) 0%, rgba(251, 191, 36, 0.25) 50%, rgba(251, 191, 36, 0.0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.32s ease;
  pointer-events: none;
}
.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 32px rgba(251, 191, 36, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}
.detail-card:hover::before {
  opacity: 1;
}
.detail-card:nth-child(1) { animation-delay: 0.05s; }
.detail-card:nth-child(2) { animation-delay: 0.12s; }
.detail-card:nth-child(3) { animation-delay: 0.19s; }
.detail-card:nth-child(4) { animation-delay: 0.26s; }

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

.detail-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  /* Bandeau d'en-tête foncé qui s'étend jusqu'aux bords de la carte */
  margin: -30px -32px 22px -32px;
  padding: 18px 32px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.detail-card h3 .card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
  flex-shrink: 0;
}
.detail-card h3 .card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  color: var(--muted);
}
.info-value {
  font-weight: 500;
  color: var(--text);
}
.info-value .badge {
  font-size: 11px;
}

/* ====== Timeline ====== */
.timeline {
  margin-top: 12px;
}
.timeline-step {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  position: relative;
}
.step-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
  color: var(--muted);
}
.step-icon.done {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.step-icon.current {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  border-color: var(--accent);
  animation: pulse 2.4s infinite;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4), 0 0 24px rgba(251, 191, 36, 0.5);
  transform: scale(1.1);
}
.step-icon.pending {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(199, 207, 219, 0.5);
}
.step-icon.problem {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
  font-weight: 700;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
  }
}
.step-content {
  flex: 1;
}
.step-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.step-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 44px;
  height: calc(100% - 28px);
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

/* ====== Files ====== */
.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 14px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.28s ease, border-color 0.28s ease,
              box-shadow 0.28s ease;
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 191, 36, 0.32);
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}
.file-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.file-icon.jpg,
.file-icon.jpeg,
.file-icon.png {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}
.file-icon.zip {
  background: linear-gradient(180deg, #6b7280, #4b5563);
}
.file-icon.doc,
.file-icon.docx {
  background: linear-gradient(180deg, #1e40af, #1e3a8a);
}
.file-info {
  flex: 1;
  overflow: hidden;
}
.file-name {
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta {
  font-size: 11px;
  color: var(--muted);
}
.file-download {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  transition: all 0.18s ease;
}
.file-download:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

/* ====== Capsules de téléchargement ====== */
.capsules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.capsule {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.32s ease, border-color 0.32s ease,
              box-shadow 0.32s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.capsule-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  flex-shrink: 0;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.capsule-label {
  flex: 1;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.005em;
}
/* Badge ×N à côté du label quand la catégorie contient plusieurs fichiers */
.capsule-count {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
/* Variante "bouton télécharger" quand c'est un <button> (multi-files) */
button.capsule-dl {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  padding: 0;
}
.capsule-state {
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.capsule-active {
  cursor: pointer;
  border-color: rgba(251, 191, 36, 0.32);
}
.capsule-active::after {
  content: '';
  position: absolute;
  top: 50%; right: -50%;
  width: 50%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateY(-50%) skewX(-20deg);
  transition: right 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.capsule-active:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32), 0 0 24px rgba(251, 191, 36, 0.25);
  text-decoration: none;
}
.capsule-active:hover .capsule-icon {
  transform: scale(1.12) rotate(-3deg);
}
.capsule-active:hover::after {
  right: 150%;
}
.capsule-active .capsule-icon {
  background: rgba(251, 191, 36, 0.16);
}
.capsule-active .capsule-state {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}
.capsule-pending {
  opacity: 0.55;
}
.capsule-pending .capsule-state {
  background: rgba(199, 207, 219, 0.12);
  color: var(--muted);
  border: 1px solid rgba(199, 207, 219, 0.18);
}

/* ====== Upload ====== */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 36px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-zone.uploading {
  opacity: 0.6;
  cursor: wait;
}
.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  color: var(--accent);
  opacity: 0.85;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.upload-icon svg {
  width: 100%;
  height: 100%;
}
.upload-zone:hover .upload-icon {
  transform: translateY(-4px) scale(1.08);
  opacity: 1;
  filter: drop-shadow(0 6px 16px rgba(251, 191, 36, 0.35));
}
.upload-zone.dragover .upload-icon {
  transform: translateY(-6px) scale(1.15);
  opacity: 1;
  filter: drop-shadow(0 8px 22px rgba(251, 191, 36, 0.6));
  animation: uploadBounce 0.6s ease-in-out infinite alternate;
}
@keyframes uploadBounce {
  from { transform: translateY(-6px) scale(1.15); }
  to { transform: translateY(-10px) scale(1.18); }
}
.upload-text {
  font-size: 14px;
  color: var(--muted);
}
.upload-text strong {
  color: var(--accent);
}
.upload-msg {
  margin-top: 10px;
  font-size: 12px;
  min-height: 16px;
}
.upload-msg.success {
  color: var(--success);
}
.upload-msg.error {
  color: #fca5a5;
}

/* ====== Loader ====== */
.loader {
  text-align: center;
  padding: 80px;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ====== Responsive table ====== */
@media (max-width: 768px) {
  .portal-header {
    padding: 12px 18px;
  }
  .portal-body {
    padding: 0 16px;
  }
  .dossier-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .dossier-row.header {
    display: none;
  }
  .arrow {
    display: none;
  }
  .welcome h1 {
    font-size: 26px;
  }
}

/* ====== Mode admin ====== */
#admin-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.admin-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-pill {
  background: rgba(17, 24, 39, 0.85);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-text {
  font-size: 14px;
}
.admin-text strong {
  font-weight: 700;
}
.admin-back {
  margin-left: auto;
  color: #111827;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.1);
  transition: background 0.15s;
}
.admin-back:hover {
  background: rgba(17, 24, 39, 0.2);
}

/* Grille des clients (page /admin/clients) */
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.client-card {
  display: block;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.client-card:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
  background: rgba(255, 255, 255, 0.12);
}
.client-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 6px;
}
.client-card-total {
  font-size: 13px;
  color: #c7cfdb;
  margin-bottom: 12px;
}
.client-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.client-card-stats .badge {
  font-size: 11px;
  padding: 3px 8px;
}


/* ====== CTA Nouveau dossier ====== */
.new-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.new-cta-row .new-cta { margin-bottom: 0; height: 100%; }
@media (max-width: 760px) {
  .new-cta-row { grid-template-columns: 1fr; }
}
/* Variante bleue pour la 2e démarche (hors DP) */
.new-cta-alt {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.04));
  border-color: rgba(59, 130, 246, 0.30);
}
.new-cta-alt::before {
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.14), transparent);
}
.new-cta-alt:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
}
.new-cta-alt .new-cta-icon {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}
.new-cta-alt .new-cta-arrow { color: #3b82f6; }
/* Variante en colonne pour listes de choix longs (cas Consuel) */
.radio-row-col { flex-direction: column; align-items: stretch; }
.radio-row-col .radio-pill span { display: block; text-align: left; }

.new-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.28);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.new-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
.new-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.18);
}
.new-cta:hover::before { transform: translateX(100%); }
.new-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.32);
}
.new-cta-icon svg { width: 24px; height: 24px; stroke-width: 2.6; }
.new-cta-text { flex: 1; }
.new-cta-text strong { display: block; font-size: 16px; color: var(--text); }
.new-cta-text small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.new-cta-arrow {
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.new-cta:hover .new-cta-arrow { transform: translateX(6px); }

/* ====== Formulaire Nouvelle DP ====== */
.new-form { display: block; }
.new-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 980px) {
  .new-grid { grid-template-columns: 1fr; }
}
.new-col { display: flex; flex-direction: column; gap: 22px; }
.field-group { margin-bottom: 16px; }
.field-group:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.field-label .req { color: var(--accent); }
.field-label .opt, .opt {
  display: none;
}
/* Annotation visible (cas précis qu'on veut garder à l'écran) */
.note-inline {
  color: rgba(199, 207, 219, 0.55);
  font-weight: 400;
  font-size: 12px;
}
.field-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}
.field-input::placeholder { color: rgba(199, 207, 219, 0.45); }
.field-hint {
  font-size: 12px;
  color: rgba(199, 207, 219, 0.55);
  margin-top: 6px;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-pill {
  cursor: pointer;
  position: relative;
}
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 13px;
  color: var(--muted);
  transition: all 0.2s ease;
}
.radio-pill:hover span {
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--text);
}
.radio-pill input:checked + span {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  color: #111827;
  font-weight: 600;
}

/* Pilule "Forfait complet" : toujours mise en avant (ambre), pleine quand cochée */
.radio-pill--forfait span {
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: var(--accent);
  font-weight: 700;
}
.radio-pill--forfait:hover span {
  border-color: var(--accent);
  color: var(--accent);
}
.radio-pill--forfait input:checked + span {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  color: #111827;
}

/* ====== Alerte "nouveaux dossiers à traiter" (admin) ====== */
@keyframes citaskBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.blink { animation: citaskBlink 1.1s ease-in-out infinite; }
.alert-new {
  display: block;
  background: linear-gradient(180deg, #ff6d3b, #e0532a);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(224, 83, 42, 0.35);
}
.badge.a-traiter { background: #ff6d3b; color: #fff; font-weight: 800; border: none; }
.client-card.has-new {
  border-color: rgba(255, 109, 59, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 109, 59, 0.55), 0 10px 30px rgba(224, 83, 42, 0.25);
}

/* ====== Choix du forfait ====== */
.forfait-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.forfait-choice--3 { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.forfait-choice--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .forfait-choice--4 { grid-template-columns: repeat(2, 1fr); } .forfait-choice--4 .forfait-card--star { transform: none; } }
.forfait-card--incomp .forfait-card-icon { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: var(--muted); }
@media (max-width: 900px) { .forfait-choice--3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .forfait-choice { grid-template-columns: 1fr; } }
.forfait-card { position: relative; }
.forfait-choice--3 .forfait-card--star {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.55), 0 18px 40px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(245, 158, 11, 0.05));
  transform: translateY(-6px);
}
.forfait-choice--3 .forfait-card--star:hover { transform: translateY(-9px); }
.forfait-choice--3 .forfait-card--star strong { color: var(--accent); font-size: 19px; }
.forfait-choice--3 .forfait-card--star .forfait-go { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #111827; border-color: var(--accent); }
.forfait-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #111827;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.forfait-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 24px; border-radius: 18px; text-decoration: none;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.forfait-card:hover { transform: translateY(-3px); border-color: rgba(251, 191, 36, 0.5); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.forfait-card--star { border-color: rgba(251, 191, 36, 0.5); background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(245, 158, 11, 0.04)); }
.forfait-card-head { display: flex; align-items: center; justify-content: space-between; }
.forfait-card-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12)); border: 1px solid rgba(251, 191, 36, 0.32); color: var(--accent); }
.forfait-card-icon svg { width: 22px; height: 22px; }
.forfait-price { font-size: 20px; font-weight: 800; color: var(--accent); }
.forfait-card strong { font-size: 17px; }
.forfait-card small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.forfait-go { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--accent); font-size: 14px; }
.forfait-choice--3 .forfait-go { display: inline-block; align-self: flex-start; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(251, 191, 36, 0.45); margin-top: 12px; }
.forfait-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ====== Panneau "Accès externes" (admin only) ====== */
.access-card { margin-bottom: 22px; }
.access-admin-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: #111827; background: linear-gradient(180deg, var(--accent), var(--accent-2));
  padding: 2px 8px; border-radius: 999px; margin-left: 8px;
}
.access-hint { font-size: 13px; color: var(--muted); margin: 0 0 16px 0; }
.access-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 900px) { .access-grid { grid-template-columns: 1fr; } }
.access-svc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px; padding: 14px;
}
.access-svc-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; color: var(--text); margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.access-open { font-size: 12px; font-weight: 700; color: var(--accent); text-decoration: none; }
.access-open:hover { text-decoration: underline; }
.access-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.access-l { color: var(--muted); width: 84px; flex-shrink: 0; }
.access-v { color: var(--text); font-weight: 600; word-break: break-all; flex: 1; }
.access-copy {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text); border-radius: 7px; cursor: pointer; font-size: 13px;
  width: 26px; height: 26px; flex-shrink: 0; line-height: 1;
}
.access-copy:hover { border-color: var(--accent); color: var(--accent); }
.access-empty { font-size: 12px; color: var(--muted); font-style: italic; }

/* ====== Trame en accordéon + récap collé (page nouvelle demande / complétion) ====== */
.demande-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 980px) {
  .demande-layout { grid-template-columns: 1fr; }
}
.demande-main { min-width: 0; }
.accordion { display: flex; flex-direction: column; gap: 14px; }
.acc-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: rgba(0, 0, 0, 0.28);
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.2s ease;
}
.acc-head:hover { background: rgba(0, 0, 0, 0.36); }
.acc-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.32);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}
.acc-icon svg { width: 18px; height: 18px; stroke: var(--accent); }
.acc-title { flex: 1; }
.acc-chevron { color: var(--muted); transition: transform 0.25s ease; font-size: 13px; }
.acc-item.open .acc-chevron { transform: rotate(180deg); color: var(--accent); }
.acc-body { display: none; padding: 20px; }
.acc-item.open .acc-body { display: block; animation: accFade 0.25s ease; }
@keyframes accFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.acc-body .field-group:last-child { margin-bottom: 0; }

.demande-recap { position: sticky; top: 20px; }
@media (max-width: 980px) {
  .demande-recap { position: static; }
}
.recap-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
}
.recap-card h3 {
  font-size: 17px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px 0; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.recap-card h3 .card-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.32);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent);
}
.recap-card h3 .card-icon svg { width: 16px; height: 16px; stroke: var(--accent); }
.recap-content { margin-bottom: 16px; }
.recap-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.recap-row:last-child { border-bottom: none; }
.recap-l { color: var(--muted); flex-shrink: 0; }
.recap-v { color: var(--text); font-weight: 600; text-align: right; }
.recap-empty { color: var(--muted); font-size: 13px; font-style: italic; margin: 0 0 16px 0; }
.recap-submit { width: 100%; justify-content: center; position: relative; }

/* Effet "comète" qui trace la bordure du bouton (repris du site Citask), toutes les 7 s */
.recap-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 3px;
  border-radius: inherit;
  pointer-events: none;
  --sweep-long-start: 232px;
  --sweep-cross-start: 86px;
  --sweep-head-far-start: 195px;
  --sweep-head-near-start: 37px;
  --sweep-cross-half-start: 43px;
  --sweep-long-slim: 132px;
  --sweep-cross-slim: 30px;
  --sweep-head-far-slim: 111px;
  --sweep-head-near-slim: 21px;
  --sweep-cross-half-slim: 15px;
  --trace-opacity: 1;
  --comet-right:
    radial-gradient(ellipse 26% 78% at 94% 50%, rgba(255,255,255,1) 0%, rgba(252,253,255,.96) 18%, rgba(205,228,255,.62) 38%, rgba(205,228,255,0) 64%),
    radial-gradient(ellipse 52% 40% at 74% 50%, rgba(225,242,255,.48) 0%, rgba(205,228,255,.22) 50%, rgba(205,228,255,0) 88%),
    radial-gradient(ellipse 110% 16% at 38% 50%, rgba(200,225,255,.26) 0%, rgba(190,220,255,.10) 50%, rgba(190,220,255,0) 92%);
  --comet-down:
    radial-gradient(ellipse 78% 26% at 50% 94%, rgba(255,255,255,1) 0%, rgba(252,253,255,.96) 18%, rgba(205,228,255,.62) 38%, rgba(205,228,255,0) 64%),
    radial-gradient(ellipse 40% 52% at 50% 74%, rgba(225,242,255,.48) 0%, rgba(205,228,255,.22) 50%, rgba(205,228,255,0) 88%),
    radial-gradient(ellipse 16% 110% at 50% 38%, rgba(200,225,255,.26) 0%, rgba(190,220,255,.10) 50%, rgba(190,220,255,0) 92%);
  --comet-left:
    radial-gradient(ellipse 26% 78% at 6% 50%, rgba(255,255,255,1) 0%, rgba(252,253,255,.96) 18%, rgba(205,228,255,.62) 38%, rgba(205,228,255,0) 64%),
    radial-gradient(ellipse 52% 40% at 26% 50%, rgba(225,242,255,.48) 0%, rgba(205,228,255,.22) 50%, rgba(205,228,255,0) 88%),
    radial-gradient(ellipse 110% 16% at 62% 50%, rgba(200,225,255,.26) 0%, rgba(190,220,255,.10) 50%, rgba(190,220,255,0) 92%);
  --comet-up:
    radial-gradient(ellipse 78% 26% at 50% 6%, rgba(255,255,255,1) 0%, rgba(252,253,255,.96) 18%, rgba(205,228,255,.62) 38%, rgba(205,228,255,0) 64%),
    radial-gradient(ellipse 40% 52% at 50% 26%, rgba(225,242,255,.48) 0%, rgba(205,228,255,.22) 50%, rgba(205,228,255,0) 88%),
    radial-gradient(ellipse 16% 110% at 50% 62%, rgba(200,225,255,.26) 0%, rgba(190,220,255,.10) 50%, rgba(190,220,255,0) 92%);
  background: var(--comet-right);
  background-repeat: no-repeat;
  background-size: var(--sweep-long-start) var(--sweep-cross-start);
  background-position: calc(0% - var(--sweep-head-far-start)) calc(0% - var(--sweep-cross-half-start));
  opacity: 0;
  filter: drop-shadow(0 0 16px rgba(255,255,255,1)) drop-shadow(0 0 34px rgba(186,222,255,.7));
  will-change: background-position, opacity;
  animation: premium-border-trace 7s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
@keyframes premium-border-trace {
  0% { opacity: 0; background: var(--comet-right); background-repeat: no-repeat; background-size: var(--sweep-long-start) var(--sweep-cross-start); background-position: calc(0% - var(--sweep-head-far-start)) calc(0% - var(--sweep-cross-half-start)); }
  3% { opacity: var(--trace-opacity); background-size: var(--sweep-long-start) var(--sweep-cross-start); background-position: calc(0% - var(--sweep-head-far-start)) calc(0% - var(--sweep-cross-half-start)); }
  5.2% { opacity: var(--trace-opacity); background-size: var(--sweep-long-slim) var(--sweep-cross-slim); background-position: calc(44% - var(--sweep-head-far-slim)) calc(0% - var(--sweep-cross-half-slim)); }
  7.5% { background: var(--comet-right); background-repeat: no-repeat; background-size: var(--sweep-long-slim) var(--sweep-cross-slim); background-position: calc(100% + var(--sweep-head-near-slim)) calc(0% - var(--sweep-cross-half-slim)); }
  7.51% { background: var(--comet-down); background-repeat: no-repeat; background-size: var(--sweep-cross-slim) var(--sweep-long-slim); background-position: calc(100% + var(--sweep-cross-half-slim)) calc(0% - var(--sweep-head-far-slim)); }
  14% { background-size: var(--sweep-cross-slim) var(--sweep-long-slim); background-position: calc(100% + var(--sweep-cross-half-slim)) calc(100% + var(--sweep-head-near-slim)); }
  14.01% { background: var(--comet-left); background-repeat: no-repeat; background-size: var(--sweep-long-slim) var(--sweep-cross-slim); background-position: calc(100% + var(--sweep-head-far-slim)) calc(100% + var(--sweep-cross-half-slim)); }
  21% { background-size: var(--sweep-long-slim) var(--sweep-cross-slim); background-position: calc(0% - var(--sweep-head-near-slim)) calc(100% + var(--sweep-cross-half-slim)); }
  21.01% { background: var(--comet-up); background-repeat: no-repeat; background-size: var(--sweep-cross-slim) var(--sweep-long-slim); background-position: calc(0% - var(--sweep-cross-half-slim)) calc(100% + var(--sweep-head-far-slim)); }
  28% { opacity: var(--trace-opacity); background-size: var(--sweep-cross-slim) var(--sweep-long-slim); background-position: calc(0% - var(--sweep-cross-half-slim)) calc(0% - var(--sweep-head-near-slim)); }
  32%, 100% { opacity: 0; background-position: calc(0% - var(--sweep-cross-half-slim)) calc(0% - var(--sweep-head-near-slim)); }
}
@media (prefers-reduced-motion: reduce) {
  .recap-submit::before { animation: none; }
}

/* Slots de documents */
.docslot {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
  overflow: hidden;
}
.docslot:hover { border-color: rgba(251, 191, 36, 0.5); }
.docslot.filled {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
  border-style: solid;
}
.docslot-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.docslot-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.25s ease;
}
.docslot.filled .docslot-check {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.docslot-head strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}
.docslot-head small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.docslot-input { display: none; }
.docslot-state {
  padding: 0 14px 12px 54px;
  font-size: 12px;
  color: var(--accent);
}
.docslot:not(.filled) .docslot-state { display: none; }

/* Actions */
.new-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}
.form-progress { font-size: 13px; color: var(--muted); }
.progress-text strong { color: var(--accent); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.28);
}
.btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-primary svg { width: 16px; height: 16px; }
.form-msg {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  display: none;
}
.form-msg.info { display: block; background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.form-msg.success { display: block; background: rgba(34, 197, 94, 0.12); color: #86efac; }
.form-msg.error { display: block; background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.form-msg.warning { display: block; background: rgba(251, 146, 60, 0.14); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.3); }

/* Card de checklist : titre plus tassé pour bien voir tous les slots */
.checklist-card .docslot:last-of-type { margin-bottom: 0; }

/* ====== Avancement en 3 colonnes (1 par forfait) ====== */
.forfait-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .forfait-grid { grid-template-columns: 1fr; }
}

.forfait-col {
  padding: 16px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.forfait-col:hover {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

/* Color-coding des 3 blocs d'avancement : DP (ambre) · Raccordement (bleu) · Consuel (vert) */
.forfait-col { border-top: 3px solid rgba(255, 255, 255, 0.10); }
.forfait-col--dp { border-top-color: var(--accent); }
.forfait-col--racco { border-top-color: #3b82f6; }
.forfait-col--consuel { border-top-color: #22c55e; }
.forfait-col--racco:hover { border-color: rgba(59, 130, 246, 0.45); }
.forfait-col--consuel:hover { border-color: rgba(34, 197, 94, 0.45); }
.forfait-col--dp .forfait-title { color: var(--accent); }
.forfait-col--racco .forfait-title { color: #60a5fa; }
.forfait-col--consuel .forfait-title { color: #4ade80; }
.forfait-col--racco .forfait-num {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.32);
}
.forfait-col--consuel .forfait-num {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.32);
}

.forfait-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.forfait-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111827;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.32);
}
.forfait-head strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.forfait-head small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

/* Timeline plus compact à l'intérieur des forfaits */
.timeline-compact { padding-left: 0; }
.timeline-compact .timeline-step {
  padding: 8px 0;
  gap: 10px;
}
.timeline-compact .step-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.timeline-compact .step-title {
  font-size: 13px;
  font-weight: 600;
}
.timeline-compact .step-date {
  font-size: 11px;
  margin-top: 1px;
}

/* === Override : titre forfait simple aligné avec les étapes en dessous === */
.forfait-head {
  gap: 10px;
}
.forfait-num {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.forfait-title {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* === Lignes "fichiers attachés" sous chaque slot (multi-fichiers) === */
.docslot-state {
  padding: 0 14px 12px 54px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.docslot:not(.filled) .docslot-state { display: none; }
.docfile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.docfile-name {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  word-break: break-word;
  flex: 1;
}
.docfile-size {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

/* Astérisque "obligatoire" générique (pas seulement dans .field-label) */
.req {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}

/* ====== Bouton œil (aperçu) ====== */
.file-eye,
.capsule-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin-right: 8px;
  flex-shrink: 0;
}
.file-eye:hover,
.capsule-eye:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: scale(1.08);
}
.file-eye svg,
.capsule-eye svg { width: 16px; height: 16px; }

.capsule-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* ====== Modale d'aperçu ====== */
.preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 28, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: previewFadeIn 0.18s ease;
}
@keyframes previewFadeIn { from { opacity: 0; } to { opacity: 1; } }

.preview-modal {
  width: min(1100px, 100%);
  height: min(92vh, 1000px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.preview-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  margin-right: 16px;
}
.preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.preview-dl,
.preview-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.preview-dl { color: var(--accent); }
.preview-dl:hover,
.preview-close:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: scale(1.06);
}

.preview-body {
  flex: 1;
  background: #0a0e16;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

/* === Liste de fichiers (quand une catégorie a plusieurs documents) === */
.filelist-modal {
  width: min(640px, 96vw);
  max-height: 80vh;
  height: auto;
}
.filelist-body {
  background: rgba(11, 16, 28, 0.6);
  padding: 12px;
  display: block;
  align-items: stretch;
  justify-content: stretch;
}
.filelist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.filelist-row:last-child { margin-bottom: 0; }
.filelist-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(251, 191, 36, 0.35);
}
.filelist-idx {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.18);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.filelist-name {
  flex: 1;
  font-size: 13.5px;
  color: #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.filelist-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.filelist-actions .file-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease;
}
.filelist-actions .file-eye:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.5);
}
.filelist-actions .file-eye svg {
  width: 14px;
  height: 14px;
}
.filelist-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0e16;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.filelist-dl:hover { filter: brightness(1.1); }
.filelist-dlall {
  background: var(--accent);
  color: #0a0e16;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
  margin-right: 6px;
  letter-spacing: 0.02em;
  transition: filter 0.15s ease;
}
.filelist-dlall:hover { filter: brightness(1.1); }

/* === Boutons œil + ✕ dans les fichiers déposés === */
.docfile-eye,
.docfile-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}
.docfile-eye {
  color: var(--accent);
  margin-right: 4px;
}
.docfile-eye svg { width: 12px; height: 12px; stroke-width: 2.2; }
.docfile-eye:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  transform: scale(1.1);
}
.docfile-remove {
  color: #fca5a5;
  font-size: 12px;
  line-height: 1;
}
.docfile-remove:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #ef4444;
}

/* Fallback aperçu PDF si le navigateur refuse */
.preview-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px;
  color: var(--text);
  text-align: center;
  background: #0a0e16;
  height: 100%;
}
.preview-fallback p { color: var(--muted); }

/* Loader pendant le fetch du PDF en blob */
.pdf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: 100%;
  width: 100%;
  background: #0a0e16;
  color: var(--muted);
}
.pdf-loading p { font-size: 14px; }

/* ====== Page Activité admin ====== */
.activity-row {
  grid-template-columns: 1.5fr 2fr 1.2fr 0.8fr 1.3fr 1.2fr !important;
}
.activity-date {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}
.activity-email {
  color: var(--accent);
  font-size: 13px;
  word-break: break-all;
}
.activity-ua {
  color: var(--muted);
  font-size: 12px;
}
.activity-ip {
  color: rgba(199, 207, 219, 0.55);
  font-size: 12px;
  font-family: monospace;
}
.muted { color: rgba(199, 207, 219, 0.45); }


/* ====== Nav admin (remplace le bandeau Mode admin) ====== */
.admin-nav { position: sticky; top: 0; z-index: 100; background: #0f1626; border-bottom: 1px solid rgba(255,255,255,0.08); box-shadow: 0 2px 14px rgba(0,0,0,0.3); }
.admin-nav-inner { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.an-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #f9fafb; font-weight: 700; font-size: 15px; }
.an-brand img { width: 30px; height: 30px; border-radius: 8px; background: #fff; padding: 2px; }
.an-brand b { color: #fbbf24; font-weight: 800; }
.an-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: 6px; }
.an-tab { text-decoration: none; color: #c7cfdb; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.an-tab:hover { background: rgba(255,255,255,0.07); color: #f9fafb; }
.an-tab.active { background: rgba(251,191,36,0.16); color: #fbbf24; }
.an-logout { margin-left: auto; color: #c7cfdb; text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 13px; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; }
.an-logout:hover { background: rgba(255,255,255,0.08); color: #f9fafb; }
@media (max-width: 680px){ .an-brand span { display: none; } }

/* ===== Pages d'un même document : repliées sous leur parent =====
   Les envois arrivent parfois page par page (cinquante lignes pour un seul PDF).
   Le groupe se comporte comme une ligne de fichier, dépliable d'un clic. */
.file-group { margin-bottom: 10px; }
.file-group-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.28s ease, border-color 0.28s ease;
}
.file-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 191, 36, 0.32);
}
.file-group-toggle[aria-expanded="true"] {
  border-color: rgba(251, 191, 36, 0.45);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.file-icon.multi {
  background: linear-gradient(180deg, #64748b, #475569);
  font-size: 13px;
}
.file-group-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  flex-shrink: 0;
}
.file-group-body {
  padding: 10px 0 2px 22px;
  border-left: 2px solid rgba(251, 191, 36, 0.28);
  margin-left: 18px;
}
.file-group-body .file-item { margin-bottom: 8px; }

/* ===== « Tout télécharger » : documents Citask uniquement ===== */
.detail-card h3 .citask-dl-all,
.citask-dl-all {
  margin-left: auto;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1f2937;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.citask-dl-all:hover { filter: brightness(1.08); transform: translateY(-1px); }
.citask-dl-all:disabled { filter: grayscale(0.4); cursor: default; transform: none; }

/* ====== Dépôt guidé (nouvelle DP) : pop-up une question par écran + récapitulatif ====== */
.wizard-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(8, 14, 28, 0.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: previewFadeIn 0.18s ease;
}
.wizard-overlay[hidden] { display: none; }
.wizard {
  width: 100%; max-width: 640px; max-height: calc(100vh - 40px); overflow: auto;
  background: linear-gradient(180deg, #1f2d44, #182336);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 22px; padding: 26px 28px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.wizard-progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.wizard-progress-bar { display: block; height: 100%; width: 25%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s ease; }
.wizard-step-label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin: 12px 0 6px; font-weight: 700; }
.wizard-pane h2 { font-size: 24px; margin: 0 0 6px; color: var(--text); }
.wizard-optional {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.14);
}
.wizard-hint { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.5; }
.wizard-input { font-size: 18px; padding: 16px 18px; }
.wizard-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.wizard-spacer { flex: 1; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16); font-weight: 600; font-size: 14px; font-family: inherit;
  transition: all 0.2s ease;
}
.btn-ghost:hover { border-color: rgba(251, 191, 36, 0.5); color: var(--accent); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.wizard-drop { padding: 34px 20px; }
.wizard-drop.has-files { padding: 18px 20px; }
.upload-sub { font-size: 12px; color: var(--muted); margin-top: 8px; }
.wiz-filelist { margin-top: 10px; max-height: 180px; overflow: auto; }
.wiz-filelist .docfile-row, .recap-files .docfile-row { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); margin-bottom: 4px; }

.recap-form .recap-head { margin: 0 0 16px; }
.recap-form .recap-head h2 { margin: 0 0 4px; font-size: 22px; }
.recap-form .recap-head p { margin: 0; color: var(--muted); font-size: 14px; }
.recap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.recap-card--files, .recap-card--notes { grid-column: 1 / -1; }
@media (max-width: 900px) { .recap-grid { grid-template-columns: 1fr; } }
.recap-card h3 { display: flex; align-items: center; gap: 10px; }
.recap-edit {
  margin-left: auto; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-family: inherit;
  background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px; font-weight: 600; transition: all 0.2s ease;
}
.recap-edit:hover { color: var(--accent); border-color: rgba(251, 191, 36, 0.5); }
.recap-edit:disabled { opacity: 0.4; cursor: not-allowed; }
.recap-value { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.5; }
.recap-empty { color: var(--muted); font-size: 13px; font-weight: 400; }
.recap-count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.recap-files-actions { margin-top: 10px; }
.docfile-replace {
  padding: 3px 10px; border-radius: 999px; cursor: pointer; font-family: inherit; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px; font-weight: 600; transition: all 0.2s ease;
}
.docfile-replace:hover { color: var(--accent); border-color: rgba(251, 191, 36, 0.5); }
.docfile-replace:disabled, .docfile-remove:disabled { opacity: 0.4; cursor: not-allowed; }
@media (max-width: 600px) {
  .wizard { padding: 20px 18px 18px; border-radius: 18px; }
  .wizard-pane h2 { font-size: 20px; }
  .wizard-input { font-size: 16px; }
  .wizard-actions .btn-primary { flex: 1; justify-content: center; }
}

/* ====== « À fournir » : ce qui manque, tous dossiers confondus ====== */
.afournir-panel {
  margin: 0 0 22px; padding: 18px 22px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(245, 158, 11, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.afournir-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.afournir-head strong { display: block; font-size: 17px; color: var(--accent); }
.afournir-head small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.afournir-toggle {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.16); font-size: 13px; font-weight: 600;
}
.afournir-toggle:hover { border-color: var(--accent); color: var(--accent); }
.afournir-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 16px; }
.afournir-body[hidden] { display: none; }
.afournir-item { padding: 14px 16px; border-radius: 14px; background: rgba(24, 35, 54, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); }
.afournir-item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.afournir-name { color: var(--text); font-weight: 700; text-decoration: none; font-size: 15px; }
.afournir-name:hover { color: var(--accent); }
.afournir-ville { color: var(--muted); font-size: 12px; }
.afournir-go { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.afournir-go:hover { text-decoration: underline; }
.afournir-list { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--text-soft); }
.afournir-list li { margin: 2px 0; }
.afournir-list li::marker { color: var(--accent); }
.badge-afournir { background: rgba(251, 191, 36, 0.18); color: var(--accent); border: 1px solid rgba(251, 191, 36, 0.5); margin-left: 6px; }
.filter-btn--afournir { border-color: rgba(251, 191, 36, 0.5); color: var(--accent); }
.filter-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: #111827; font-size: 11px; font-weight: 800; text-align: center; }
.afournir-card { border-color: rgba(251, 191, 36, 0.55); background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.03)); }
.afournir-card h3 { color: var(--accent); }
.afournir-card-hint { font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
@media (max-width: 600px) { .afournir-body { grid-template-columns: 1fr; } .afournir-go { margin-left: 0; } }
/* L'attribut hidden doit gagner sur les display: des classes */
.btn-ghost[hidden], .recap-form[hidden], .wizard-pane[hidden], .afournir-body[hidden] { display: none !important; }

/* ====== Corriger le nom / l'adresse (fiche dossier) ====== */
.corriger-bloc { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, 0.12); }
.corriger-hint { font-size: 13px; color: var(--accent); margin: 0 0 10px; }
.corriger-btn { width: 100%; justify-content: center; }
.corriger-btn[hidden], .corriger-form[hidden] { display: none !important; }
.corriger-form { margin-top: 6px; }
.corriger-actions { display: flex; gap: 8px; margin-top: 4px; }
.corriger-actions .btn-primary { flex: 1; justify-content: center; }

/* ====== « À fournir » côté admin : catalogue cliquable ====== */
.afournir-admin-tag { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.afa-group { margin-top: 12px; }
.afa-group-title { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.afa-items { display: flex; flex-wrap: wrap; gap: 6px; }
.afa-item {
  padding: 6px 11px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 12px; text-align: left;
  background: rgba(255, 255, 255, 0.04); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.12); transition: all 0.15s ease;
}
.afa-item:hover { border-color: rgba(251, 191, 36, 0.5); color: var(--text); }
.afa-item.on { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #111827; border-color: var(--accent); font-weight: 700; }
.afa-item.afa-libre.on::after { content: ' ✕'; font-weight: 400; }
.afa-add { display: flex; gap: 8px; margin-top: 8px; }
.afa-add .field-input { flex: 1; }

/* =====================================================================
   MODE JOUR (html[data-theme="light"]) — mêmes composants, surfaces claires.
   Bascule automatique 7h → jour, 20h → nuit, et bouton dans l'en-tête (theme.js).
   ===================================================================== */
html[data-theme="light"] {
  --bg: #eef3f8;
  --bg-2: #e3ebf4;
  --card: rgba(255, 255, 255, 0.58);
  --card-border: rgba(255, 255, 255, 0.65);
  --card-hover: rgba(255, 255, 255, 0.78);
  --muted: #5b6b82;
  --text: #0f1e36;
  --text-soft: #243654;
  --accent: #e09a0c;
  --accent-2: #c7870a;
  --accent-dim: rgba(224, 154, 12, 0.14);
  color-scheme: light;
}
html[data-theme="light"] body { color: var(--text); background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
html[data-theme="light"] body.app-page {
  background:
    linear-gradient(180deg, rgba(238, 243, 248, 0.30) 0%, rgba(238, 243, 248, 0.48) 45%, rgba(238, 243, 248, 0.66) 100%),
    url('/assets/bg-day.jpg') center/cover no-repeat fixed;
}
html[data-theme="light"] body.login-page {
  background:
    linear-gradient(180deg, rgba(238, 243, 248, 0.55) 0%, rgba(238, 243, 248, 0.75) 100%),
    url('/assets/bg-day.jpg') center/cover no-repeat fixed;
}
html[data-theme="light"] .portal-header { background: rgba(255, 255, 255, 0.62); border-bottom-color: rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .user-info a.logout { border-color: rgba(16, 35, 66, 0.14); }
html[data-theme="light"] .logo-icon { border-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .welcome h1 { background: linear-gradient(135deg, #0f1e36 30%, #c7870a 100%); -webkit-background-clip: text; background-clip: text; }
html[data-theme="light"] .detail-card, html[data-theme="light"] .stat-card, html[data-theme="light"] .dossier-table,
html[data-theme="light"] .filters, html[data-theme="light"] .login-wrap, html[data-theme="light"] .acc-item,
html[data-theme="light"] .new-actions { box-shadow: 0 10px 30px rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .new-actions { background: rgba(255, 255, 255, 0.88); border-color: rgba(16, 35, 66, 0.10); }
html[data-theme="light"] .dossier-row { border-bottom-color: rgba(16, 35, 66, 0.07); }
html[data-theme="light"] .dossier-row.header { background: rgba(16, 35, 66, 0.04); }
html[data-theme="light"] .dossier-row:not(.header):hover { background: rgba(224, 154, 12, 0.06); }
html[data-theme="light"] .month-header { background: rgba(16, 35, 66, 0.04); border-color: rgba(16, 35, 66, 0.07); }
html[data-theme="light"] .acc-head { background: rgba(16, 35, 66, 0.05); }
html[data-theme="light"] .info-row { border-bottom-color: rgba(16, 35, 66, 0.07); }
html[data-theme="light"] .filter-btn, html[data-theme="light"] .filter-select, html[data-theme="light"] .search-input,
html[data-theme="light"] .field-input, html[data-theme="light"] .login-wrap input, html[data-theme="light"] .btn-ghost,
html[data-theme="light"] .radio-pill span, html[data-theme="light"] .recap-edit, html[data-theme="light"] .afournir-toggle,
html[data-theme="light"] .docfile-replace, html[data-theme="light"] .docfile-eye, html[data-theme="light"] .docfile-remove,
html[data-theme="light"] .afa-item, html[data-theme="light"] .file-group-toggle, html[data-theme="light"] .capsule,
html[data-theme="light"] .file-item, html[data-theme="light"] .filelist-row, html[data-theme="light"] .access-svc,
html[data-theme="light"] .forfait-col, html[data-theme="light"] .step-icon, html[data-theme="light"] .afournir-item,
html[data-theme="light"] .wiz-filelist .docfile-row, html[data-theme="light"] .recap-files .docfile-row {
  background: rgba(16, 35, 66, 0.04); border-color: rgba(16, 35, 66, 0.14);
}
html[data-theme="light"] .filter-btn.active { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #111827; border-color: transparent; }
html[data-theme="light"] .radio-pill input:checked + span { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #111827; border-color: #f59e0b; }
html[data-theme="light"] .afa-item.on { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #111827; border-color: #f59e0b; }
html[data-theme="light"] .field-input:focus, html[data-theme="light"] .search-input:focus, html[data-theme="light"] .login-wrap input:focus { background: #fff; border-color: var(--accent); }
html[data-theme="light"] .field-input::placeholder, html[data-theme="light"] .search-input::placeholder { color: rgba(91, 107, 130, 0.7); }
html[data-theme="light"] .btn-primary, html[data-theme="light"] .forfait-choice--3 .forfait-card--star .forfait-go {
  background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #111827;
}
html[data-theme="light"] .docslot, html[data-theme="light"] .upload-zone { border-color: rgba(16, 35, 66, 0.22); background: rgba(16, 35, 66, 0.03); }
html[data-theme="light"] .afournir-item { background: rgba(255, 255, 255, 0.75); }
html[data-theme="light"] .afournir-panel { background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(255, 255, 255, 0.6)); }
html[data-theme="light"] .afournir-card, html[data-theme="light"] .forfait-choice--3 .forfait-card--star { background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(255, 255, 255, 0.9)); }
html[data-theme="light"] .wizard-overlay { background: rgba(225, 233, 243, 0.78); }
html[data-theme="light"] .wizard { background: #fff; border-color: rgba(224, 154, 12, 0.45); box-shadow: 0 30px 80px rgba(16, 35, 66, 0.25); }
html[data-theme="light"] .wizard-progress { background: rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .wizard-optional { background: rgba(16, 35, 66, 0.06); border-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .notes-existing { background: rgba(16, 35, 66, 0.04) !important; border-color: rgba(16, 35, 66, 0.12) !important; }
html[data-theme="light"] #notes-text, html[data-theme="light"] #notes-cancel { background: rgba(16, 35, 66, 0.04) !important; border-color: rgba(16, 35, 66, 0.14) !important; color: var(--text) !important; }
html[data-theme="light"] #notes-add-btn { background: rgba(16, 35, 66, 0.03) !important; border-color: rgba(16, 35, 66, 0.2) !important; color: var(--text) !important; }
html[data-theme="light"] .badge.accord { background: rgba(34, 197, 94, 0.14); color: #15803d; border-color: rgba(34, 197, 94, 0.35); }
html[data-theme="light"] .badge.encours { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; border-color: rgba(37, 99, 235, 0.3); }
html[data-theme="light"] .badge.incomplet { color: #b45309; background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.4); }
html[data-theme="light"] .badge.refus { background: rgba(239, 68, 68, 0.12); color: #b91c1c; border-color: rgba(239, 68, 68, 0.3); }
html[data-theme="light"] .badge.attente { background: rgba(16, 35, 66, 0.06); color: var(--muted); border-color: rgba(16, 35, 66, 0.14); }
html[data-theme="light"] .badge-afournir { color: #b45309; background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.45); }
html[data-theme="light"] .spinner { border-color: rgba(16, 35, 66, 0.1); border-top-color: var(--accent); }
html[data-theme="light"] .corriger-bloc { border-top-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .afa-item { color: var(--text-soft); }
html[data-theme="light"] .docfile-remove { color: #b91c1c; }
html[data-theme="light"] .upload-sub, html[data-theme="light"] .field-hint { color: #6b7a90; }
html[data-theme="light"] .note-inline { color: #7b8899; }

/* Bouton jour / nuit dans l'en-tête */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 38px; height: 34px; margin-right: 10px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text); font-size: 16px; line-height: 1;
  transition: all 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.admin-nav .theme-toggle { margin-left: auto; margin-right: 10px; }
.admin-nav .theme-toggle + .an-logout { margin-left: 0; }
html[data-theme="light"] .theme-toggle { background: rgba(16, 35, 66, 0.04); border-color: rgba(16, 35, 66, 0.14); }
html[data-theme="light"] .detail-card h3 { background: rgba(16, 35, 66, 0.05); border-bottom-color: rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .afournir-card h3 { background: rgba(251, 191, 36, 0.18); }
html[data-theme="light"] .afournir-go { color: #b45309; }
html[data-theme="light"] .afournir-head strong, html[data-theme="light"] .afournir-card h3, html[data-theme="light"] .afournir-card-hint { color: #9a6b04; }
html[data-theme="light"] .afournir-list li::marker { color: #e09a0c; }

/* Anneau tacite : rendu net (pas de flou), halo et piste adaptés au thème */
.tacite-ring.ring-progress, .tacite-ring.ring-full, .tacite-ring.ring-done { filter: none; }
html:not([data-theme="light"]) .tacite-ring .ring-halo { stroke: rgba(255, 255, 255, 0.85); stroke-width: 5.4; }
html:not([data-theme="light"]) .tacite-ring .ring-bg { stroke: rgba(24, 35, 54, 0.35); }
html[data-theme="light"] .tacite-ring .ring-halo { stroke: #ffffff; stroke-width: 5.8; }
html[data-theme="light"] .tacite-ring .ring-bg { stroke: rgba(16, 35, 66, 0.16); }
html[data-theme="light"] .tacite-ring.ring-progress .ring-fg { stroke: #f0a30a; }

/* ====== Mode jour : pages admin ====== */
html[data-theme="light"] .admin-nav { background: rgba(255, 255, 255, 0.9); border-bottom-color: rgba(16, 35, 66, 0.1); box-shadow: 0 2px 14px rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .an-brand { color: var(--text); }
html[data-theme="light"] .an-brand b { color: #c7870a; }
html[data-theme="light"] .an-tab { color: var(--text-soft); }
html[data-theme="light"] .an-tab:hover { background: rgba(16, 35, 66, 0.06); color: var(--text); }
html[data-theme="light"] .an-tab.active { background: rgba(224, 154, 12, 0.16); color: #b45309; }
html[data-theme="light"] .an-logout { color: var(--text-soft); border-color: rgba(16, 35, 66, 0.16); }
html[data-theme="light"] .an-logout:hover { background: rgba(16, 35, 66, 0.06); color: var(--text); }
html[data-theme="light"] #admin-banner { color: #111827; }
html[data-theme="light"] .client-card-name, html[data-theme="light"] .acces-name, html[data-theme="light"] .res-name, html[data-theme="light"] .st-card h2,
html[data-theme="light"] .cli-name, html[data-theme="light"] .st-table .num-facture, html[data-theme="light"] .sv-name, html[data-theme="light"] .factu-table .name,
html[data-theme="light"] .ov-table .cli, html[data-theme="light"] .factu-total .nb { color: var(--text); }
html[data-theme="light"] .acces-count, html[data-theme="light"] .acces-intro, html[data-theme="light"] .acces-hint, html[data-theme="light"] .res-count, html[data-theme="light"] .res-meta,
html[data-theme="light"] .search-hint, html[data-theme="light"] .st-controls label, html[data-theme="light"] .st-kpi-lbl, html[data-theme="light"] .st-card .sub,
html[data-theme="light"] .st-table th, html[data-theme="light"] .sv-tile .l, html[data-theme="light"] .sv-bar, html[data-theme="light"] .sv-count, html[data-theme="light"] .sv-table th,
html[data-theme="light"] .sv-sub, html[data-theme="light"] .factu-controls label, html[data-theme="light"] .factu-table th, html[data-theme="light"] .factu-table .small,
html[data-theme="light"] .factu-head .factu-sub, html[data-theme="light"] .factu-footer, html[data-theme="light"] .factu-total .lbl, html[data-theme="light"] .ov-kpi-lbl,
html[data-theme="light"] .ov-title, html[data-theme="light"] .ov-table th, html[data-theme="light"] .fac-meta, html[data-theme="light"] .res-meta b { color: var(--muted); }
html[data-theme="light"] .acces-card, html[data-theme="light"] .res-card, html[data-theme="light"] .sv-tile, html[data-theme="light"] .sv-wrap, html[data-theme="light"] .chip,
html[data-theme="light"] .factu-controls, html[data-theme="light"] .ov-table, html[data-theme="light"] .ov-btn, html[data-theme="light"] .factu-controls button.secondary,
html[data-theme="light"] .cli-track, html[data-theme="light"] .fl.grey {
  background: rgba(16, 35, 66, 0.04); border-color: rgba(16, 35, 66, 0.14); color: var(--text-soft);
}
html[data-theme="light"] .res-card:hover, html[data-theme="light"] .sv-tile:hover, html[data-theme="light"] .ov-btn:hover { background: rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .sv-tile.on, html[data-theme="light"] .chip.on { background: rgba(251, 191, 36, 0.18); border-color: #e09a0c; color: #b45309; }
html[data-theme="light"] .sv-tile.grey .n { color: var(--text); }
html[data-theme="light"] .st-kpi, html[data-theme="light"] .st-card, html[data-theme="light"] .factu-doc, html[data-theme="light"] .ov-kpi {
  background: rgba(255, 255, 255, 0.9); border-color: rgba(16, 35, 66, 0.12); box-shadow: 0 10px 30px rgba(16, 35, 66, 0.08); color: var(--text);
}
html[data-theme="light"] .acces-row input[type=text], html[data-theme="light"] .search-box input, html[data-theme="light"] .st-controls select,
html[data-theme="light"] .sv-bar select, html[data-theme="light"] .sv-text, html[data-theme="light"] .factu-controls select, html[data-theme="light"] .factu-controls input[type="month"],
html[data-theme="light"] .fac-select, html[data-theme="light"] .fac-num, html[data-theme="light"] .ov-select {
  background: #fff; color: var(--text); border-color: rgba(16, 35, 66, 0.2); color-scheme: light;
}
html[data-theme="light"] .sv-bar select option { background: #fff; color: var(--text); }
html[data-theme="light"] .search-box input:focus { background: #fff; }
html[data-theme="light"] .st-table th, html[data-theme="light"] .st-table td, html[data-theme="light"] .sv-table th, html[data-theme="light"] .sv-table td,
html[data-theme="light"] .factu-table th, html[data-theme="light"] .factu-table td, html[data-theme="light"] .ov-table th, html[data-theme="light"] .ov-table td { border-bottom-color: rgba(16, 35, 66, 0.1); }
html[data-theme="light"] .sv-table tr:hover td { background: rgba(16, 35, 66, 0.04); }
html[data-theme="light"] .st-chart .grid { stroke: rgba(16, 35, 66, 0.1); }
html[data-theme="light"] .st-chart .axis { fill: var(--muted); }
html[data-theme="light"] .st-chart .val { fill: #92400e; }
html[data-theme="light"] .st-kpi.paid .st-kpi-num, html[data-theme="light"] .ov-kpi.paid .ov-kpi-num, html[data-theme="light"] .ov-kpi.paid .ov-kpi-sub, html[data-theme="light"] .st-badge.paye, html[data-theme="light"] .fac-select.paid, html[data-theme="light"] .ok, html[data-theme="light"] .acces-msg.ok, html[data-theme="light"] .fac-meta.saved, html[data-theme="light"] .ov-empty { color: #15803d; }
html[data-theme="light"] .st-kpi.wait .st-kpi-num, html[data-theme="light"] .ov-kpi.todo .ov-kpi-num, html[data-theme="light"] .ov-kpi.todo .ov-kpi-sub, html[data-theme="light"] .fac-select.todo, html[data-theme="light"] .ov-select.todo, html[data-theme="light"] .factu-chip.todo, html[data-theme="light"] .factu-warn, html[data-theme="light"] .ov-note, html[data-theme="light"] .ov-badge.todo, html[data-theme="light"] .fl.orange, html[data-theme="light"] .soon, html[data-theme="light"] .sv-tile.orange .n { color: #b45309; }
html[data-theme="light"] .st-kpi.nb .st-kpi-num, html[data-theme="light"] .ov-kpi.done .ov-kpi-num, html[data-theme="light"] .ov-kpi.done .ov-kpi-sub, html[data-theme="light"] .st-badge.emise, html[data-theme="light"] .fac-select.done, html[data-theme="light"] .ov-select.done, html[data-theme="light"] .factu-chip.done, html[data-theme="light"] .fl.blue, html[data-theme="light"] .sv-tile.blue .n { color: #1d4ed8; }
html[data-theme="light"] .st-kpi.ca .st-kpi-num, html[data-theme="light"] .cli-val, html[data-theme="light"] .factu-total .ht, html[data-theme="light"] .factu-head .factu-title, html[data-theme="light"] .res-client, html[data-theme="light"] .sv-client, html[data-theme="light"] .sv-act a, html[data-theme="light"] .sv-bar .reset { color: #b45309; }
html[data-theme="light"] .st-badge.retard, html[data-theme="light"] .fl.red, html[data-theme="light"] .ko, html[data-theme="light"] .late, html[data-theme="light"] .acces-msg.err, html[data-theme="light"] .fac-meta.error, html[data-theme="light"] .sv-tile.red .n { color: #b91c1c; }

/* ====== Urgent (signalé par l'installateur) ====== */
.badge-urgent { background: #dc2626; color: #fff; border: 1px solid #b91c1c; margin-right: 6px; animation: urgentPulse 1.8s ease-in-out infinite; }
@keyframes urgentPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55); } 50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0); } }
.dossier-row.is-urgent { box-shadow: inset 4px 0 0 #dc2626; background: rgba(220, 38, 38, 0.10); }
.dossier-row.is-urgent:hover { background: rgba(220, 38, 38, 0.16) !important; }
.dossier-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.urgent-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 14px;
  background: rgba(220, 38, 38, 0.10); color: #f87171; border: 1px solid rgba(220, 38, 38, 0.55); transition: all 0.2s ease;
}
.urgent-btn:hover { background: rgba(220, 38, 38, 0.2); }
.urgent-btn.on { background: #dc2626; color: #fff; border-color: #b91c1c; }
.urgent-btn:disabled { opacity: 0.5; cursor: wait; }
.urgent-banner { margin: 0 0 18px; padding: 12px 16px; border-radius: 14px; background: rgba(220, 38, 38, 0.14); border: 1px solid rgba(220, 38, 38, 0.55); color: #fca5a5; font-weight: 700; }
.urgent-form { margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid rgba(220, 38, 38, 0.45); }
.urgent-form[hidden] { display: none; }
.urgent-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.urgent-form-row .field-input { flex: 1 1 280px; }
.urgent-confirm { background: linear-gradient(180deg, #ef4444, #dc2626) !important; color: #fff !important; box-shadow: 0 8px 22px rgba(220, 38, 38, 0.3) !important; }
.urgent-check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(220, 38, 38, 0.5); cursor: pointer; }
.urgent-check input { width: 18px; height: 18px; accent-color: #dc2626; }
.urgent-check span { font-weight: 700; color: #f87171; }
.urgent-check small { color: var(--muted); font-size: 12px; flex-basis: 100%; padding-left: 26px; }
.urgent-check:has(input:checked) { background: rgba(220, 38, 38, 0.12); border-style: solid; }
html[data-theme="light"] .urgent-btn { color: #b91c1c; }
html[data-theme="light"] .urgent-btn.on { color: #fff; }
html[data-theme="light"] .urgent-banner { color: #991b1b; background: #fee2e2; }
html[data-theme="light"] .urgent-check span { color: #b91c1c; }
html[data-theme="light"] .dossier-row.is-urgent { background: #fef2f2; }
html[data-theme="light"] .dossier-row.is-urgent:hover { background: #fee2e2 !important; }
.client-card.has-urgent { border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626, 0 10px 26px rgba(220, 38, 38, 0.25); }
.badge.urgent-n { background: #dc2626; color: #fff; border: none; }
.alert-urgent { margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #dc2626; color: #fff; font-weight: 800; }

/* ====== Fin de chantier · DAACT (fiche dossier) ====== */
.daact-card.is-attente { border-color: rgba(251, 191, 36, 0.55); }
.daact-card h3 .daact-icon { font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.daact-chip { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.14); text-transform: none; letter-spacing: 0; }
.daact-lead { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 14px; }
.daact-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.daact-actions .btn-primary, .daact-actions .btn-ghost { text-decoration: none; }
.daact-go { font-size: 15px; }
.daact-etat { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.55; border: 1px solid; }
.daact-etat--attente { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.35); }
.daact-etat--ok { background: rgba(52, 211, 153, 0.10); border-color: rgba(52, 211, 153, 0.35); }
.daact-etat--ko { background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.35); }
.daact-delai { margin-top: 12px; }
.daact-delai p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.daact-delai-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.daact-delai-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.daact-delai.fini .daact-delai-bar span { background: #34d399; }
.daact-files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.daact-files a { color: var(--text); text-decoration: none; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daact-files a:hover { color: var(--accent); }
.daact-upload { cursor: pointer; }
.daact-admin { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, 0.16); }
.daact-admin-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.daact-admin .daact-actions { margin-top: 8px; }
.daact-depot-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.daact-depot-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.daact-depot-form .field-input { padding: 8px 10px; }
.daact-admin-statuts { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.daact-link { background: none; border: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.daact-link:hover { color: var(--accent); }
.daact-todo-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 10px; }
.daact-todo-head > b { font-size: 15px; }
.daact-modes { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.daact-mode { border: none; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.daact-mode.on { background: var(--accent); color: #1f2937; }
.daact-infos { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.daact-infos b { color: var(--text); }
.daact-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.daact-step { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.daact-step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--accent); color: #1f2937; }
.daact-step-body { min-width: 0; flex: 1; }
.daact-step-body > b, .daact-step-body .dm > b { font-size: 14px; }
.daact-step-body p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.daact-step-body .daact-actions { margin-top: 10px; }
.daact-step-body .daact-depot-form { margin-top: 10px; }
.daact-cerfa-ok { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--text); text-decoration: none; }
.daact-cerfa-ok:hover { color: var(--accent); }
html[data-theme="light"] .daact-modes { background: rgba(16, 35, 66, 0.05); border-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .daact-step { background: rgba(255, 255, 255, 0.65); border-color: rgba(16, 35, 66, 0.10); }
html[data-theme="light"] .daact-mode.on, html[data-theme="light"] .daact-step-n { background: #f59e0b; color: #fff; }
.daact-wizard { max-width: 720px; }
.daact-wizard h2 { font-size: 24px; margin: 0 0 6px; color: var(--text); }
.daact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 10px; }
@media (max-width: 640px) { .daact-grid { grid-template-columns: 1fr; } }
.daact-grid .field-group { display: grid; gap: 4px; margin: 0; }
.daact-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; cursor: pointer; line-height: 1.45; }
.daact-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.daact-atteste { padding: 12px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); }
.daact-type { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 10px; font-size: 14px; }
.daact-type label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.daact-preview { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.daact-preview a { color: var(--accent); }
.daact-frame { width: 100%; height: 460px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; margin-top: 12px; background: #fff; }
.badge-daact { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.45); margin-left: 6px; }
html[data-theme="light"] .daact-chip { background: rgba(16, 35, 66, 0.06); border-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .daact-etat--attente { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.4); }
html[data-theme="light"] .daact-etat--ok { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.35); }
html[data-theme="light"] .daact-etat--ko { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); }
html[data-theme="light"] .daact-delai-bar { background: rgba(16, 35, 66, 0.08); }
html[data-theme="light"] .daact-files a { background: rgba(16, 35, 66, 0.04); }
html[data-theme="light"] .daact-admin { border-top-color: rgba(16, 35, 66, 0.15); }
html[data-theme="light"] .daact-admin-title, html[data-theme="light"] .daact-preview a { color: #b45309; }
html[data-theme="light"] .daact-wizard h2 { color: #102342; }
html[data-theme="light"] .daact-frame { border-color: rgba(16, 35, 66, 0.15); }
html[data-theme="light"] .badge-daact { color: #047857; background: rgba(16, 185, 129, 0.12); }
/* En-tête sur téléphone : « Connecté en tant que » + thème + déconnexion débordaient de l'écran */
@media (max-width: 600px) {
  .portal-header { flex-wrap: wrap; gap: 8px; padding: 10px 16px; }
  .user-info { flex-wrap: wrap; gap: 8px; font-size: 13px; min-width: 0; max-width: 100%; }
  .user-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
}

/* Mode jour plus « verre » (09/10/2026) : cartes translucides comme en mode nuit, le fond reste visible ;
   un flou plus fort garde le texte lisible. */
html[data-theme="light"] .detail-card, html[data-theme="light"] .stat-card, html[data-theme="light"] .dossier-table,
html[data-theme="light"] .filters, html[data-theme="light"] .new-cta, html[data-theme="light"] .daact-band {
  backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-color: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .new-actions { background: rgba(255, 255, 255, 0.6); }
html[data-theme="light"] .dossier-row.header { background: rgba(255, 255, 255, 0.35); }
html[data-theme="light"] .dossier-row.is-urgent { background: rgba(254, 226, 226, 0.75); }

/* ====== DAACT dans la liste : bandeau de comptage + colonne ====== */
.daact-band {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between;
  margin: 0 0 18px; padding: 14px 20px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.daact-band-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.daact-band-icon { font-size: 22px; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(251, 191, 36, 0.16); flex: none; }
.daact-band-title strong { display: block; font-size: 15px; }
.daact-band-title small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.daact-band-counts { display: flex; gap: 10px; flex-wrap: wrap; }
.daact-count {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 9px 16px; border-radius: 14px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.daact-count b { font-size: 20px; font-weight: 800; line-height: 1; }
.daact-count:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(251, 191, 36, 0.6); }
.daact-count.is-zero { opacity: 0.45; cursor: default; }
.daact-count--todo b { color: #fbbf24; }
.daact-count--encours b { color: #93c5fd; }
.daact-count--done b { color: #34d399; }
.daact-count--ko b { color: #f87171; }
.daact-count.on { background: rgba(251, 191, 36, 0.18); border-color: var(--accent); }
.daact-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; text-decoration: none; }
.daact-pill--todo { color: #fbbf24; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.5); }
.daact-pill--todo:hover { background: rgba(251, 191, 36, 0.26); text-decoration: none; }
.daact-pill--encours { color: #93c5fd; background: rgba(96, 165, 250, 0.14); border-color: rgba(96, 165, 250, 0.4); }
.daact-pill--done { color: #6ee7b7; background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); }
.daact-pill--ko { color: #fca5a5; background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.4); }
.daact-pill--avant { color: var(--muted); font-weight: 600; opacity: 0.75; }
.daact-pill--none { color: var(--muted); opacity: 0.5; }
.daact-sub { display: block; margin-top: 4px; font-size: 11px; line-height: 1.3; color: var(--muted); white-space: nowrap; }
@media (max-width: 768px) { .daact-cell:has(.daact-pill--none), .daact-cell:has(.daact-pill--avant) { display: none; } }
.daact-card.daact-flash { animation: daactFlash 1.1s ease 2; }
@keyframes daactFlash { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.75), var(--shadow); } }
html[data-theme="light"] .daact-count { background: rgba(255, 255, 255, 0.55); border-color: rgba(16, 35, 66, 0.12); }
html[data-theme="light"] .daact-count.on { background: rgba(251, 191, 36, 0.22); border-color: #e09a0c; }
html[data-theme="light"] .daact-count--todo b, html[data-theme="light"] .daact-pill--todo { color: #b45309; }
html[data-theme="light"] .daact-count--encours b, html[data-theme="light"] .daact-pill--encours { color: #1d4ed8; }
html[data-theme="light"] .daact-count--done b, html[data-theme="light"] .daact-pill--done { color: #047857; }
html[data-theme="light"] .daact-count--ko b, html[data-theme="light"] .daact-pill--ko { color: #b91c1c; }
html[data-theme="light"] .daact-pill--todo { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.5); }
html[data-theme="light"] .daact-pill--encours { background: rgba(37, 99, 235, 0.10); border-color: rgba(37, 99, 235, 0.3); }
html[data-theme="light"] .daact-pill--done { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }

/* ====== Bouton « Vue client » (bandeau admin) ====== */
.vue-client-btn { border: 0; cursor: pointer; font-family: inherit; }
.admin-back--liste { margin-left: 0; }
#admin-banner.is-vue-client { background: linear-gradient(90deg, #2563eb, #60a5fa); color: #fff; }
#admin-banner.is-vue-client .admin-pill { background: rgba(255, 255, 255, 0.95); color: #1d4ed8; }
#admin-banner.is-vue-client .admin-text small { opacity: 0.85; font-weight: 500; }
#admin-banner.is-vue-client .admin-back { color: #fff; background: rgba(255, 255, 255, 0.2); }
#admin-banner.is-vue-client .admin-back:hover { background: rgba(255, 255, 255, 0.32); }
html[data-theme="light"] #admin-banner.is-vue-client { color: #fff; }
html.vue-client .admin-only { display: none !important; }

/* Aperçu du cerfa DAACT en grand */
.daact-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 14, 28, 0.82); display: flex; flex-direction: column; padding: 14px; gap: 10px; animation: previewFadeIn 0.15s ease; }
.daact-viewer-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #f9fafb; padding: 4px 6px; }
.daact-viewer-bar strong { font-size: 16px; }
.daact-viewer-bar span:not(.wizard-spacer) { font-size: 13px; color: #c7cfdb; }
.daact-viewer-bar .btn-ghost { color: #f9fafb; text-decoration: none; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.daact-viewer-frame { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }

.daact-recap { display: grid; gap: 0; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.daact-recap-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.daact-recap-row:last-child { border-bottom: 0; }
.daact-recap-row span { color: var(--muted); }
@media (max-width: 560px) { .daact-recap-row { grid-template-columns: 1fr; gap: 2px; } }
html[data-theme="light"] .daact-recap { border-color: rgba(16, 35, 66, 0.12); background: rgba(255, 255, 255, 0.5); }
html[data-theme="light"] .daact-recap-row { border-bottom-color: rgba(16, 35, 66, 0.08); }

/* Redessin silencieux (version fraîche après l'affichage depuis le cache) : pas de fondu d'apparition */
html.sans-anim .detail-card { animation: none !important; }

/* ====== DAACT à déposer (admin) ====== */
.alert-daact { display: block; margin: 0 0 14px; padding: 13px 18px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #111827; text-decoration: none;
  background: linear-gradient(180deg, #fbbf24, #f59e0b); box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35); }
.alert-daact:hover { filter: brightness(1.05); text-decoration: none; }
.badge.daact-n { background: #fbbf24; color: #111827; font-weight: 800; border: none; }
.client-card.has-daact { border-color: rgba(251, 191, 36, 0.85); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.6), 0 10px 30px rgba(245, 158, 11, 0.22); }
.daact-count--citask { border-color: rgba(251, 191, 36, 0.8) !important; background: rgba(251, 191, 36, 0.2) !important; }

/* Icône DAACT (document + maison solaire + coche) */
.ico-daact { width: 1.35em; height: 1.35em; vertical-align: -0.32em; margin-right: 0.35em; object-fit: contain; flex: none; }
.daact-band-icon .ico-daact { width: 30px; height: 30px; margin: 0; vertical-align: middle; }
.daact-card h3 .daact-icon .ico-daact { width: 26px; height: 26px; margin: 0; }
.daact-pill .ico-daact { width: 1.5em; height: 1.5em; margin-right: 0.3em; }
.daact-go .ico-daact { width: 1.5em; height: 1.5em; }

/* ====== Liste des dossiers : en-têtes lisibles, colonnes centrées, lignes bien séparées (09/10/2026) ====== */
.dossier-row.header { font-size: 13.5px; letter-spacing: 0.06em; color: var(--text-soft); font-weight: 800; padding-top: 14px; padding-bottom: 14px; border-bottom: 2px solid rgba(255, 255, 255, 0.14); }
/* Envoi DP, Tacite, Statut, DAACT : titre et contenu centrés dans la colonne */
.dossier-row > div:nth-child(3), .dossier-row > div:nth-child(4), .dossier-row > div:nth-child(5), .dossier-row > div:nth-child(6) { justify-self: center; text-align: center; }
.dossier-row > .tacite-cell { display: flex; justify-content: center; }
.dossier-row > div:nth-child(5) { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dossier-row > div:nth-child(5) .badge { margin-left: 0; margin-right: 0; }
.dossier-row.header > div:nth-child(5) { display: block; }
#rows .dossier-row { border-bottom: 1px solid rgba(255, 255, 255, 0.13); }
#rows .dossier-row:nth-child(even) { background: rgba(255, 255, 255, 0.035); }
html[data-theme="light"] .dossier-row.header { background: rgba(16, 35, 66, 0.07); color: #243654; border-bottom-color: rgba(16, 35, 66, 0.16); }
html[data-theme="light"] #rows .dossier-row { border-bottom-color: rgba(16, 35, 66, 0.14); }
html[data-theme="light"] #rows .dossier-row:nth-child(even) { background: rgba(16, 35, 66, 0.035); }
html[data-theme="light"] #rows .dossier-row.is-urgent { background: rgba(254, 226, 226, 0.75); }
@media (max-width: 768px) {
  .dossier-row > div:nth-child(3), .dossier-row > div:nth-child(4), .dossier-row > div:nth-child(5), .dossier-row > div:nth-child(6) { justify-self: start; text-align: left; }
  .dossier-row > .tacite-cell { justify-content: flex-start; }
  .dossier-row > div:nth-child(5) { flex-direction: row; flex-wrap: wrap; }
}

/* Titre en dégradé (background-clip: text) : le dégradé s'arrêtait à la ligne de base,
   les jambages (g, p, y…) sortaient de la zone peinte et paraissaient coupés. */
.welcome h1 { padding-bottom: 0.14em; margin-bottom: calc(10px - 0.14em); }

/* « À fournir » : document qui répond aux questions techniques */
.afournir-doc { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(52, 211, 153, 0.10); border: 1px solid rgba(52, 211, 153, 0.35); font-size: 13.5px; line-height: 1.5; }
.afournir-doc-txt { flex: 1; min-width: 260px; }
.afournir-doc ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 2px; font-weight: 600; }
.afournir-doc-btn { flex: none; }
.afournir-alt { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.afournir-alt::before { content: '📎 '; }
html[data-theme="light"] .afournir-doc { background: rgba(16, 185, 129, 0.08); border-color: rgba(16, 185, 129, 0.35); }

/* ====== Relance mairie (admin) ====== */
.info-adresse { font-weight: 700; color: var(--text); }
.rl-btn { border: 1px solid rgba(96, 165, 250, 0.6); background: rgba(37, 99, 235, 0.14); color: #93c5fd; font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.rl-btn:hover { background: rgba(37, 99, 235, 0.25); }
html[data-theme="light"] .rl-btn { color: #1d4ed8; background: #dbeafe; border-color: #93c5fd; }
html.rl-open, html.rl-open body { overflow: hidden; }
.rl-overlay { position: fixed; inset: 0; z-index: 950; background: rgba(8, 14, 28, 0.7); display: flex; align-items: flex-start; justify-content: center; padding: 18px; overflow: auto; animation: previewFadeIn 0.15s ease; }
.rl { --rl-bg: #172235; --rl-bg2: #1e2b42; --rl-line: rgba(255,255,255,0.10); --rl-text: #f3f6fa; --rl-muted: #9fb0c6;
  width: 100%; max-width: 1180px; background: var(--rl-bg); color: var(--rl-text); border: 1px solid var(--rl-line); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.5); overflow: hidden; }
html[data-theme="light"] .rl { --rl-bg: #ffffff; --rl-bg2: #f3f6fa; --rl-line: rgba(16,35,66,0.12); --rl-text: #0f1e36; --rl-muted: #5b6b82; }
.rl-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--rl-line); background: var(--rl-bg2); }
.rl-head h2 { margin: 2px 0; font-size: 24px; color: var(--rl-text); }
.rl-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3b82f6; }
.rl-sub { color: var(--rl-muted); font-size: 13.5px; }
.rl-sit { margin-left: auto; font-weight: 800; font-size: 13px; padding: 7px 12px; border-radius: 10px; border: 1px solid; white-space: nowrap; }
.rl-sit--retard { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
.rl-sit--instruction, .rl-sit--inconnu { color: #1e40af; background: #dbeafe; border-color: #93c5fd; }
.rl-sit--incompl { color: #9a3412; background: #ffedd5; border-color: #fdba74; }
.rl-sit--accord { color: #047857; background: #d1fae5; border-color: #6ee7b7; }
.rl-sit--refus { color: #374151; background: #f3f4f6; border-color: #d1d5db; }
.rl-x { border: 0; background: transparent; color: var(--rl-muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }
.rl-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; }
@media (max-width: 900px) { .rl-body { grid-template-columns: 1fr; } }
.rl-col { padding: 16px 22px 20px; }
.rl-col + .rl-col { border-left: 1px solid var(--rl-line); }
.rl-title { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rl-muted); margin: 14px 0 8px; }
.rl-title:first-child { margin-top: 0; }
.rl-title small { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 6px; opacity: .8; }
.rl-infos { border: 1px solid var(--rl-line); border-radius: 12px; overflow: hidden; }
.rl-row { display: grid; grid-template-columns: 175px 1fr 20px; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--rl-line); font-size: 14px; align-items: center; }
.rl-row:last-child { border-bottom: 0; }
.rl-row span { color: var(--rl-muted); font-size: 12.5px; }
.rl-row b { font-weight: 700; }
.rl-row i { font-style: normal; color: var(--rl-muted); opacity: 0; }
.rl-row.copiable { cursor: pointer; }
.rl-row.copiable:hover { background: var(--rl-bg2); }
.rl-row.copiable:hover i { opacity: 1; }
.rl-row.copie, .rl-script.copie { background: rgba(16, 185, 129, 0.15) !important; }
.rl-script { padding: 12px 14px; border-radius: 12px; background: rgba(59, 130, 246, 0.10); border: 1px solid rgba(59, 130, 246, 0.35); font-size: 14px; line-height: 1.55; }
/* « Ce que je dis » est une zone de texte modifiable (15/11/2026) */
textarea.rl-script { display: block; width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; font-family: inherit; color: inherit; outline: none; }
textarea.rl-script:focus { border-color: rgba(59, 130, 246, 0.8); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.rl-outils { float: right; display: inline-flex; gap: 6px; text-transform: none; letter-spacing: 0; }
.rl-mini { font: 600 11.5px/1 inherit; padding: 4px 8px; border-radius: 7px; border: 1px solid rgba(100, 116, 139, 0.35); background: transparent; color: inherit; cursor: pointer; }
.rl-mini:hover { border-color: rgba(59, 130, 246, 0.7); }
.rl-histo { max-height: 220px; overflow: auto; border: 1px solid var(--rl-line); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; line-height: 1.5; color: var(--rl-muted); background: var(--rl-bg2); }
.rl-h.fort { color: var(--rl-text); font-weight: 600; }
.rl-mairie { border: 1px solid var(--rl-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.rl-tel { font-size: 22px; font-weight: 800; color: #2563eb; text-decoration: none; }
.rl-m { display: grid; grid-template-columns: 70px 1fr; gap: 8px; font-size: 13.5px; }
.rl-m span { color: var(--rl-muted); font-size: 12.5px; }
.rl-m a { color: #2563eb; word-break: break-all; }
.rl-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rl-btns .btn-ghost { text-decoration: none; font-size: 13px; padding: 8px 12px; color: var(--rl-text); }
.rl-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.rl-doc { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--rl-line); background: var(--rl-bg2); color: var(--rl-text); text-decoration: none; font-weight: 700; font-size: 13px; }
.rl-doc:hover { border-color: #e09a0c; }
button.rl-doc { cursor: pointer; font-family: inherit; }
.rl-doc small { font-weight: 600; color: var(--rl-muted); font-size: 11.5px; }
/* courrier de la mairie : vignette + œil (16/11/2026) */
.rl-courriers { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2px; }
.rl-vig { display: flex; gap: 12px; align-items: stretch; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid #e09a0c66; background: var(--rl-bg2); color: var(--rl-text); cursor: pointer; font-family: inherit; flex: 1 1 300px; min-width: 0; }
.rl-vig:hover { border-color: #e09a0c; box-shadow: 0 0 0 2px #e09a0c33; }
.rl-vig-img { position: relative; flex: none; width: 118px; height: 158px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid var(--rl-line); display: flex; align-items: center; justify-content: center; }
.rl-vig-img iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #fff; }
.rl-vig-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.rl-vig-att { font-size: 34px; opacity: .55; }
.rl-vig-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; justify-content: center; }
.rl-vig-txt b { font-size: 14px; }
.rl-vig-txt small { color: var(--rl-muted); font-size: 11.5px; word-break: break-all; }
.rl-vig-txt em { font-style: normal; font-weight: 700; font-size: 13px; color: #e09a0c; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.rl-vig-txt em svg, .rl-piece svg { width: 16px; height: 16px; flex: none; }
.rl-sans-courrier { width: 100%; }
.rl-piece { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 0 5px 12px; border: 0; background: transparent; color: #2563eb; cursor: pointer; font-family: inherit; font-size: 13px; }
.rl-piece span { word-break: break-all; }
.rl-piece:hover span { text-decoration: underline; }
.rl-client { width: 100%; margin-top: 4px; font-size: 13px; }
.rl-client summary { cursor: pointer; color: var(--rl-muted); font-weight: 700; }
.rl-client a { display: block; padding: 4px 0 4px 12px; color: #2563eb; word-break: break-all; }
.rl-vide { color: var(--rl-muted); font-size: 13px; }
.rl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rl-chip { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rl-line); background: var(--rl-bg2); color: var(--rl-text); cursor: pointer; }
.rl-chip:hover { border-color: #3b82f6; }
.rl .field-input { width: 100%; background: var(--rl-bg2); color: var(--rl-text); border-color: var(--rl-line); }
.rl-save { display: flex; align-items: center; gap: 12px; margin-top: 8px; }

/* Délai tacite dépassé sans décision : date et nombre de jours en rouge (liste + fiche) */
.tacite-date.is-late { color: #f87171; font-weight: 700; }
.tacite-retard { display: inline-flex; align-items: center; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(220, 38, 38, 0.16); border: 1px solid rgba(220, 38, 38, 0.5); color: #fca5a5; font-size: 11.5px; font-weight: 800; white-space: nowrap; cursor: help; }
html[data-theme="light"] .tacite-date.is-late { color: #dc2626; }
html[data-theme="light"] .tacite-retard { background: #fee2e2; border-color: #f87171; color: #b91c1c; }
/* Badge ABF : texte lisible en mode jour (il ressortait rose sur rose, pastille vide) */
html[data-theme="light"] .tacite-abf { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.tacite-date { white-space: nowrap; }
.dossier-row > .tacite-cell { flex-direction: column; align-items: center; gap: 4px; }
.tacite-retard-line { display: inline-block; }
.tacite-cell .tacite-retard { margin-left: 0; }
@media (max-width: 768px) { .dossier-row > .tacite-cell { align-items: flex-start; } }

/* Fichiers déposés par le client, pas encore vus par l'admin (Clients, liste, Suivi, fiche) */
.alert-nonvus { display: block; margin: 0 0 14px; padding: 13px 18px; border-radius: 14px; font-weight: 800; font-size: 15px; color: #083344; text-decoration: none; background: linear-gradient(90deg, #67e8f9, #a5f3fc); box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25); }
.alert-nonvus:hover { filter: brightness(1.04); text-decoration: none; }
.badge.nonvus-n, .badge.badge-nonvus { background: #22d3ee; color: #083344; font-weight: 800; border: none; }
.badge.badge-nonvus { margin-left: 6px; }
.client-card.has-nonvus { border-color: rgba(34, 211, 238, 0.9); box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.6), 0 10px 30px rgba(8, 145, 178, 0.22); }
.nonvus-box { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(34, 211, 238, 0.14); border: 1px solid rgba(34, 211, 238, 0.55); font-size: 13.5px; }
.nonvus-box ul { margin: 6px 0 0; padding-left: 18px; }
.nonvus-box li span { color: var(--muted); font-size: 12px; }
html[data-theme="light"] .nonvus-box { background: #ecfeff; border-color: #67e8f9; color: #083344; }

.rl-mlab { display: block; font-size: 11.5px; color: var(--rl-muted); margin-top: 2px; }

/* ====== Envoi d'un nouveau dossier : fenêtre au centre avec le décompte des fichiers ====== */
.envoi-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 14, 26, 0.62); backdrop-filter: blur(3px); }
.envoi-box { width: min(460px, 100%); padding: 30px 28px 26px; border-radius: 20px; background: #fff; color: #0f1e36; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.envoi-spin { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid rgba(245, 158, 11, 0.25); border-top-color: #f59e0b; animation: envoi-tourne 0.9s linear infinite; }
@keyframes envoi-tourne { to { transform: rotate(360deg); } }
.envoi-titre { margin: 0 0 12px; font-size: 21px; line-height: 1.3; color: #0f1e36; }
.envoi-count { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.envoi-count b { font-size: 64px; line-height: 1; font-weight: 900; color: #f59e0b; }
.envoi-count span { font-size: 30px; font-weight: 800; color: #0f1e36; }
.envoi-count small { font-size: 15px; color: #5b6b82; margin-left: 4px; }
.envoi-bar { height: 10px; border-radius: 999px; background: rgba(16, 35, 66, 0.08); overflow: hidden; }
.envoi-bar span { display: block; height: 100%; background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width 0.3s; }
.envoi-file { min-height: 1.4em; margin: 10px 0 0; font-size: 13px; color: #5b6b82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envoi-warn { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #fef3c7; color: #92400e; font-weight: 700; font-size: 14px; }
.envoi-fin p { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: #334155; }
.envoi-overlay.is-ok .envoi-titre { color: #047857; }
.envoi-overlay.is-ok .envoi-count b, .envoi-overlay.is-ok .envoi-count span { color: #047857; }
.envoi-overlay.is-ok .envoi-bar span { background: #10b981; }
.envoi-overlay.is-warn .envoi-titre { color: #b45309; }

/* Récap du nouveau dossier : on voit qu'il n'est PAS encore envoyé, et le bouton d'envoi reste à l'écran */
.recap-pas-envoye { display: grid; gap: 4px; margin-top: 10px; padding: 12px 16px; border-radius: 12px; background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(245, 158, 11, 0.55); font-size: 14px; line-height: 1.5; }
.recap-pas-envoye strong { font-size: 15px; color: #b45309; }
html[data-theme="dark"] .recap-pas-envoye strong { color: #fbbf24; }
.recap-form .new-actions { position: sticky; bottom: 12px; z-index: 20; }
.form-progress .progress-text b { color: #b45309; }
html[data-theme="dark"] .form-progress .progress-text b { color: #fbbf24; }
.recap-form .new-actions { background: rgba(15, 23, 37, 0.94); backdrop-filter: blur(6px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
html[data-theme="light"] .recap-form .new-actions { background: rgba(255, 255, 255, 0.96); }

/* Carte « Espace de test » (client Test) en bas de la page Clients */
.client-test { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 16px; border: 1.5px dashed rgba(148, 163, 184, 0.6); border-radius: 14px; color: var(--muted); text-decoration: none; max-width: 520px; }
.client-test:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.client-test b { display: block; color: var(--text); font-size: 14px; }
.client-test small { font-size: 12px; }
.client-test-ico { font-size: 22px; }
.client-test-go { margin-left: auto; }

/* Passerelle vers DP Studio (fiche admin) */
.dossier-action-btn.studio-btn { background: #182336; color: #fff; border-color: #182336; }
.dossier-action-btn.studio-btn:hover { background: #24334f; color: #fff; }
.dossier-action-btn.studio-btn img { width: 20px; height: 20px; border-radius: 50%; }

/* ====== Parcours du dossier (fiche, admin) + fenêtre « Prévenir le client » ====== */
.parcours-card { margin-bottom: 18px; }
.parcours-card .pc-admin { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #b45309; background: rgba(251, 191, 36, 0.18); padding: 3px 8px; border-radius: 999px; }
.pc-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.pc-step { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.pc-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: rgba(148, 163, 184, 0.25); color: var(--muted); }
.pc-step.ok .pc-dot { background: #10b981; color: #fff; }
.pc-step.ko .pc-dot { background: #ef4444; color: #fff; }
.pc-step.ko:not(.ok) { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22); }
.pc-step.ko:not(.ok) .pc-i { color: #dc2626; font-weight: 700; }
.pc-step.cur { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
.pc-step.cur .pc-dot { background: #f59e0b; color: #fff; }
.pc-step.att .pc-dot { background: #f97316; color: #fff; }
.pc-t { font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.pc-i { font-size: 11px; color: var(--muted); line-height: 1.3; }
.pc-next { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); }
.pc-next.pc-fini { background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.4); display: block; font-size: 14px; }
.pc-next-txt { display: grid; gap: 3px; font-size: 14px; min-width: 0; flex: 1; }
.pc-next-txt span { font-size: 13px; color: var(--muted); }
.pc-next-act, .pc-autres-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid #f59e0b; background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1f2937; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pc-btn.ghost { background: transparent; color: var(--text); border-color: rgba(148, 163, 184, 0.5); }
.pc-btn:hover { text-decoration: none; filter: brightness(1.05); }
/* 13/11/2026 : l'accord, c'est la récompense — bouton vert, gros, en premier */
.pc-btn.pc-win { background: linear-gradient(180deg, #22c55e, #16a34a); border-color: #15803d; color: #fff; font-size: 15px; padding: 11px 20px; box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35); }
.pc-btn.pc-relance { background: #dc2626; border-color: #b91c1c; color: #fff; }
.pc-step.fac { opacity: 0.55; }
.pc-step.win { background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.06)); border-color: #22c55e; }
.pc-autres { margin-top: 12px; font-size: 13px; }
.pc-autres summary { cursor: pointer; color: var(--muted); }
.pc-autres-btns { margin-top: 10px; }
.pc-histo { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.pc-vide { margin: 10px 0 0; color: var(--muted); }
.pc-modal { max-width: 680px; }
.pc-modal h2 { margin: 2px 0 10px; font-size: 22px; }
.pc-field { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pc-field small { font-weight: 400; }
.pc-field textarea { font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; min-height: 220px; }
.pc-avert, .pc-deja { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(245, 158, 11, 0.45); font-size: 13px; }
.pc-deja { background: rgba(239, 68, 68, 0.10); border-color: rgba(239, 68, 68, 0.4); }
.pc-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.pc-err { color: #dc2626; }
.pc-fait { text-align: center; padding: 10px 0; }
.pc-fait-ic { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: #10b981; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; }
.pc-fait p { color: var(--muted); }
html[data-theme="light"] .pc-step { background: rgba(255, 255, 255, 0.7); border-color: rgba(16, 35, 66, 0.10); }
html[data-theme="light"] .pc-step.cur { border-color: #f59e0b; }
.pc-field input, .pc-field textarea { font-weight: 400; color: var(--text); }

/* Lien DP Studio : filet quand l'application ne s'est pas ouverte */
#dpsFilet { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; background: #182336; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; gap: 12px; align-items: center; }
#dpsFilet[hidden] { display: none; }
#dpsFilet a { color: #fbbf24; font-weight: 700; }
#dpsFilet button { background: none; border: 0; color: #cbd5e1; cursor: pointer; font-size: 14px; }

/* urgent : motif obligatoire, sous la case */
.urgent-raison { margin-top: 8px; border-color: rgba(220, 38, 38, 0.55); }
.urgent-raison[hidden] { display: none; }

/* Type de pièce au dépôt */
.docfile-cat { max-width: 190px; min-width: 0; font-size: 12px; padding: 3px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; }
.docfile-cat option, #upload-cat option { color: #111; }
.upload-cat-l { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 100%; }
#upload-cat { flex: 1 1 160px; min-width: 0; max-width: 100%; padding: 6px 8px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; }
#upload-cat.manque { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.upload-cat-ok { padding: 4px 12px; font-size: 12px; margin-left: 4px; }

/* « Ce qu'il me manque » : réponse courte sur une ligne */
.afournir-rep-btn { margin-left: 8px; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(251,191,36,.6); background: transparent; color: #fbbf24; cursor: pointer; }
.afournir-rep-form { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.afournir-rep-form[hidden] { display: none; }
.afournir-rep-form input { flex: 1 1 180px; min-width: 0; padding: 6px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; }
.afournir-rep-form .btn-primary { padding: 5px 14px; font-size: 12.5px; }
.afournir-rep { display: block; margin-top: 3px; font-size: 12.5px; color: #34d399; }

/* Revue des pièces par Citask : statut sur chaque pièce, compteurs, demandes réglées (base = mode nuit, puis mode jour) */
.piece-st { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.4; vertical-align: middle; border: 1px solid transparent; }
.piece-st--ok { background: rgba(52, 211, 153, 0.16); color: #34d399; border-color: rgba(52, 211, 153, 0.45); }
.piece-st--ko { background: rgba(248, 113, 113, 0.16); color: #fca5a5; border-color: rgba(248, 113, 113, 0.5); }
.piece-st--attente { background: rgba(255, 255, 255, 0.08); color: var(--muted); border-color: rgba(255, 255, 255, 0.16); }
.piece-compteur, .afournir-compteur { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; flex-wrap: wrap; }
.file-revue { margin-top: 4px; }
.file-item--ko { border-color: rgba(248, 113, 113, 0.5) !important; background: rgba(248, 113, 113, 0.07); }
.file-item--ok { border-color: rgba(52, 211, 153, 0.45) !important; }
.afournir-list--reglees li { color: var(--muted); }
.afournir-list--reglees s { opacity: .75; }
.afournir-regle { font-size: 12px; color: #34d399; margin-left: 6px; }
html[data-theme="light"] .piece-st--ok { background: rgba(5, 150, 105, 0.12); color: #047857; border-color: rgba(5, 150, 105, 0.4); }
html[data-theme="light"] .piece-st--ko { background: rgba(220, 38, 38, 0.1); color: #b91c1c; border-color: rgba(220, 38, 38, 0.4); }
html[data-theme="light"] .piece-st--attente { background: rgba(15, 23, 42, 0.06); color: #475569; border-color: rgba(15, 23, 42, 0.14); }
html[data-theme="light"] .file-item--ko { background: #fff5f5; }
html[data-theme="light"] .afournir-regle { color: #047857; }

/* Raccordement : ce qu'on attend (faits datés DP Studio) sous la colonne Raccordement */
.racco-attente { margin: 8px 0 0; font-size: 12.5px; color: #475569; padding: 6px 10px; border-radius: 8px; background: rgba(148, 163, 184, .12); }
.racco-attente.ambre { color: #b45309; background: rgba(245, 158, 11, .14); }
.racco-attente.rouge { color: #b91c1c; background: rgba(239, 68, 68, .14); font-weight: 600; }

/* Documents mis à disposition par Citask (à signer / à retourner) — carte À fournir */
.afournir-docs { border: 1px solid rgba(37, 99, 235, 0.25); background: rgba(37, 99, 235, 0.06); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.afournir-docs-t { font-weight: 800; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.afournir-docs-n { font-size: 11px; font-weight: 800; background: #2563eb; color: #fff; border-radius: 999px; padding: 1px 7px; }
.afournir-docs ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.afournir-docs li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.afournir-docs-nom { font-weight: 600; flex: 1; min-width: 160px; }
.afournir-docs-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.afournir-docs-lien { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #2563eb; text-decoration: none; }
.afournir-docs-lien:hover { text-decoration: underline; }

.afa-racco-hint { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.afa-racco-hint a { color: #2563eb; font-weight: 700; text-decoration: none; }
.afa-racco-hint a:hover { text-decoration: underline; }

.afa-studio { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.afa-studio .btn-primary { text-decoration: none; }


/* ====== Barre admin unifiée (11/2026) ======
   Sur une page client vue en admin (liste des dossiers d'un client, fiche), la barre d'onglets des pages admin remplace
   le bandeau jaune « Mode admin ». #admin-banner garde son identifiant (impression, tests), mais prend l'habit de .admin-nav. */
#admin-banner.admin-nav { background: #0f1626; color: #f9fafb; font-weight: 400; box-shadow: 0 2px 14px rgba(0,0,0,0.3); }
html[data-theme="light"] #admin-banner.admin-nav { background: rgba(255, 255, 255, 0.92); color: #111827; box-shadow: 0 2px 14px rgba(16, 35, 66, 0.08); }
body.has-admin-nav .portal-header { display: none; }
.admin-nav-inner { row-gap: 6px; }
/* fil d'Ariane : client › dossier */
.an-ctx { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 1 1 0; min-width: 0; font-size: 13px; color: #c7cfdb; }
/* une seule ligne sur un écran d'ordinateur : c'est le nom du dossier qui se raccourcit, pas « Déconnexion » qui passe dessous */
@media (min-width: 1000px) {
  #admin-banner.admin-nav .admin-nav-inner { flex-wrap: nowrap; gap: 12px; }
  #admin-banner.admin-nav .an-tabs { flex-wrap: nowrap; flex: 0 0 auto; }
  #admin-banner.admin-nav .an-tab { padding: 8px 11px; white-space: nowrap; }
  #admin-banner.admin-nav .an-brand, #admin-banner.admin-nav .an-eye, #admin-banner.admin-nav .an-logout, #admin-banner.admin-nav .theme-toggle { flex: 0 0 auto; }
}
.an-ctx:empty { display: none; }
.an-ctx a { color: #fbbf24; font-weight: 700; text-decoration: none; white-space: nowrap; }
.an-ctx a:hover { text-decoration: underline; }
.an-ctx i { font-style: normal; opacity: .55; }
.an-ctx span { flex: 0 1 auto; min-width: 0; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f1f5f9; font-weight: 600; }
.an-eye { font: inherit; font-size: 12.5px; font-weight: 600; color: #c7cfdb; background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.an-eye:hover { background: rgba(255,255,255,0.08); color: #f9fafb; }
.admin-nav .an-ctx ~ .theme-toggle, .admin-nav .an-ctx ~ .an-logout, .admin-nav .an-eye ~ .an-logout { margin-left: 0; }
.admin-nav .an-ctx ~ .theme-toggle { margin-right: 0; }
html[data-theme="light"] .an-ctx { color: #475569; }
html[data-theme="light"] .an-ctx a { color: #b45309; }
html[data-theme="light"] .an-ctx span { color: #0f172a; }
html[data-theme="light"] .an-eye { color: #334155; border-color: rgba(16,35,66,0.18); }
html[data-theme="light"] .an-eye:hover { background: rgba(16,35,66,0.06); color: #0f172a; }
/* onglet « Clients » : la liste des clients se déroule au survol */
.an-drop { position: relative; display: inline-flex; }
.an-caret { margin-left: 5px; font-size: 10px; opacity: .7; }
.an-dd { position: absolute; top: calc(100% + 6px); left: 0; z-index: 300; width: 320px; max-width: 86vw; background: #131c30; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,0.45); padding: 8px; }
.an-dd::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }   /* pas de trou entre l'onglet et la liste */
.an-dd[hidden] { display: none; }
.an-dd-q { width: 100%; box-sizing: border-box; font: inherit; font-size: 13.5px; padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); color: #f9fafb; outline: none; }
.an-dd-q:focus { border-color: #fbbf24; }
.an-dd-l { max-height: min(60vh, 420px); overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 1px; }
.an-dd-l a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: #e5e9f0; font-size: 13.5px; }
.an-dd-l a:hover, .an-dd-l a:focus { background: rgba(251,191,36,0.14); color: #fff; outline: none; }
.an-dd-l a b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-dd-l a span { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.an-dd-l a i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(148,163,184,0.22); color: #e2e8f0; white-space: nowrap; }
.an-dd-l a i.u { background: #dc2626; color: #fff; }
.an-dd-l a i.t { background: #f59e0b; color: #1f2937; }
.an-dd-l a small { font-size: 11.5px; color: #94a3b8; min-width: 18px; text-align: right; }
.an-dd-vide { padding: 12px 10px; font-size: 13px; color: #94a3b8; }
.an-dd-tous { display: block; margin-top: 6px; padding: 8px 10px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12.5px; font-weight: 600; color: #fbbf24; text-decoration: none; }
.an-dd-tous:hover { text-decoration: underline; }
html[data-theme="light"] .an-dd { background: #fff; border-color: rgba(16,35,66,0.12); box-shadow: 0 18px 44px rgba(16,35,66,0.18); }
html[data-theme="light"] .an-dd-q { background: #f8fafc; border-color: rgba(16,35,66,0.16); color: #0f172a; }
html[data-theme="light"] .an-dd-l a { color: #1e293b; }
html[data-theme="light"] .an-dd-l a:hover, html[data-theme="light"] .an-dd-l a:focus { background: rgba(245,158,11,0.16); color: #0f172a; }
html[data-theme="light"] .an-dd-tous { color: #b45309; border-top-color: rgba(16,35,66,0.1); }
@media (max-width: 900px) { .an-ctx span, .an-ctx i { display: none; } }

/* ====== Liens rapides de la fiche (admin) : guichet, mairie, Monday, Suivi, n° de DP ====== */
.fiche-liens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fiche-liens a, .fiche-liens button { font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; padding: 7px 11px; border-radius: 999px; text-decoration: none; cursor: pointer; white-space: nowrap;
  color: #e5e9f0; background: rgba(15, 22, 38, 0.55); border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(6px); }
.fiche-liens a:hover, .fiche-liens button:hover { background: rgba(15, 22, 38, 0.8); border-color: #fbbf24; color: #fff; }
html[data-theme="light"] .fiche-liens a, html[data-theme="light"] .fiche-liens button { color: #1e293b; background: rgba(255,255,255,0.78); border-color: rgba(16,35,66,0.16); }
html[data-theme="light"] .fiche-liens a:hover, html[data-theme="light"] .fiche-liens button:hover { background: #fff; border-color: #f59e0b; color: #0f172a; }
html.vue-client .fiche-liens { display: none; }
@media print { .fiche-liens { display: none !important; } }

/* ====== Changement de page en fondu (Chrome / Edge) : plus de flash blanc entre deux onglets ====== */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }


/* ====== « Prévenir l'installateur » (11/2026) : les lignes À fournir ne préviennent personne toutes seules ====== */
.afournir-prevenir { font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(180, 83, 9, 0.45); background: #f59e0b; color: #1f2937; cursor: pointer; white-space: nowrap; margin-left: auto; }
.afournir-prevenir:hover { background: #fbbf24; }
.afournir-prevenir + .afournir-toggle { margin-left: 8px; }
.afournir-envoi { font-size: 12.5px; opacity: .85; margin: 6px 0 0; }
.afa-prevenir { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; margin: 10px 0 4px; }
.afa-prevenir span { font-size: 12px; opacity: .8; }
html.vue-client .afournir-prevenir, html.vue-client .afournir-envoi, html.vue-client .afa-prevenir { display: none; }
