:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --blur: blur(24px) saturate(180%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Times New Roman', Times, serif;
  background: #fff;
  color: #111;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #111;
}

::selection {
  background: #e30613;
  color: #fff;
}

.container {
  max-width: 920px;
  margin: 0 auto;
}

header {
  padding: 20px 0 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.logo-img {
  height: 28px;
  width: auto;
  transition: opacity 0.4s var(--ease);
}

.logo-img:hover {
  opacity: 0.7;
}

.doc-badge {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #bbb;
  border: 1px solid #e8e8e8;
  padding: 5px 14px;
  border-radius: 20px;
}

header h1 {
  font-size: 38px;
  font-weight: 300;
  letter-spacing: -1.2px;
  line-height: 1.12;
  margin-bottom: 14px
}

header h1 strong {
  font-weight: 500
}

header .subtitle {
  font-size: 14px;
  color: #999;
  max-width: 560px;
  line-height: 1.8;
}

.confidential {
  display: inline-block;
  border: 1px solid #e30613;
  color: #e30613;
  padding: 4px 14px;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 16px;
  border-radius: 20px;
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

nav .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

nav a {
  padding: 15px 18px;
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: #bbb;
  border-bottom: 2px solid transparent;
  transition: all 0.5s var(--ease);
  white-space: nowrap;
}

nav a:hover {
  color: #666;
}

nav a.active {
  color: #111;
  border-bottom-color: #e30613;
}

section {
  padding: 80px 0 72px;
  border-bottom: 1px solid #f0f0f0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

section.visible {
  opacity: 1;
  transform: none;
}

section:last-of-type {
  border-bottom: none;
}

.section-num {
  font-size: 9px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #ddd;
  margin-bottom: 8px;
}

.section-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.section-intro {
  font-size: 13.5px;
  color: #aaa;
  margin-bottom: 44px;
  max-width: 540px;
  line-height: 1.9;
}

p.body-text {
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.9;
  color: #444;
}

p.body-text strong {
  color: #111;
  font-weight: 600;
}

.btn {
  padding: 10px 20px;
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #111;
  transform: translateY(100%);
  transition: transform 0.45s var(--ease);
  z-index: 0;
}

.btn:hover {
  color: #fff;
}

.btn:hover::after {
  transform: translateY(0);
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-primary::after {
  background: #e30613;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 44px 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

footer .left {
  font-size: 12px;
  color: #bbb;
  line-height: 2;
}

footer .footer-logo {
  margin-bottom: 10px;
}

footer .footer-logo img {
  height: 20px;
  width: auto;
  opacity: 0.45;
  transition: opacity 0.4s var(--ease);
}

footer .footer-logo img:hover {
  opacity: 0.7;
}

footer .right {
  text-align: right;
  font-size: 11px;
  color: #ccc;
  line-height: 2;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

/* ═══ PAGE-SPECIFIC ═══ */
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid #f0f0f0;
  margin-bottom: 32px;
}

.status-item {
  padding: 24px;
  text-align: center;
  border-right: 1px solid #f0f0f0;
  transition: all 0.5s var(--ease);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.status-item:last-child {
  border-right: none;
}

.status-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #111;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.status-item:hover::before {
  opacity: 1;
}

.status-item:hover * {
  color: #fff !important;
  position: relative;
  z-index: 1;
}

.status-value {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  font-weight: 300;
}

.status-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #ccc;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
}

.data-table thead th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 300;
  color: #ccc;
  padding: 0 12px 14px 0;
  border-bottom: 1px solid #111;
}

.data-table tbody td {
  padding: 15px 12px 15px 0;
  font-size: 13px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: top;
  transition: all 0.35s var(--ease);
}

.data-table tbody tr:hover td {
  background: rgba(227, 6, 19, 0.012);
  padding-left: 6px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 20px;
}

.badge-ref {
  background: #111;
  color: #fff;
}

.badge-todo {
  background: #f5f5f5;
  color: #bbb;
}

.badge-recu {
  background: #e30613;
  color: #fff;
}

.add-btn {
  width: 100%;
  padding: 14px;
  border: 1px dashed #e8e8e8;
  background: none;
  font-family: inherit;
  font-size: 11px;
  color: #ccc;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.4s var(--ease);
}

.add-btn:hover {
  border-color: #111;
  color: #111;
}

.ref-block {
  border-left: 2px solid #e30613;
  padding: 18px 24px;
  margin: 24px 0;
  font-size: 13px;
  color: #888;
  line-height: 1.9;
  background: rgba(227, 6, 19, 0.01);
  transition: all 0.4s var(--ease);
}

.ref-block:hover {
  padding-left: 30px;
  background: rgba(227, 6, 19, 0.025);
}

.ref-block strong {
  color: #111;
}

.ref-block a {
  color: #888;
  border-bottom: 1px solid #e8e8e8;
  text-decoration: none;
  transition: all 0.3s;
}

.ref-block a:hover {
  color: #e30613;
  border-color: #e30613;
}

.comp-placeholder {
  text-align: center;
  padding: 44px;
  border: 1px dashed #e8e8e8;
  color: #ccc;
  font-size: 13px;
  font-style: italic;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.3s var(--ease);
}

.task-item:hover {
  padding-left: 8px;
  background: rgba(0, 0, 0, 0.005);
}

.task-cb {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ddd;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  border-radius: 3px;
  transition: all 0.3s var(--ease);
}

.task-cb:hover {
  border-color: #111;
}

.task-cb.done {
  background: #111;
  border-color: #111;
}

.task-cb.done::after {
  content: '✓';
  color: #fff;
  font-size: 11px;
}

.task-text {
  font-size: 13px;
  flex: 1;
}

.task-text.done {
  text-decoration: line-through;
  color: #ccc;
}

.task-who {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #f0f0f0;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-left: 6px;
  border-radius: 10px;
  color: #bbb;
}

.task-input {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.task-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e8e8e8;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 0.3s;
}

.task-input input:focus {
  border-color: #111;
}

.task-input select {
  padding: 10px;
  border: 1px solid #e8e8e8;
  font-family: inherit;
  font-size: 11px;
  background: #fff;
}

.note-item {
  padding: 18px 0;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.3s var(--ease);
}

.note-item:hover {
  padding-left: 8px;
  background: rgba(0, 0, 0, 0.005);
}

.note-meta {
  font-size: 10px;
  color: #ddd;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.note-text {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
}

.note-area {
  margin-top: 22px;
  border: 1px solid #e8e8e8;
  padding: 18px;
  transition: border-color 0.3s;
}

.note-area:focus-within {
  border-color: #111;
}

.note-area textarea {
  width: 100%;
  border: none;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  outline: none;
  line-height: 1.8;
}

.note-area .actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f5f5f5;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 12px;
  transition: all 0.35s var(--ease);
}

.link-item:hover {
  padding-left: 8px;
  background: rgba(227, 6, 19, 0.008);
}

.link-name {
  font-size: 13px;
}

.link-name a {
  text-decoration: none;
  border-bottom: 1px solid #e8e8e8;
  transition: border-color 0.3s;
}

.link-name a:hover {
  border-bottom-color: #e30613;
}

.link-url {
  font-size: 11px;
  color: #ccc;
}

.link-cat {
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
  border: 1px solid #f0f0f0;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.link-input {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 8px;
  margin-top: 16px;
}

.link-input input {
  padding: 10px 14px;
  border: 1px solid #e8e8e8;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 0.3s;
}

.link-input input:focus {
  border-color: #111;
}

/* ═══ VEILLE CARDS ═══ */
.veille-card {
  border: 1px solid #f0f0f0;
  margin-bottom: 16px;
  transition: all 0.5s var(--ease);
  overflow: hidden;
}

.veille-card:hover {
  border-color: #ddd;
  box-shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.06);
}

.veille-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px 0;
}

