/* ============================================================
   TEAM DIAG — Espace Cabinet
   Complément de teamdiag.css pour toutes les pages /cabinet/
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --cab-radius : 12px;
  --cab-shadow : 0 2px 16px rgba(14,34,70,.08);
  --cab-border : 1px solid #E2E8F0;
}

/* ── Layout global cabinet ──────────────────────────────────── */
.cabinet-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

/* ============================================================
   AUTH — Split screen
   ============================================================ */
body.auth-split-page {
  margin: 0;
  padding: 0;
  background: #fff;
  min-height: 100vh;
}

.auth-split {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* ── Panneau gauche ─────────────────────────────────────────── */
.auth-brand-panel {
  background: #0E2246;
  position: relative;
  overflow: hidden;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.auth-brand-deco {
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.18) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: .02em;
  margin-bottom: 0;
}
.auth-brand-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.auth-brand-logo strong { color: #0EA5E9; }

.auth-brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 32px;
}

.auth-brand-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin: 0 0 16px;
}

.auth-brand-content p {
  font-size: .92rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin: 0 0 36px;
}

.auth-brand-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-brand-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-feat-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-brand-features li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-brand-features li strong {
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
}

.auth-brand-features li span {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  line-height: 1.5;
}

.auth-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  position: relative;
  z-index: 1;
}
.auth-brand-footer a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: color .15s;
}
.auth-brand-footer a:hover { color: #0EA5E9; }

/* ── Panneau droit ──────────────────────────────────────────── */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #F8FAFC;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
  border: var(--cab-border);
  padding: 40px;
}

/* ── Auth pages (ancien layout centré — conservé pour inscription) */
body.auth-page { background: #F1F5F9; }

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 40px 20px;
}

.auth-card {
  background: #fff;
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
  border: var(--cab-border);
  padding: 40px;
  width: 100%;
  max-width: 480px;
}

/* ── Auth shared components ─────────────────────────────────── */
.auth-header { margin-bottom: 28px; }
.auth-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.auth-header p  { font-size: .9rem; color: var(--text-muted); margin-top: 6px; }

.auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .875rem;
  margin-bottom: 20px;
}

.auth-form .form-group { margin-bottom: 18px; }
.auth-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  border: var(--cab-border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s;
  box-sizing: border-box;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

/* Toggle password button */
.toggle-pwd-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 0;
  opacity: .5;
  transition: opacity .2s;
}
.toggle-pwd-btn:hover { opacity: 1; }

.auth-footer { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 20px; }
.auth-footer a { color: var(--sky); font-weight: 600; }

/* ── Plan selector ──────────────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.plan-card input[type="radio"] { display: none; }
.plan-card:hover         { border-color: var(--sky); }
.plan-card.selected      { border-color: var(--sky); background: #F0F9FF; }
.plan-label { font-weight: 600; font-size: .85rem; color: var(--navy); }
.plan-prix  { font-size: .8rem; color: var(--sky); font-weight: 500; }

/* ── Navbar cabinet ─────────────────────────────────────────── */
.nav-cabinet-name { font-weight: 700; color: var(--navy); }
.nav-plan { font-size: .8rem; color: var(--text-muted); }
.nav-logout {
  font-size: .82rem;
  color: var(--text-muted);
  padding: 6px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
}
.nav-logout:hover { background: #F1F5F9; color: var(--navy); }

/* ── Welcome banner ─────────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1px solid #6EE7B7;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 28px;
  font-weight: 500;
  color: #065F46;
}

/* ── Dashboard header ───────────────────────────────────────── */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.dashboard-header p  { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ── Dashboard hero bar ─────────────────────────────────────── */
.dashboard-hero {
  background: linear-gradient(135deg, #0E2246 0%, #1e3a6e 100%);
  border-radius: var(--cab-radius);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.dashboard-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.2) 0%, transparent 70%);
  pointer-events: none;
}
.dashboard-hero-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}
.dashboard-hero-text p {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  margin: 0;
}
.dashboard-hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero-stat {
  text-align: center;
  min-width: 80px;
}
.hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0EA5E9;
  line-height: 1;
}
.hero-stat-lbl {
  font-size: .75rem;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
}

