/* Adaptation des tokens officiels Planète Production aux composants RH. */
:root {
  color-scheme: dark;
  --bg: var(--bg-primary);
  --surface: var(--surface-card);
  --wash: var(--bg-secondary);
  --wash-2: var(--bg-card-hover);
  --line: var(--border-color);
  --line-2: rgba(194, 163, 106, .35);
  --ink: var(--text-main);
  --ink-2: #d1cca8;
  --ink-3: var(--text-muted);
  --muted: var(--text-muted);
  --muted-2: #a6a096;
  --accent: var(--color-production);
  --accent-dark: var(--color-production-hover);
  --accent-soft: rgba(194, 163, 106, .16);
  --gold: var(--color-production);
  --gold-soft: var(--accent-soft);
  --ok: #4ade80;
  --ok-soft: rgba(46, 125, 50, .16);
  --warn: #fbbf24;
  --warn-soft: rgba(217, 119, 6, .16);
  --danger: #f87171;
  --danger-soft: rgba(197, 48, 48, .16);
  --info: var(--color-production-light);
  --info-soft: var(--accent-soft);
  --shell: var(--bg-secondary);
  --shell-2: var(--bg-primary);
  --shell-ink: var(--text-main);
  --shell-muted: var(--text-muted);
  --shell-line: var(--border-subtle);
  --shell-active: var(--accent-soft);
  --shell-gold: var(--color-production);
  --ui-font: var(--font-family-body);
  --display-font: var(--font-family-headings);
  --mono-font: var(--font-family-mono);
  --r-sm: var(--radius-sm);
  --r-md: var(--radius-md);
  --r-lg: var(--radius-lg);
  --shadow-1: var(--shadow-card);
  --shadow-2: var(--shadow-card);
  --shadow-float: var(--shadow-modal);
  --bs-secondary-color: var(--text-muted);
  --bs-emphasis-color: var(--text-main);
  --bs-link-color: var(--color-production-light);
  --bs-link-hover-color: var(--color-production);
}
body::after { display: none; }
.people-modal-form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.people-modal-form .modal-body { overflow-y: auto; }
.table td:last-child .btn { white-space: nowrap; min-width: 76px; }
.modal-content { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.modal-header, .modal-footer { border-color: var(--line); }
.nav-svg { display: block; width: 21px; height: 21px; flex-shrink: 0; }
.app-nav .nav-icon { display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
  transition: color 160ms ease, background-color 160ms ease; }
.app-nav a.active .nav-icon { background: var(--accent-soft); color: var(--shell-gold); }
.app-nav a:hover .nav-icon { color: var(--shell-gold); background: var(--accent-soft); }
.mobile-links a { gap: 10px; }
.logout-link .nav-svg { width: 20px; height: 20px; }
.theme-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 40px; }
[data-theme="light"] {
  color-scheme: light;
  --ink-2: #45413b; --ink-3: #6b665e; --muted-2: #767167;
  --accent: #7d6537; --accent-dark: #69532c; --gold: #7d6537;
  --ok: #1b5e20; --warn: #92400e; --danger: #991b1b; --info: #7d6537;
  --shell-muted: #6b665e; --shell-gold: #7d6537;
  --shell-line: #e5ded2; --line-2: #d2c8b8;
  --bs-link-color: #7d6537; --bs-link-hover-color: #69532c;
  --bs-secondary-color: #6b665e; --bs-emphasis-color: #2a2d2e;
}
[data-theme="light"] .topbar { background: rgba(250, 248, 245, .95); }
[data-theme="light"] .sidebar { background-image: none; }
[data-theme="light"] .sidebar .brand:hover { color: #2a2d2e; }
[data-theme="light"] .login-wrap { background: radial-gradient(circle at top right, #f2e9cc, #faf8f5); }
[data-theme="light"] .text-primary { color: #7d6537 !important; }
[data-theme="light"] .alert-info, [data-theme="light"] .alert-primary { color: #7d6537; }
[data-theme="light"] .btn-close { filter: none; }
[data-theme="light"] .btn-outline-primary { color: #7d6537; border-color: #a3844a; }
[data-theme="light"] .desktop-sidebar-toggle { color: #7d6537; }
[data-theme="light"] .text-bg-dark { background: #2c302e !important; color: #fff !important; }
@media (max-width: 575.98px) {
  .theme-toggle-label { display: none; }
  .theme-toggle { padding: 6px 10px; }
  .topbar-label { min-width: 0; flex: 1; }
}
.date-calendar { width: min(390px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-2);
  border-radius: var(--r-lg); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-modal); }
.date-calendar::backdrop { background: rgba(0, 0, 0, .65); }
.date-calendar-heading, .date-calendar-navigation { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.date-calendar-heading select { flex: 1; }
.date-calendar-heading input { width: 100px; }
.date-calendar-navigation { justify-content: space-between; }
.date-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.date-calendar-weekday { text-align: center; color: var(--muted); font-size: .75rem; padding-bottom: 8px; }
.date-calendar-day { min-height: 40px; padding: 6px 0; color: var(--ink); }
.date-calendar-day:hover { background: var(--accent-soft); color: var(--ink); }
.date-calendar-day[aria-current="date"] { border-color: var(--color-production); }
.date-calendar-open { min-width: 44px; }
.desktop-sidebar-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 40px; width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--color-production); cursor: pointer;
}
.desktop-sidebar-toggle:hover { background: var(--accent-soft); }
@media (min-width: 992px) {
  .sidebar { transition: width 180ms var(--ease-out), flex-basis 180ms var(--ease-out); }
  .sidebar-collapsed .sidebar { width: 80px; flex-basis: 80px; padding-inline: 10px; }
  .sidebar-collapsed .sidebar .brand { justify-content: center; padding-inline: 0; }
  .sidebar-collapsed .sidebar .brand-logo { width: 44px; height: 44px; }
  .sidebar-collapsed .sidebar .brand-text,
  .sidebar-collapsed .sidebar .nav-label,
  .sidebar-collapsed .sidebar .nav-caption,
  .sidebar-collapsed .sidebar .user-meta { display: none; }
  .sidebar-collapsed .sidebar .app-nav a { justify-content: center; gap: 0; padding-inline: 8px; }
  .sidebar-collapsed .sidebar .nav-icon { margin: 0; font-size: 1.1rem; }
  .sidebar-collapsed .sidebar .sidebar-user { flex-direction: column; gap: 12px; padding-inline: 0; }
  .sidebar-collapsed .sidebar .logout-link { margin: 0; }
}
@media (max-width: 991.98px) { .desktop-sidebar-toggle { display: none; } }
.brand-logo { flex: 0 0 auto; object-fit: contain; }
.brand-text > span { font-size: 1.1rem; font-weight: 700; }
.brand-text::after { content: ''; display: block; width: 7px; height: 7px; margin-top: 8px;
  border-radius: 50%; background: var(--color-production);
  box-shadow: 12px 0 var(--color-agence), 24px 0 var(--color-externalisation); }
.topbar { background: rgba(23, 25, 26, .92); }
.login-wrap { background: radial-gradient(circle at top right, #252a2d, #141617); }
.card, .login-card { color: var(--ink); }
.card-header { background: var(--bg-secondary); }
.stat-card:hover { border-color: var(--color-production); }
.table { --bs-table-hover-color: var(--text-main); --bs-table-striped-color: var(--text-main); }
.table-light { --bs-table-bg: var(--bg-secondary); --bs-table-color: var(--ink); }
.text-dark { color: var(--ink) !important; }
.bg-light { background-color: var(--bg-secondary) !important; }
.bg-white { background-color: var(--surface-card) !important; }
.text-primary { color: var(--color-production-light) !important; }
.text-secondary, .text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--ok) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warn) !important; }
.btn-primary, .btn-outline-primary:hover, .btn-outline-primary:active {
  background: linear-gradient(135deg, var(--color-production), var(--color-production-hover));
  color: #17191a; border-color: var(--color-production); box-shadow: var(--shadow-btn-primary);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: var(--color-production-hover); color: #17191a;
  border-color: var(--color-production-hover);
}
.btn-success { color: #fff; background: #2e7d32; border-color: #2e7d32; }
.btn-outline-danger { border-color: rgba(197, 48, 48, .5); }
.form-control:focus, .form-select:focus {
  background: var(--bg-secondary); color: var(--ink);
  box-shadow: 0 0 0 3px rgba(194, 163, 106, .22);
}
.form-control:disabled, .form-select:disabled { background: var(--bg-primary); color: var(--text-muted); }
.form-control::file-selector-button { background: var(--bg-primary); color: var(--ink); }
.badge.bg-primary-subtle, .badge.text-bg-primary { border-color: rgba(194, 163, 106, .35) !important; }
.badge.bg-success-subtle, .badge.text-bg-success { border-color: rgba(46, 125, 50, .35) !important; }
.badge.bg-warning-subtle, .badge.text-bg-warning { border-color: rgba(217, 119, 6, .35) !important; }
.badge.bg-danger-subtle, .badge.text-bg-danger { border-color: rgba(197, 48, 48, .35) !important; }
.alert-info, .alert-primary { color: var(--color-production-light); border-color: var(--line-2); }
.alert-success { border-color: rgba(46, 125, 50, .35); }
.alert-danger { border-color: rgba(197, 48, 48, .35); }
.alert-warning { background: var(--warn-soft); color: var(--warn); border-color: rgba(217, 119, 6, .35); }
.btn-close:not(.btn-close-white) { filter: invert(1) grayscale(100%) brightness(200%); }
::-webkit-scrollbar-thumb { background: var(--color-externalisation); }
::-webkit-scrollbar-thumb:hover { background: var(--color-production); }
@media print {
  :root { color-scheme: light; --ink: #2a2d2e; --ink-2: #2a2d2e; --ink-3: #6b665e;
    --bg: #fff; --surface: #fff; --wash: #faf8f5; --line: #e5ded2; }
  body, .card, .table { background: #fff; color: #2a2d2e; }
}
/* Connexion Planète : présentation et formulaire. */
.login-page .login-wrap { display:grid; grid-template-columns:52% 48%; gap:0; padding:0; min-height:100vh; min-height:100svh; background:#f7f4ed; align-items:stretch; }
.login-story { background:#242a27; color:#f2e9cc; padding:clamp(28px,4vw,76px); display:flex; flex-direction:column; justify-content:space-between; position:relative; overflow:hidden; min-height:100svh; }
.login-brand { display:flex; gap:16px; align-items:center; text-decoration:none; color:#f2e9cc; position:relative; z-index:1; width:fit-content; }
.login-brand:hover { color:#dfc79b; }
.login-brand img { object-fit:contain; border-radius:12px; background:#f7f4ed; padding:5px; }
.login-brand strong { font:700 clamp(18px,1.4vw,25px)/1.25 var(--display-font); display:block; }
.login-brand small { display:block; text-transform:uppercase; letter-spacing:.2em; font-size:10px; margin-top:6px; color:#c2a36a; }
.login-story-copy { position:relative; z-index:1; margin:70px 0; max-width:660px; }
.login-eyebrow { color:#c2a36a; text-transform:uppercase; font-size:11px; letter-spacing:.17em; margin-bottom:24px; font-weight:700; }
.login-story-copy h1 { font:700 clamp(30px,3vw,56px)/1.18 var(--display-font); letter-spacing:-.04em; color:#f2e9cc; margin-bottom:28px; }
.login-story-copy h1 span { color:#c2a36a; }
.login-story-copy > p:last-of-type { color:#c3c8bd; font-size:16px; line-height:1.8; max-width:490px; }
.login-topics { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.login-topics span { border:1px solid #606355; border-radius:30px; padding:7px 17px; font-size:12px; color:#dfc79b; }
.login-story-footer { display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; font-size:11px; color:#b7bdb2; z-index:1; }
.login-story-footer a { color:#dfc79b; text-decoration:none; }
.login-orbits { position:absolute; width:680px; height:680px; top:8%; right:-390px; pointer-events:none; transform:rotate(-25deg); }
.login-orbits span { position:absolute; inset:0; border:1px solid rgba(194,163,106,.13); border-radius:50%; }
.login-orbits span:nth-child(2) { inset:70px; }
.login-orbits span:nth-child(3) { inset:140px; background:radial-gradient(circle,rgba(194,163,106,.07),transparent 70%); }
.login-access { display:flex; align-items:center; justify-content:center; padding:64px 32px; background:#f7f4ed; color:#2c302e; }
.login-form-panel { width:100%; max-width:390px; }
.login-form-eyebrow { color:#766443; font-size:10px; text-transform:uppercase; letter-spacing:.16em; font-weight:700; margin-bottom:16px; }
.login-form-panel h2 { font:700 34px/1.2 var(--display-font); letter-spacing:-.04em; color:#2c302e; margin-bottom:12px; }
.login-intro { color:#69716a; font-size:14px; margin-bottom:36px; }
.login-form-panel .form-label { color:#51574f; text-transform:uppercase; font-size:11px; letter-spacing:.09em; font-weight:700; }
.login-form-panel .form-control { background:#fffdf9; color:#2c302e; border:1px solid #cdc7b9; min-height:50px; border-radius:9px; padding:12px 15px; }
.login-form-panel .form-control::placeholder { color:#878a80; font-size:13px; }
.login-form-panel .form-control:focus { border-color:#927843; box-shadow:0 0 0 3px rgba(194,163,106,.18); }
.login-form-panel .login-submit { background:#c2a36a; color:#242a27; min-height:50px; border-radius:9px; display:flex; justify-content:center; align-items:center; gap:16px; font-weight:800; border:1px solid #c2a36a; }
.login-form-panel .login-submit:hover { background:#dfc79b; border-color:#ab8c53; color:#242a27; }
.login-help { margin:25px 0 30px; font-size:12px; color:#69716a; text-align:center; line-height:1.7; }
.login-form-footer { border-top:1px solid #ded8ca; padding-top:22px; text-align:center; color:#69716a; font-size:11px; }
.login-page .login-wrap > .alert { position:fixed; top:16px; left:50%; transform:translateX(-50%); width:min(520px,calc(100% - 32px)); z-index:1080; }
@media(max-width:767px) {
 .login-page .login-wrap { grid-template-columns:1fr; }
 .login-story { min-height:auto; padding:28px 24px; }
 .login-story-copy { margin:36px 0 24px; }
 .login-story-copy h1 { font-size:30px; }
 .login-story-copy > p:last-of-type { font-size:14px; }
 .login-eyebrow,.login-topics,.login-story-footer { display:none; }
 .login-access { padding:38px 24px; }
}
/* Mouvements légers : uniquement transformation et opacité. */
@keyframes orbit-drift {
  0%,100% { transform: perspective(1000px) rotateX(12deg) rotateY(-18deg) rotateZ(-25deg); }
  50% { transform: perspective(1000px) rotateX(-8deg) rotateY(18deg) rotateZ(15deg); }
}
@keyframes orbit-inner { from { transform:rotateX(0deg) rotateY(0deg); } to { transform:rotateX(360deg) rotateY(180deg); } }
@keyframes soft-arrival { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes confirmation-arrival { from { opacity:0; translate:0 6px; } to { opacity:1; translate:0 0; } }
@media (prefers-reduced-motion:no-preference) {
 .login-orbits { animation:orbit-drift 32s ease-in-out infinite; transform-style:preserve-3d; }
 .login-orbits span:nth-child(2) { animation:orbit-inner 48s linear infinite; }
 .login-orbits span:nth-child(3) { animation:orbit-inner 64s linear infinite reverse; }
 .login-brand { animation:soft-arrival 450ms ease-out both; }
 .login-story-copy { animation:soft-arrival 550ms ease-out 80ms both; }
 .login-form-panel { animation:soft-arrival 550ms ease-out 140ms both; }
 .page-wrap > * { animation-duration:450ms; }
 .alert-success { animation:confirmation-arrival 300ms ease-out both; }
 .modal.fade .modal-dialog { transform:translateY(12px) scale(.985); transition:transform 220ms ease-out; }
 .modal.show .modal-dialog { transform:none; }
 .app-nav a .nav-icon { transition:transform 180ms ease-out; }
 .app-nav a:hover .nav-icon { transform:scale(1.08); }
 .btn:active { transform:translateY(1px); }
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
 .stat-card:hover { transform:translateY(-3px); }
 .login-submit:hover span { transform:translateX(4px); }
}
.login-submit span { transition:transform 180ms ease-out; }
.login-motion-toggle { border:0; border-bottom:1px solid #606355; background:transparent; color:#dfc79b; font:inherit; padding:0 0 3px; }
.login-motion-toggle:focus-visible { outline:2px solid #dfc79b; outline-offset:5px; }
.motion-paused .login-orbits,.motion-paused .login-orbits span,.motion-background .login-orbits,.motion-background .login-orbits span { animation-play-state:paused; }
@media (prefers-reduced-motion:reduce) {
 *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
 .login-motion-toggle { display:none; }
}
@media print { .login-orbits { animation:none; } }
.celebration-card { border-color:var(--gold); background:linear-gradient(110deg,var(--surface),var(--wash)); }
.celebration-item { padding:14px 18px; border:1px solid var(--line); border-radius:12px; min-width:200px; }
.celebration-item > span { margin-right:8px; }
