:root{
  --text: #0f2940;
  --muted: #5a7c96;
  --brand: linear-gradient(135deg,#0ea5e9 0%, #22c1c3 100%);
  --bg: #eaf8ff;            /* proche du header/footer */
  --bg-accent1: #cbedff;
  --bg-accent2: #d6fff8;
  --card: #ffffffee;
}
.dark{
  --text: #e6f2f9;
  --muted: #a7c1d4;
  --brand: linear-gradient(135deg,#0a7fb8 0%, #138f8c 100%);
  --bg: #0c1822;
  --bg-accent1: #0e2330;
  --bg-accent2: #0c2a2a;
  --card: #0f2431;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 10% 10%, var(--bg-accent1) 0%, transparent 55%),
    radial-gradient(900px 600px at 90% 0%, var(--bg-accent2) 0%, transparent 50%),
    radial-gradient(800px 600px at 90% 100%, var(--bg-accent1) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
  0% { background-position: 0% 0%, 100% 0%, 100% 100%; }
  100% { background-position: 10% 5%, 90% 5%, 95% 95%; }
}
.container{max-width:1080px;margin:0 auto;padding:0 20px}
.site-header{
  background: var(--brand);
  color: #fff;
  position: sticky; top:0; z-index:10;
  box-shadow: 0 4px 20px #0000001a, 0 0 30px rgba(14, 165, 233, 0.3);
  animation: headerGlow 3s ease-in-out infinite alternate;
}

@keyframes headerGlow {
  0% { box-shadow: 0 4px 20px #0000001a, 0 0 30px rgba(14, 165, 233, 0.2); }
  100% { box-shadow: 0 4px 20px #0000001a, 0 0 40px rgba(14, 165, 233, 0.4); }
}
.site-header .container{display:flex;align-items:center;gap:20px;min-height:64px}
.brand{color:#fff;text-decoration:none;font-weight:800;letter-spacing:.3px}
.nav{list-style:none;display:flex;gap:14px;margin:0;padding:0}
.nav a{color:#fff;text-decoration:none;opacity:.95}
.nav a:hover{opacity:1;text-decoration:underline}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}
.theme-toggle{background:#ffffff22;border:1px solid #ffffff44;color:#fff;padding:6px 10px;border-radius:8px;cursor:pointer}
.visitor-counter{display:inline-flex;align-items:center;gap:6px;background:#ffffff22;border:1px solid #ffffff44;color:#fff;padding:6px 10px;border-radius:999px;font-size:.86rem;white-space:nowrap}
.visitor-count{font-weight:800;font-variant-numeric:tabular-nums}
.visitor-dot{width:8px;height:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.18)}
@media (max-width: 720px){
  .site-header .container{gap:12px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
  .header-actions{width:100%;justify-content:flex-end}
  .visitor-label{display:none}
}
.page{min-height:calc(100vh - 64px - 80px)}
.site-footer{background: var(--brand); color:#fff}
.site-footer .container{min-height:80px;display:flex;align-items:center}

.hero{padding:56px 0 24px}
.hero h1{font-size:44px;margin:0 0 8px}
.hero p{color:var(--muted);margin:0 0 16px}
.btn{
  background: linear-gradient(135deg, #0f6ca8 0%, #0ea5e9 100%);
  color:#fff;
  border:0;
  padding:8px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn:hover::before {
  width: 300px;
  height: 300px;
}
.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4), 0 0 20px rgba(14, 165, 233, 0.2);
}
.btn:active {
  transform: translateY(0);
}
.btn.small{padding:5px 9px;font-size:.9rem}
.btn.outline{background:transparent;color:inherit;border:1px solid #0000002a}
.btn[disabled]{opacity:.55; cursor:not-allowed; filter:grayscale(0.2)}
.dark .btn{background: linear-gradient(135deg, #0ea5e9 0%, #22c1c3 100%);color:#05223a}

.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:24px 0 64px}
.card{
  background:var(--card);
  backdrop-filter: blur(6px);
  border:1px solid #00000010;
  border-radius:16px;
  padding:16px;
  box-shadow:0 12px 40px #00000014;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover::before {
  opacity: 1;
  animation: glowPulse 2s ease-in-out infinite;
}
.card:hover{
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(14, 165, 233, 0.25), 0 0 40px rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
}
.card h3{margin:0 0 6px}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Admin */
.admin .tabs{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.admin .tabs a{background:#00000010;color:inherit;text-decoration:none;padding:8px 12px;border-radius:10px;border:1px solid #00000010}
.admin .tabs a.active{background:var(--header);color:#fff;border-color:transparent}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid #00000010;padding:8px 10px;text-align:left}
.code{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;white-space:pre-wrap;background:#00000008;padding:8px;border-radius:8px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.muted{color:var(--muted)}
.hint{color:var(--muted); font-size:.92rem}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}

/* Tabs (admin) */
.admin .tabs{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.admin .tabs a{position:relative;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;text-decoration:none;color:#0f2940;background:#ffffffc0;border:1px solid #00000014;box-shadow:0 6px 16px #00000010}
.dark .admin .tabs a{color:#e6f2f9;background:#0f2431}
.admin .tabs a:hover{transform:translateY(-1px)}
.admin .tabs a.active{background:linear-gradient(135deg,#0ea5e9,#22c1c3);color:#fff;border-color:transparent}

/* Chips and badges */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;gap:6px;background:#ffffffcc;border:1px solid #00000010;border-radius:999px;padding:6px 10px}
.dark .chip{background:#0f2431}
.chip .count{background:#00000014;color:inherit;border-radius:999px;padding:2px 6px;font-size:.85rem}
.chip.active{border-color:#0ea5e9;color:#0ea5e9;background:#0ea5e922}

/* Pills (status badges) */
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 8px;font-weight:600;font-size:.9rem;border:1px solid #00000014}
.pill.success{background:#16a34a1a;color:#166534;border-color:#16a34a33}
.pill.error{background:#ef44441a;color:#7f1d1d;border-color:#ef444433}
.pill.info{background:#0ea5e91a;color:#0c4a6e;border-color:#0ea5e933}
.pill .dot{width:8px;height:8px;border-radius:999px}
.pill.success .dot{background:#16a34a}
.pill.error .dot{background:#ef4444}
.pill.info .dot{background:#0ea5e9}

/* Status grid */
.status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
.status-item{display:flex;align-items:center;justify-content:space-between;border:1px solid #00000010;border-radius:10px;padding:8px 10px;background:var(--card)}
.status-item .k{color:var(--muted)}
.status-item .v{font-weight:700}

/* Details box */
.details{margin-top:8px}
.details summary{cursor:pointer; font-weight:600}
.details .code{margin-top:6px; max-height:240px; overflow:auto}

/* Feedback status icon */
.feedback-icon{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #00000022;
  background: #ffffffcc;
}
.dark .feedback-icon{ background:#0f2431; }

.feedback-icon-wrap{ position: relative; display: inline-block; }
.feedback-count{
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
}

/* Stat cards */
.stat-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.stat-card{background:var(--card);border:1px solid #00000010;border-radius:14px;padding:12px}
.stat-card .k{color:var(--muted);font-size:.9rem}
.stat-card .v{font-size:1.4rem;font-weight:700}
.bar{height:10px;border-radius:999px;background:#00000014;overflow:hidden}
.bar > span{display:block;height:100%;background:linear-gradient(90deg,#0ea5e9,#22c1c3)}

/* Toasts */
.toasts{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:9999}
.toast{background:var(--card);border:1px solid #00000022;box-shadow:0 8px 24px #00000022;border-radius:10px;padding:10px 12px;min-width:200px}
.toast.success{border-color:#16a34a3d}
.toast.error{border-color:#dc26263d}
.toast .title{font-weight:600;margin-bottom:4px}

/* Branding */
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}

/* Badge en développement */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5); }
}

/* Modale */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.3s ease;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: overlayFadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  z-index: 1001;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Badge de notification */
.notification-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.notification-badge:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.notification-badge .notif-icon {
  font-size: 18px;
}

.notification-badge .notif-count {
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Styles pour notifications dans la modale */
.notif-item {
  background: var(--card);
  border: 1px solid #00000010;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.notif-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.notif-item.unread {
  border-left: 4px solid #0ea5e9;
  background: rgba(14, 165, 233, 0.05);
}

.notif-item .notif-badge-new {
  background: #0ea5e9;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.notif-item .notif-type {
  font-size: 13px;
  opacity: 0.7;
}

.notif-item .notif-message {
  margin: 8px 0;
  font-size: 14px;
}

.notif-item .notif-response {
  background: #22c55e11;
  border-left: 3px solid #22c55e;
  padding: 10px;
  border-radius: 6px;
  margin-top: 8px;
}

.notif-item .notif-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}
.brand .name{font-weight:800;letter-spacing:.3px}
.brand .tag{opacity:.85;font-size:.9rem}

/* Log list */
.log-list{list-style:none;margin:0;padding:0}
.log-item{padding:8px 10px;border:1px solid #00000014;background:#ffffffcc;border-radius:10px;margin:8px 0}
.dark .log-item{background:#0f2431}
.log-item .time{font-family:ui-monospace,monospace;color:var(--muted);font-size:.85rem}
.log-item .msg{margin-top:4px;white-space:pre-wrap}

/* Table card list */
.table-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.table-card{background:var(--card);border:1px solid #00000010;border-radius:14px;padding:12px}
.table-card .title{font-weight:600}
.table-card .meta{color:var(--muted);font-size:.9rem}
