/* ========================================
   PASTEL DOUCE (UN PEU PLUS FONCÉE) — STYLE UNIFIÉ POUR TOUTES LES PAGES
   Conserve 100% de la structure originale, change UNIQUEMENT les couleurs
   ======================================== */

:root {
  /* Couleurs de fond - pastel plus foncé qu'avant */
  --bg: #e6dfd8;
  --panel: #ddd6cf;
  --panel2: #d4ccc3;
  --line: #cfc9c2;

  /* Couleurs de texte */
  --ink: #4a4a4a;
  --muted: #8a8a8a;

  /* Accent color - lavender */
  --accent: #b887b5;

  /* Variantes pour compatibilité */
  --accent-blue: #a8c8e6;
  --accent-green: #9ec293;
  --accent-warm: #d4b896;
  --accent-red: #d4a0a0;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 600px at 20% -10%, rgba(184, 135, 181, 0.12), transparent),
    radial-gradient(800px 500px at 120% 10%, rgba(168, 200, 230, 0.08), transparent),
    var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border-radius: 10px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--accent);
}

.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #c0bab3;
  border-radius: 999px;
  color: #6a6a6a;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

/* WRAP */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

/* TITRE */
.title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px 0;
  color: var(--ink);
}

/* BOUTONS */
.btn, button, .button, input[type="button"], input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, #b59ab2, #a88ca3);
  color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(180, 135, 181, 0.25);
}

.btn:hover, button:hover, .button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(180, 135, 181, 0.4);
  background: linear-gradient(180deg, #a88ca3, #9b7e96);
}

.btn:active, button:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(180, 135, 181, 0.3);
}

.btn.ghost, .btn-ghost {
  border: 1px solid #a8c8e6;
  background: rgba(220, 215, 207, 0.5);
  color: #5a7a9a;
}

.btn.ghost:hover, .btn-ghost:hover {
  background: linear-gradient(180deg, #a8c8e6, #98b8d6);
  color: white;
  box-shadow: 0 4px 12px rgba(168, 200, 230, 0.2);
}

.btn-danger, .logout {
  background: linear-gradient(180deg, #d4a0a0, #caa0a0);
  border: 1px solid #c0a0a0;
  color: #7a4a4a;
}

.btn-danger:hover, .logout:hover {
  background: linear-gradient(180deg, #caa0a0, #c09898);
  box-shadow: 0 4px 12px rgba(212, 160, 160, 0.3);
}

/* LIENS EN BOUTONS */
a.btn, a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px !important;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: linear-gradient(180deg, #b59ab2, #a88ca3);
  color: white;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(180, 135, 181, 0.25);
}

a.btn:hover, a[class*="btn"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(180, 135, 181, 0.4);
  background: linear-gradient(180deg, #a88ca3, #9b7e96);
  text-decoration: none;
}

a.btn:active, a[class*="btn"]:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(180, 135, 181, 0.3);
}

/* GROS BOUTONS ACTIONS */
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 14px;
}

@media (max-width: 640px) {
  .actions {
    grid-template-columns: 1fr;
  }
}

.bigbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 90px;
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, #b59ab2, #9b7e96);
  border: none;
  color: white;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(180, 135, 181, 0.28);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.bigbtn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(180, 135, 181, 0.36);
}

.bigbtn:active {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(180, 135, 181, 0.25);
}

/* HELP LINKS */
.help-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.help-links a {
  color: #6a7a9a;
  text-decoration: none;
  border: 1px dashed #b5adaa;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  transition: all 0.3s ease;
}

.help-links a:hover {
  background: linear-gradient(180deg, #b59ab2, #a88ca3);
  color: white;
  border-color: #b59ab2;
}

/* CARTES */
.card, .panel, .fiche-card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card:hover, .panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(184, 135, 181, 0.18);
  border-color: #b59ab2;
}

.card h2, .card h3, .panel h2, .fiche-head {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}

.card .body, .fiche-body {
  padding: 14px 16px;
}

/* FORMULAIRES */
label {
  display: block;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  margin: 6px 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 14px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px solid #cfc9c2 !important;
  border-radius: 12px !important;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none !important;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b59ab2;
  background: rgba(255, 255, 255, 0.95);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 135, 181, 0.12), 0 2px 8px rgba(184, 135, 181, 0.15);
  background: rgba(184, 135, 181, 0.03);
}

textarea {
  min-height: 60px;
  resize: vertical;
}

/* TABLEAUX */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

th, td {
  border: 1px solid #e0dbd5;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
}

th {
  background: linear-gradient(180deg, #b59ab2, #a88ca3);
  color: white;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
}

tr:nth-child(even) td {
  background-color: rgba(184, 135, 181, 0.04);
}

tr:hover td {
  background-color: rgba(184, 135, 181, 0.12);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

/* PILLS & BADGES */
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #cfc9c2;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pill:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(184, 135, 181, 0.1), rgba(168, 200, 230, 0.1));
}

.pill .label {
  color: var(--muted);
  font-size: 12px;
}

.pill .value {
  font-weight: 800;
  color: var(--accent);
}

/* ACTIONS ROW */
.actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* GRID LAYOUT */
.grid {
  display: grid;
  gap: 10px;
}

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

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

.g4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .g4 {
    grid-template-columns: 1fr;
  }
  .g3 {
    grid-template-columns: 1fr;
  }
  .g2 {
    grid-template-columns: 1fr;
  }
}

/* LAYOUT 2 COLONNES */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

.panel-right {
  position: sticky;
  top: 16px;
}

/* FICHE CARD */
.fiche-card {
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
}

.fiche-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fiche-body {
  padding: 14px 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #e0dbd5;
  font-size: 13px;
}

.info-label {
  color: var(--muted);
  font-size: 11px;
  min-width: 90px;
  font-weight: 600;
}

.info-val {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  max-width: 220px;
  word-break: break-word;
}

.fiche-card label {
  font-size: 11px !important;
  color: var(--muted) !important;
  margin-bottom: 3px !important;
  margin-top: 8px !important;
  display: block !important;
  font-weight: 400 !important;
}

.fiche-card input,
.fiche-card select,
.fiche-card textarea {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid #cfc9c2 !important;
  color: var(--ink) !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  width: 100% !important;
  font-size: 12px !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.fiche-card textarea {
  resize: vertical !important;
  min-height: 60px !important;
}

/* SELECTED ROW */
tr.row-sel {
  background: rgba(184, 135, 181, 0.15) !important;
  border-left: 3px solid var(--accent) !important;
}

tr.row-sel td {
  background: rgba(184, 135, 181, 0.15) !important;
}

/* PRINT */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  table th, td {
    border-color: #000 !important;
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    margin: 20px 10px;
    padding: 20px 15px;
  }
  table {
    font-size: 12px;
  }
  th, td {
    padding: 8px;
  }
}

/* FOOTER */
.footer-credit {
  max-width: 1200px;
  margin: 18px auto 12px;
  padding: 8px 12px 0;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  text-align: center;
}

.footer-credit strong {
  color: var(--accent);
  font-weight: 700;
}

/* STATUS CHIPS - Pastel adaptations */
.ev-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.ev-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.ev-item:last-child {
  border-bottom: none;
}

.ev-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ev-title {
  color: var(--ink);
  margin-top: 3px;
}

.ev-loc {
  color: var(--muted);
  font-size: 12px;
}

/* Support for inline color styles (status indicators) */
.bigbtn {
  font-size: 15px;
}