.quota-atteint { display: flex; align-items: center; gap: 12px; }
.quota-atteint span { font-size: .85rem; color: #B45309; font-weight: 600; }

/* ── Tech grid ──────────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

.tech-card {
  background: #fff;
  border: var(--cab-border);
  border-radius: var(--cab-radius);
  box-shadow: var(--cab-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .15s, transform .15s;
}
.tech-card:hover {
  box-shadow: 0 6px 28px rgba(14,34,70,.14);
  transform: translateY(-2px);
}
.tech-card-urgent { border-color: #FECACA; }

.tech-card-header { display: flex; align-items: center; gap: 14px; }
.tech-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--navy));
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tech-identity strong { display: block; font-size: .95rem; color: var(--navy); font-weight: 700; }
.tech-identity span   { font-size: .8rem; color: var(--text-muted); }

.tech-card-statuts { display: flex; flex-wrap: wrap; gap: 6px; }
.statut-pill {
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.statut-urgent   { background: #FEF2F2; color: #DC2626; }
.statut-planifier{ background: #FFF7ED; color: #B45309; }
.statut-ok       { background: #ECFDF5; color: #065F46; }
.statut-vide     { background: #F8FAFC; color: #94A3B8; }

.tech-card-actions { display: flex; gap: 8px; margin-top: auto; }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.2rem; color: var(--navy); margin-bottom: 8px; }
.empty-state p  { margin-bottom: 24px; }

/* ── Quota block ────────────────────────────────────────────── */
.quota-block {
  background: #FFF7ED;
  border: 1px solid #FCD34D;
  border-radius: var(--cab-radius);
  padding: 32px;
  text-align: center;
}
.quota-block h2 { font-size: 1.2rem; color: #B45309; margin-bottom: 10px; }
.quota-block p  { color: #92400E; margin-bottom: 20px; }

/* ── Page header ─────────────────────────────────────────────  */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.page-header p  { color: var(--text-muted); font-size: .9rem; margin-top: 6px; }

/* ── Add sections ───────────────────────────────────────────── */
.add-section {
  background: #fff;
  border: var(--cab-border);
  border-radius: var(--cab-radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--cab-shadow);
}
.add-section h2 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }

/* ── Search inline ──────────────────────────────────────────── */
.search-form-inline { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.search-form-inline input {
  flex: 1; min-width: 160px;
  padding: 10px 14px;
  border: var(--cab-border);
  border-radius: 8px;
  font-size: .9rem; font-family: inherit;
}
.search-empty { color: var(--text-muted); font-size: .875rem; }

/* ── ADI results ─────────────────────────────────────────────  */
.adi-resultats { display: flex; flex-direction: column; gap: 12px; }
.adi-card {
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.adi-card.selected { border-color: var(--sky); background: #F0F9FF; }
.adi-card-header { flex: 1; }
.adi-card-header strong { display: block; font-size: .95rem; color: var(--navy); font-weight: 700; }
.adi-card-header span   { font-size: .82rem; color: var(--text-muted); }
.adi-card-certifs { display: flex; flex-wrap: wrap; gap: 6px; flex: 2; }
.adi-certif-tag {
  background: #F1F5F9; color: var(--navy);
  font-size: .75rem; padding: 3px 10px;
  border-radius: 20px;
}

/* ── Tech form ──────────────────────────────────────────────── */
.tech-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tech-form .form-group { margin-bottom: 18px; }
.tech-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.tech-form input[type="text"],
.tech-form input[type="email"],
.tech-form input[type="date"],
.tech-form select {
  width: 100%; padding: 9px 12px;
  border: var(--cab-border); border-radius: 8px;
  font-size: .875rem; font-family: inherit;
  box-sizing: border-box;
}
.tech-form input:focus, .tech-form select:focus {
  outline: none; border-color: var(--sky);
}

/* ── Certifications ─────────────────────────────────────────── */
.certifs-section { margin-bottom: 24px; }
.certifs-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.certifs-header h3 { font-size: .95rem; font-weight: 700; color: var(--navy); }

.certif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
}
.certif-fields { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-items: center; }
.certif-domaine { min-width: 160px; }
.certif-mention { display: flex; align-items: center; gap: 6px; font-size: .82rem; white-space: nowrap; }
.certif-mention input { width: auto; }
.btn-remove-certif {
  background: none; border: none; cursor: pointer;
  color: #94A3B8; font-size: .9rem; padding: 4px 8px;
  border-radius: 4px; flex-shrink: 0;
}
.btn-remove-certif:hover { color: #DC2626; background: #FEF2F2; }

/* ── Form actions ───────────────────────────────────────────── */
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }

/* ── Buttons ─────────────────────────────────────────────────  */
.btn-primary {
  background: var(--sky);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s;
}
.btn-primary:hover { background: #0284C7; }
.btn-full { width: 100%; text-align: center; padding: 12px; font-size: .95rem; }

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: var(--cab-border);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s;
}
.btn-outline:hover { background: #F1F5F9; }

.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s;
}
.btn-ghost:hover { background: #F1F5F9; color: var(--navy); }

.btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; }
}

@media (max-width: 640px) {
  .tech-form .form-row   { grid-template-columns: 1fr; }
  .plan-grid             { grid-template-columns: 1fr; }
  .dashboard-header      { flex-direction: column; align-items: flex-start; }
  .certif-fields         { flex-direction: column; }
  .certif-domaine        { min-width: unset; width: 100%; }
  .dashboard-hero        { flex-direction: column; text-align: center; }
  .dashboard-hero-stats  { justify-content: center; }
}