.veille-name {
  font-size: 15px;
  font-weight: 500;
}

.veille-name a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s;
}

.veille-name a:hover {
  border-bottom-color: #e30613;
}

.veille-tag {
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #bbb;
  border: 1px solid #eee;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.veille-body {
  padding: 12px 24px 20px;
}

.veille-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 10px;
}

.veille-notes {
  font-size: 12px;
  color: #e30613;
  font-style: italic;
  line-height: 1.6;
}

.veille-notes::before {
  content: '→ ';
}

/* ═══ FULLSCREEN ═══ */
.fs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(30px);
}

.fs-overlay.show {
  display: flex;
  animation: fsFade 0.35s var(--ease);
}

.fs-overlay img {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
}

.fs-close {
  position: absolute;
  top: 28px;
  right: 32px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
  border: none;
}

.fs-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@keyframes fsFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ═══ ENT FORM ═══ */
.ent-form {
  display: none;
  border: 1px solid #eee;
  padding: 24px;
  margin-top: 16px;
}

.ent-form.show {
  display: block;
  animation: fsFade 0.3s var(--ease);
}

.ent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ent-field label {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 3px;
}

.ent-field input,
.ent-field select,
.ent-field textarea {
  width: 100%;
  border: 1px solid #e8e8e8;
  font-family: inherit;
  font-size: 12px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.3s;
}

.ent-field input:focus,
.ent-field textarea:focus {
  border-color: #111;
}

.ent-field.full {
  grid-column: 1/-1;
}

.ent-field textarea {
  min-height: 50px;
  resize: vertical;
}

.file-drop {
  border: 1px dashed #ddd;
  padding: 16px;
  text-align: center;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s;
}

.file-drop:hover {
  border-color: #111;
  color: #111;
}

.file-drop.has-file {
  border-color: #e30613;
  color: #e30613;
  border-style: solid;
}

@media print {

  nav,
  .add-btn,
  .task-input,
  .note-area,
  .link-input,
  .btn,
  .ent-form {
    display: none !important;
  }

  section {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  header h1 {
    font-size: 26px;
  }

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

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

  footer .container {
    flex-direction: column;
    gap: 20px;
  }
}