/* Bouton assistant (onboarding) */
.assistant-btn {
  background: #2b7a78;
  color: #fff;
}

.oiseaux-assistant-card-csv {
  background: #fffaf3;
}

.oiseaux-assistant-steps {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 0.35em;
}

.oiseaux-assistant-actions {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  justify-content: center;
}
.onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.2rem;
}

.onboarding-guide {
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed #cbe6b0;
}

.onboarding-guide h3 {
  margin: 0 0 0.55rem;
  color: #1f7a54;
}

.onboarding-guide-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.onboarding-guide-list li {
  display: grid;
  gap: 0.3rem;
}

.onboarding-guide-list .step-action {
  justify-self: start;
}
/* Conteneur du chemin en grille */
.onboarding-path {
  position: relative;
  padding: 2em 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-flag {
  font-size: 2.5em;
  opacity: 0.8;
  transition: opacity 0.3s;
}
.path-flag-start {
  margin-bottom: 1.5em;
}
.path-flag-end {
  margin-top: 1.5em;
}
.path-flag-end.done {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(36, 214, 109, 0.5));
}

/* Grille 4 colonnes + 3 colonnes */
.path-grid {
  width: 100%;
  max-width: 1000px;
  position: relative;
}

.path-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  margin-bottom: 1.5em;
  width: 100%;
}

.path-row-secondary {
  justify-content: center;
  gap: 0.8em;
}

/* Flèches horizontales */
.path-arrow {
  font-size: 1.4em;
  color: #d0e8d5;
  font-weight: bold;
  flex-shrink: 0;
  width: 1.2em;
  text-align: center;
}

/* Flèche verticale entre les lignes */
.path-arrow-down {
  font-size: 1.8em;
  color: #d0e8d5;
  font-weight: bold;
  text-align: center;
  margin: 0.5em 0 1em 0;
  height: 1.5em;
}

/* Cellules du chemin - largeur fixe */
.path-cell {
  display: flex;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s;
  flex: 1;
  min-width: 140px;
  max-width: 180px;
}

.path-cell.done {
  opacity: 1;
}

/* Carte de l'étape */
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
  padding: 1.2em;
  background: linear-gradient(135deg, #fff9f5 0%, #fffbf8 100%);
  border: 2px solid #f0e6dc;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  width: 100%;
}

.path-cell:hover .step-card {
  border-color: #e8c49c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.path-cell.done .step-card {
  background: linear-gradient(135deg, #f2fff4 0%, #e8f9eb 100%);
  border-color: #8fdf9f;
  box-shadow: 0 2px 8px rgba(36, 214, 109, 0.15);
}

/* Numéro d'étape */
.path-cell .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1a04f, #e58028);
  color: #fff;
  font-weight: 900;
  font-size: 0.9em;
  box-shadow: 0 2px 6px rgba(229, 128, 40, 0.25);
}

.path-cell.done .step-number {
  background: linear-gradient(135deg, #55ff9c, #19c466);
  box-shadow: 0 2px 6px rgba(36, 214, 109, 0.25);
}

/* Icône d'étape */
.path-cell .step-icon {
  font-size: 2.2em;
  line-height: 1;
}

.step-icon-avatar {
  width: 2.2em;
  height: 2.2em;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(31, 122, 84, 0.22);
  background: #fff;
}

/* Label d'étape */
.path-cell .step-label {
  font-size: 0.87em;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #333;
  white-space: nowrap;
}

.path-cell.done .step-label {
  color: #1f7a54;
}

/* Statut complété */
.path-cell .step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  margin: 0;
}

.path-cell .step-status-v {
  width: 100%;
  height: 100%;
  display: inline-grid;
  place-items: center;
  font-size: 1em;
  font-weight: 900;
  background: radial-gradient(circle at 30% 28%, #55ff9c 0%, #19c466 58%, #0f8d47 100%);
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 0 10px rgba(36, 214, 109, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.48);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.26);
}

/* Bouton d'action */
.path-cell .step-action {
  color: #fff;
  background: linear-gradient(135deg, #f1a04f, #e58028);
  border: none;
  border-radius: 20px;
  padding: 0.5em 1em;
  font-size: 0.85em;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(229, 128, 40, 0.28);
  transition: all 0.2s ease;
}

.path-cell .step-action:hover {
  background: linear-gradient(135deg, #f4ac63, #d96f1d);
  box-shadow: 0 6px 14px rgba(217, 111, 29, 0.35);
  transform: scale(1.05);
}

.path-cell .step-action.disabled {
  background: #d0d0d0;
  color: #888;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: not-allowed;
  opacity: 0.55;
}

.path-cell .step-action.disabled:hover {
  background: #d0d0d0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: none;
}

.voice-assistant-panel {
  margin: 0.8rem 0 1rem;
  padding: 0.9rem;
  border: 1px solid #d8dfe8;
  border-radius: 12px;
  background: linear-gradient(130deg, #fff7ee 0%, #fffdf8 100%);
  display: grid;
  gap: 0.65rem;
}

.voice-assistant-head,
.voice-assistant-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.voice-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #d4c4b0;
  background: #fff;
  color: #2f4858;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.voice-trigger-btn-audio {
  border: 0;
  background: linear-gradient(180deg, #35d46c 0%, #1fa855 100%);
  color: #fff;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  box-shadow: 0 10px 24px rgba(31, 168, 85, 0.28);
}

.voice-trigger-btn-audio:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 168, 85, 0.34);
}

.voice-trigger-btn-audio.is-recording {
  background: linear-gradient(180deg, #e2574c 0%, #c53329 100%);
  box-shadow: 0 14px 30px rgba(197, 51, 41, 0.3);
}

.voice-trigger-btn-audio:disabled,
.voice-trigger-btn-audio.is-disabled {
  background: #c7ced6;
  color: #eef2f5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.voice-audio-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.voice-audio-btn {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #35d46c 0%, #1fa855 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 168, 85, 0.28);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.voice-audio-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 168, 85, 0.34);
}

.voice-audio-btn:focus-visible {
  outline: 3px solid rgba(47, 72, 88, 0.32);
  outline-offset: 3px;
}

.voice-audio-btn.is-recording {
  background: linear-gradient(180deg, #e2574c 0%, #c53329 100%);
  box-shadow: 0 14px 30px rgba(197, 51, 41, 0.3);
}

.voice-audio-btn:disabled,
.voice-audio-btn.is-disabled {
  background: #c7ced6;
  color: #eef2f5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.voice-audio-icon {
  width: 26px;
  height: 26px;
}

.voice-audio-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #2f4858;
}

.voice-trigger-btn:focus-visible {
  outline: 2px solid #2f4858;
  outline-offset: 2px;
}

.voice-trigger-btn.is-recording {
  border-color: #b42318;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.2);
}

.voice-trigger-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.voice-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(8rem, 10rem);
  gap: 0.9rem;
  align-items: end;
  background: #fff;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  padding: 1rem;
}

.voice-manual-form[hidden] {
  display: none !important;
}

.voice-manual-form:not([hidden]) {
  animation: voice-manual-slide-down 0.2s ease-out;
}

.voice-manual-field {
  min-width: 0;
}

.voice-manual-form label.voice-manual-field {
  min-width: 0;
}

.voice-assistant-panel[data-voice-mode="manual"] .voice-manual-field span {
  font-size: 1.25rem;
  font-weight: 900;
  color: #1f3344;
}

.voice-assistant-panel[data-voice-mode="manual"] .voice-manual-field input {
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1;
  min-height: 4.8rem;
  text-align: center;
  border-radius: 12px;
  border: 2px solid #b9c9d8;
}

.voice-assistant-panel[data-voice-mode="manual"] #voice-oiseaux-manual-ok {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  min-height: 4.8rem;
  min-width: 9rem;
  border-radius: 12px;
  border: 2px solid #2f4858;
  background: #2f4858;
  color: #fff;
}

.voice-assistant-status {
  min-height: 1.2rem;
  font-weight: 600;
  color: #2f4858;
}

.voice-assistant-confirm {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.voice-guidance-panel {
  margin-top: 0.8rem;
}

.voice-guidance-card {
  border-left: 3px solid #2f4858;
  background: #f5f9fc;
  border-radius: 8px;
  padding: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.voice-guidance-block strong {
  color: #2f4858;
}

.voice-guidance-block p {
  margin: 0.3rem 0 0;
  color: #3d4f5a;
}

.voice-guidance-alt p {
  color: #5a6570;
}

@keyframes voice-manual-slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .voice-manual-form {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 0.8rem;
  }

  #voice-oiseaux-manual-ok {
    flex: 1 1 auto;
  }
}

@media (max-width: 900px) {
  .path-grid {
    max-width: 100%;
  }
  
  .path-row {
    gap: 0.6em;
  }
  
  .step-card {
    padding: 1em;
  }
  
  .path-cell .step-icon {
    font-size: 1.8em;
  }
  
  .path-cell .step-label {
    font-size: 0.75em;
  }
  
  .path-arrow {
    font-size: 1.2em;
  }
}

@media (max-width: 600px) {
  .path-row,
  .path-row-secondary {
    flex-wrap: wrap;
    gap: 0.5em;
  }
  
  .path-cell {
    min-width: 120px;
    max-width: 160px;
    flex: 0 1 calc(50% - 0.3em);
  }
  
  .path-flag {
    font-size: 2em;
  }
  
  .step-card {
    padding: 0.8em;
  }
  
  .path-cell .step-icon {
    font-size: 1.6em;
  }
  
  .path-cell .step-label {
    font-size: 0.7em;
  }
  
  .path-arrow {
    font-size: 1em;
    width: 0.8em;
  }
}
.onboarding-progress-bar {
  width: 100%;
  height: 0.7em;
  background: #e2f3d2;
  border-radius: 999px;
  margin: 0.7em 0 0.2em 0;
  overflow: hidden;
}
.onboarding-progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #1f7a54 60%, #b7e1c3 100%);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.4,1.4,.6,1);
}
.onboarding-progress-label {
  font-size: 0.98em;
  color: #1f7a54;
  font-weight: 600;
  margin: 0.2em 0 0.1em 0;
}

.assistant-nav-btn {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f1a04f, #e58028);
  box-shadow: 0 4px 10px rgba(229, 128, 40, 0.28);
  font-weight: 700;
}

.assistant-nav-btn:hover,
.assistant-nav-btn:focus-visible {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f4ac63, #d96f1d);
  box-shadow: 0 6px 14px rgba(217, 111, 29, 0.35);
}

:root {
  --bg: #f2f4ef;
  --bg-mesh-a: #d9e9db;
  --bg-mesh-b: #f3d5b5;
  --surface: #ffffff;
  --surface-soft: #fbfcf9;
  --ink: #1f2a24;
  --muted: #51635a;
  --primary: #1f7a54;
  --primary-strong: #165a3f;
  --secondary: #e58c48;
  --danger: #b43a2f;
  --border: #d2ddd3;
  --ring: rgba(31, 122, 84, 0.2);
  --radius-sm: 0.55rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.1rem;
  --shadow-soft: 0 8px 18px rgba(20, 34, 27, 0.08);
  --shadow-strong: 0 14px 35px rgba(20, 34, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, var(--bg-mesh-a), transparent 34%),
    radial-gradient(circle at 84% 12%, var(--bg-mesh-b), transparent 36%),
    linear-gradient(180deg, #f8faf6 0%, var(--bg) 68%);
}

h1,
h2,
h3,
.brand {
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.8rem 1rem;
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(210, 221, 211, 0.85);
  background: rgba(255, 255, 255, 0.9);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.45rem;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-soft);
}

.version-chip,
.counter-chip {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e7f3ec;
  color: var(--primary-strong);
  vertical-align: middle;
}

.counter-chip {
  margin-left: 0;
}

.menu-toggle {
  display: inline-block;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
}

.menu {
  display: none;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.menu-open .menu {
  display: flex;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.38rem 0.62rem;
  border-radius: 0.5rem;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.menu-group {
  position: relative;
}

.menu-group summary {
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  padding: 0.38rem 0.62rem;
  border-radius: 0.5rem;
  font-size: 0.92rem;
}

.menu-group summary::-webkit-details-marker {
  display: none;
}

.menu-group summary::after {
  content: " ▾";
  font-size: 0.75rem;
}

.menu-submenu {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  min-width: 13rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(20, 40, 30, 0.14);
}

.menu-submenu a {
  display: block;
}

.menu-group summary:hover,
.menu-group summary:focus-visible {
  color: var(--ink);
  background: #f4f8f2;
}

.salle-map-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.salle-map-tab { background: #f4f8f2; color: var(--ink); cursor: pointer; }
.salle-map-tab.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.salle-map-canvas { min-height: 12rem; padding: 1rem; border: 1px solid #d5e2d8; border-radius: 1rem; background: radial-gradient(circle at 15% 10%, #fff 0 12%, transparent 13%), linear-gradient(135deg, #f3fbf4, #fff8ed); }
.salle-map-room-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.map-content-title { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.5rem; }
.salle-map-room-heading h3 { margin: 0.1rem 0; font-size: 1.35rem; }
.salle-map-room-heading p, .map-content small { margin: 0; color: var(--muted); font-size: 0.82rem; }
.salle-map-contents { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.7rem; margin-top: 1rem; }
.map-content { padding: 0.8rem; border: 1px solid #d5e2d8; border-radius: 0.7rem; background: rgba(255, 255, 255, 0.82); }
.map-content > div { display: grid; gap: 0.15rem; }
.map-content-title > div { display: flex; align-items: baseline; flex: 1 1 auto; min-width: 0; gap: 0.35rem; }
.map-content-title > div strong,
.map-content-title > div small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-content-title > .map-pill { flex: 0 0 auto; }
.map-content-icon { color: #23805a; font-size: 1.4rem; }
.map-pill { display: inline-flex; width: fit-content; align-items: center; gap: 0.25rem; padding: 0.18rem 0.45rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.map-pill--libre { background: #dff3e5; color: #17633d; }
.map-pill--occupee { background: #dcecff; color: #20558b; }
.map-pill--maintenance { background: #fff0d5; color: #8a5315; }
.salle-map-legend { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.78rem; color: var(--muted); }
.map-dot { display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.2rem; border-radius: 50%; }
.map-dot--libre { background: #40a96b; } .map-dot--occupee { background: #4b91d1; } .map-dot--maintenance { background: #e6a23c; }
.battery-matrix { display: grid; grid-template-columns: repeat(var(--battery-cols), minmax(2.2rem, 1fr)); gap: 0.28rem; margin-top: 0.75rem; }
.battery-cell { display: grid; place-items: center; min-height: 2.1rem; border-radius: 0.35rem; font-size: 0.72rem; font-weight: 700; cursor: help; transition: transform 0.15s ease; }
.battery-cell:hover { transform: translateY(-2px) rotate(-2deg); }
.battery-cell--libre { background: #dff3e5; color: #17633d; } .battery-cell--occupee { background: #dcecff; color: #20558b; } .battery-cell--maintenance { background: #fff0d5; color: #8a5315; }

.map-content { position: relative; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.map-content:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(31, 73, 50, 0.12); }
.map-content--voliere { border: 2px solid #54aa78; border-radius: 1.1rem 1.1rem 0.55rem 0.55rem; background: linear-gradient(145deg, #f2fbf4, #fff); }
.map-content--battery { border: 2px solid #e4a340; border-radius: 0.5rem; background: linear-gradient(145deg, #fff8e9, #fff); }
.map-content--cage { border: 2px solid #70a5d7; border-radius: 0.35rem; background: linear-gradient(145deg, #f1f7ff, #fff); }
.map-content--maintenance { border: 2px dashed #c58a38; border-radius: 0.75rem; background: #fffaf0; }
.map-content-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: 0.55rem; background: rgba(255, 255, 255, 0.78); font-size: 0; }
.map-content-icon::before { font-size: 1.3rem; line-height: 1; }

/* Éléments du plan de l'élevage ouvrant leur fiche en édition au double-clic. */
.map-editable { cursor: pointer; }
.map-editable:hover { outline: 2px dashed var(--primary); outline-offset: 2px; }
.salle-map-room-heading.map-editable:hover,
.map-content-title.map-editable:hover { outline-offset: 4px; }

.map-content--voliere .map-content-icon::before { content: "♧"; color: #23805a; }
.map-content--battery .map-content-icon::before { content: "▦"; color: #c27818; }
.map-content--cage .map-content-icon::before { content: "▣"; color: #397ebd; }
.map-content--maintenance .map-content-icon::before { content: "⚙"; color: #a96e18; }
.map-content--maintenance .map-content-icon { animation: map-maintenance-pulse 2.8s ease-in-out infinite; }
@keyframes map-maintenance-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(197, 138, 56, 0.08); } 50% { box-shadow: 0 0 0 5px rgba(197, 138, 56, 0.12); } }
.map-content-title { padding-bottom: 0.55rem; border-bottom: 1px solid rgba(196, 143, 54, 0.2); }
.battery-matrix { padding: 0.45rem; border: 1px solid rgba(196, 143, 54, 0.22); border-radius: 0.55rem; background: rgba(255, 255, 255, 0.7); }
.battery-cell { min-height: 2.35rem; border: 1px solid currentColor; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.05); }
.battery-cell:hover { transform: scale(1.07) rotate(-1deg); box-shadow: 0 4px 9px rgba(31, 73, 50, 0.15); }

.menu a:hover,
.assistant-actions-panel {
  border: 2px solid #f0b26f;
  background: linear-gradient(180deg, #fff8ef 0%, #fff3e2 100%);
}
.assistant-actions-row {
  margin-top: 0.2rem;
}
.assistant-nav-btn {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f1a04f, #e58028);
  box-shadow: 0 4px 10px rgba(229, 128, 40, 0.28);
  font-weight: 700;
}
.assistant-nav-btn-primary {
  font-size: 1rem;
  padding: 0.7rem 1.2rem;
}
.assistant-nav-btn-secondary {
  font-size: 0.98rem;
  padding: 0.7rem 1.2rem;
}
.assistant-nav-btn:hover,
.assistant-nav-btn:focus-visible {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #f4ac63, #d96f1d);
  box-shadow: 0 6px 14px rgba(217, 111, 29, 0.35);
}
.menu a:focus-visible {
  color: var(--ink);
  border-color: var(--border);
  background: #f4f8f2;
}

.userbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.user-pill {
  font-size: 0.86rem;
  color: var(--muted);
  background: #f5f8f3;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.user-avatar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(43, 122, 120, 0.28);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1rem;
}

.panel {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
  margin-bottom: 1rem;
}

.hero-panel {
  display: grid;
  gap: 0.8rem;
}

.hero-stats,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.74rem;
  color: var(--primary-strong);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0 0 0.45rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}

.flash {
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid;
}

.flash-success {
  background: #e8f8ed;
  border-color: #b7e1c3;
  color: #1b6a3e;
}

.flash-error {
  background: #ffe9e6;
  border-color: #f1c3bd;
  color: #92271e;
}

.flash-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1200;
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  background: #1f7a54;
  color: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.flash-toast.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.filters,
.inline-panel,
.import-form,
.data-form,
.actions,
.auth-form,
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.data-form {
  align-items: flex-start;
}

.compact-field,
.form-field,
.auth-form label,
.data-form label {
  display: grid;
  gap: 0.32rem;
  min-width: min(100%, 220px);
}

.form-field--wide {
  min-width: min(100%, 440px);
  flex: 2 1 440px;
}

.form-field--classifications-description {
  margin-inline-start: 0.9rem;
}

.auth-form--grid,
.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
  align-items: start;
}

.auth-form--register {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.register-form__section {
  display: grid;
  gap: 0.9rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.register-form__section--single {
  grid-template-columns: minmax(0, 1fr);
}

.register-form__section--passwords {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.register-form__policy {
  margin-top: -0.2rem;
}

.register-form__section label,
.register-form__section .password-policy,
.register-form__policy,
.auth-form--register > button,
.auth-form--register > .cf-turnstile,
.auth-form--register > .auth-links {
  grid-column: 1 / -1;
}

.auth-form--grid > label,
.profile-form > label {
  min-width: 0;
}

.register-form__section > label {
  min-width: 0;
}

.field-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.field-icon {
  width: 1.1rem;
  display: inline-flex;
  justify-content: center;
}

.register-username-input {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.register-username-input input {
  flex: 1 1 auto;
}

.register-username-status {
  display: block;
  margin-top: 0.08rem;
}

.register-username-status--ok {
  color: #1f7a54;
}

.register-username-status--ko {
  color: var(--danger);
}

@media (max-width: 760px) {
  .register-form__section,
  .register-form__section--passwords {
    grid-template-columns: minmax(0, 1fr);
  }

  .register-username-input {
    flex-direction: column;
    align-items: stretch;
  }
}

.data-form .taxonomy-inline-field {
  flex: 1 1 calc(25% - 0.65rem);
  min-width: 180px;
}

.data-form .espece-add-field {
  flex: 1 1 calc((100% - 1.3rem) / 3);
  min-width: 0;
}

/* ─── Grid column filters ─── */
.grid-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  align-items: center;
  margin-bottom: 0;
  flex: 1;
  min-width: min(100%, 320px);
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}

.filter-btn.filter-active {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: rgba(51, 115, 72, 0.08);
}

.filter-caret {
  font-size: 0.72rem;
  opacity: 0.65;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2em;
  height: 1.2em;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0 0.3em;
  line-height: 1;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  min-width: 190px;
  max-height: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-panel[hidden] {
  display: none;
}

.filter-option-all {
  padding: 0.38rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.83rem;
  flex-shrink: 0;
}

.filter-options-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.25rem 0;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
  font-size: 0.83rem;
  user-select: none;
  transition: background 0.08s;
}

.filter-option:hover {
  background: var(--surface-soft);
}

.filter-option input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--primary);
}

body.density-compact .filter-btn {
  font-size: 0.76rem;
  padding: 0.1rem 0.38rem;
}

body.density-compact .filter-option {
  font-size: 0.76rem;
  padding: 0.18rem 0.55rem;
}

body.density-compact .grid-filters {
  gap: 0.6rem;
  margin-bottom: 0;
}
.compact-field span,
.form-field span,
.auth-form label span,
.data-form label span {
  font-size: 0.82rem;
  color: var(--muted);
}

.required-marker {
  margin-left: 0.28rem;
  color: var(--danger);
  font-weight: 800;
}

.compact-field .required-marker,
.form-field .required-marker,
.auth-form label .required-marker,
.data-form label .required-marker {
  color: var(--danger);
}

.required-marker.required-marker--filled {
  color: #1f7a54;
}

.compact-field .required-marker.required-marker--filled,
.form-field .required-marker.required-marker--filled,
.auth-form label .required-marker.required-marker--filled,
.data-form label .required-marker.required-marker--filled {
  color: #1f7a54;
}

.required-note {
  margin-top: 0.35rem;
  font-weight: 600;
}

.required-label > span:first-child {
  color: var(--danger);
  font-weight: 700;
}

.field-label {
  display: inline-flex;
  align-items: baseline;
  cursor: pointer;
  text-decoration: underline dotted rgba(81, 99, 90, 0.45);
  text-underline-offset: 0.16rem;
  position: relative;
}

.label-help-trigger {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  cursor: pointer;
  text-decoration: underline dotted rgba(81, 99, 90, 0.45);
  text-underline-offset: 0.16rem;
}

.label-help-pop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  z-index: 45;
  width: min(82vw, 320px);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid #d7c7a8;
  background: #fff6e9;
  color: #5b4328;
  box-shadow: var(--shadow-soft);
  font-size: 0.8rem;
}

.label-help-trigger.help-open .label-help-pop {
  display: block;
}

.field-inline-error {
  display: none;
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 700;
}

.password-policy {
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(207, 214, 209, 0.95);
  background: linear-gradient(180deg, #fbfffb 0%, #f6fbf6 100%);
}

.password-policy__intro {
  margin: 0;
}

.password-policy__rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.32rem;
}

.password-policy__rule {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--danger);
  transition: color 0.16s ease;
}

.password-policy__rule--valid {
  color: #1f7a54;
}

.password-policy__rule--invalid {
  color: var(--danger);
}

.password-policy__rule[data-password-rule-state="valid"] {
  color: #1f7a54;
}

.password-policy__rule[data-password-rule-state="invalid"] {
  color: var(--danger);
}

.password-policy__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  flex: 0 0 1rem;
  font-weight: 900;
}

.password-policy__rule--valid .password-policy__status {
  color: #1f7a54;
}

.password-policy__rule[data-password-rule-state="valid"] .password-policy__status {
  color: #1f7a54;
}

.password-policy__rule--invalid .password-policy__status {
  color: var(--danger);
}

.password-policy__rule[data-password-rule-state="invalid"] .password-policy__status {
  color: var(--danger);
}

.auth-form label {
  position: relative;
}

input,
select,
button,
.link-button {
  font: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0.54rem 0.68rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s;
}

input:focus,
select:focus,
button:focus,
.link-button:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

input.field-error,
select.field-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 58, 47, 0.15);
}

button {
  background: linear-gradient(140deg, var(--primary), var(--primary-strong));
  color: #fff;
  border-color: transparent;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.ghost-btn,
.link-button {
  background: #f0f4ef;
  color: var(--ink);
  border-color: var(--border);
  text-decoration: none;
  display: inline-block;
}

.btn-sm-oiseaux {
  padding: 0.4rem 0.55rem;
  font-size: 0.92rem;
  line-height: 1.15;
}

.btn-danger {
  background: linear-gradient(140deg, #c54539, #a63027);
}

.btn-danger:hover {
  box-shadow: 0 7px 14px rgba(170, 53, 44, 0.24);
}

.auth-panel {
  max-width: 520px;
}

.profile-panel {
  max-width: 1000px;
}

.form-section {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem 0.8rem;
  border-left: 4px solid #c8d8cc;
  border-radius: 0.45rem;
  background: #f8fbf7;
}

.form-section h3 {
  margin-bottom: 0.65rem;
}

.form-subsection-title {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e6df;
}

.form-subsection-title h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f7a54;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.profile-grid .full-span {
  grid-column: 1 / -1;
}

.profile-grid .readonly-field input {
  background: #f7f9f4;
  color: var(--muted);
}

.avatar-current {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #c8d8cc;
  object-fit: cover;
  background: #fff;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.avatar-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  background: #fff;
}

.avatar-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f3f8f2;
}

.avatar-choice input:checked + .avatar-thumb {
  box-shadow: 0 0 0 2px #2b7a78, 0 0 0 6px rgba(43, 122, 120, 0.16);
}

.auth-links {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .auth-form--grid,
  .profile-form,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  background: #fcfdfb;
  transition: transform 0.12s, box-shadow 0.18s, border-color 0.18s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #bfd2c4;
  box-shadow: var(--shadow-soft);
}

.card-value {
  margin: 0.3rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-strong);
}

.card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* ── Param cards (module Paramètres) ─────────────────────────────────────── */
.param-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.param-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  transition: border-color 0.15s;
}

.param-card--active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.param-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.param-cle {
  font-family: var(--font-mono, monospace);
  font-size: 0.92rem;
  color: var(--primary-strong);
  word-break: break-all;
}

.param-valeur {
  font-size: 0.95rem;
  color: var(--text);
}

.param-description {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.sort-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.sort-link:hover {
  color: var(--primary-strong);
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.tools-panel {
  padding: 0.58rem 0.72rem;
  gap: 0.45rem;
}

.compact-link,
.compact-import-form button,
.compact-import-form input[type="file"] {
  font-size: 0.84rem;
  padding: 0.34rem 0.5rem;
}

.compact-import-form {
  gap: 0.45rem;
}



.form-panel {
  position: relative;
  max-height: 1800px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top center;
  clip-path: inset(0 0 0 0);
  transition:
    max-height 0.34s ease,
    opacity 0.26s ease,
    padding 0.24s ease,
    margin 0.24s ease,
    transform 0.32s ease,
    clip-path 0.32s ease;
}

#table-container {
  margin-top: 1rem;
}

.form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 244, 239, 0.25));
  transform-origin: top center;
  transform: scaleY(0);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.24s ease;
}

.form-panel.is-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  clip-path: inset(0 0 100% 0);
  overflow: hidden;
  margin: 0;
  padding: 0;
  border-width: 0;
}

.form-panel.is-collapsed::before {
  transform: scaleY(1);
  opacity: 0.92;
}

.parametres-admin-panel {
  max-height: none;
  overflow: visible;
  clip-path: none;
}

.admin-params-table-wrap {
  overflow-x: auto;
}

.admin-params-table {
  min-width: 860px;
}

.admin-params-list {
  display: grid;
  gap: 0.7rem;
}

.admin-param-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.65rem 0.72rem;
}

.admin-param-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.admin-param-key {
  font-family: var(--font-mono, monospace);
  color: var(--primary-strong);
  word-break: break-all;
}

.admin-param-status {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  white-space: nowrap;
}

.admin-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}

.admin-param-value {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .admin-param-grid {
    grid-template-columns: 1fr;
  }
}

.grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.grid-search {
  min-width: min(100%, 280px);
  flex: 0 1 320px;
}

#carousel-toggle {
  margin-left: auto;
}

.mini-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* Panneau de navigation "Éléments de la salle" : plus fin, présent sur tous les sous-modules Salle. */
.salle-submodules-panel {
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.7rem;
}

.salle-submodules-panel .section-head {
  margin-bottom: 0.45rem;
}

.salle-submodules-panel h2 {
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.salle-submodules-panel .grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.salle-submodules-panel .card {
  padding: 0.45rem 0.65rem;
}

.salle-submodules-panel .card h3 {
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
}

.salle-submodules-panel .card-sub {
  font-size: 0.76rem;
}

.salle-submodules-panel .card--active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

.data-table tbody tr.data-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.data-table tbody tr.data-row:nth-child(odd) {
  background: rgba(231, 243, 236, 0.75);
}

.data-table tbody tr.data-row:nth-child(even) {
  background: rgba(244, 236, 224, 0.55);
}

.data-table tbody tr.data-row:hover,
.data-table tbody tr.data-row:focus-visible {
  background: rgba(208, 238, 219, 0.92);
}

/* Edit hint: accent gauche + icone ✎ pour signaler le double-clic */
.data-table tbody tr.data-row:hover td:first-child,
.data-table tbody tr.data-row:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}

.data-table tbody tr.data-row:hover td:last-child::after,
.data-table tbody tr.data-row:focus-visible td:last-child::after {
  content: " ✎";
  color: var(--primary);
  opacity: 0.6;
  font-size: 0.88em;
  pointer-events: none;
}

#table-container.carousel-mode .table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}

#table-container.carousel-mode .data-table {
  width: auto;
  border-collapse: separate;
}

#table-container.carousel-mode .data-table thead {
  display: none;
}

#table-container.carousel-mode .data-table tbody {
  display: flex;
  gap: 0.75rem;
}

#table-container.carousel-mode .data-table tr.data-row {
  display: block;
  min-width: min(92vw, 430px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

#table-container.carousel-mode .data-table td {
  display: block;
  border-bottom: 1px dashed #dfe7e1;
}

#table-container.carousel-mode .data-table td:last-child {
  border-bottom: 0;
}

#table-container.carousel-mode .data-table td::before {
  content: attr(data-label);
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1rem;
}

.taxonomy-inline-assist {
  margin-top: 0.35rem;
  position: relative;
}

.taxonomy-inline-assist.has-suggestions {
  margin-bottom: 12.5rem;
}

.taxonomy-inline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

#taxonomy-suggest-status {
  min-height: 1.1rem;
  color: var(--primary-strong);
}

.taxonomy-suggest-dropdown {
  position: absolute;
  z-index: 26;
  left: 0;
  right: auto;
  min-width: max(100%, 24rem);
  width: min(52rem, calc(100vw - 2rem));
  top: calc(100% + 0.25rem);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  min-height: 11rem;
  max-height: 560px;
  overflow: auto;
}

.taxonomy-suggest-list {
  display: grid;
  gap: 0;
}

.taxonomy-suggest-item {
  border: 0;
  border-bottom: 1px solid #e8efe9;
  background: #fff;
  width: 100%;
  text-align: left;
  padding: 0.52rem 0.62rem;
  display: grid;
  gap: 0.12rem;
}

.taxonomy-suggest-item:last-child {
  border-bottom: 0;
}

.taxonomy-suggest-item:hover,
.taxonomy-suggest-item:focus-visible {
  background: rgba(229, 244, 234, 0.9);
}

.taxonomy-suggest-item.is-active {
  background: rgba(212, 236, 220, 0.95);
  box-shadow: inset 3px 0 0 var(--primary);
}

.taxonomy-suggest-item strong {
  color: var(--primary-strong);
}

.taxonomy-suggest-item span,
.taxonomy-suggest-item small {
  color: var(--muted);
}

.taxonomy-manual-search {
  margin-top: 0.45rem;
}

.pagination-bar {
  margin-top: 0.75rem;
  justify-content: space-between;
}

.pagination-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

#table-container.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.63;
}

#table-container.loading::after {
  content: "Mise a jour...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.72);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  align-items: center;
  justify-content: center;
  background: rgba(22, 35, 28, 0.52);
  padding: 1rem;
}

.modal-overlay.visible {
  display: flex;
}

.modal-box {
  width: min(580px, 100%);
  max-height: 80vh;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 2px solid #ce7067;
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  padding: 1.2rem;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: #8d251d;
}

.modal-data {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.modal-data td {
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 0.5rem;
}

.modal-data td:first-child {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

@media (min-width: 900px) {
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.9rem;
  }

  .topbar-main {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .menu {
    display: flex;
    margin-top: 0;
  }

  .userbox {
    margin-top: 0;
    justify-content: flex-end;
  }

  .hero-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .form-panel {
    top: 0;
  }
}

/* ─── Density: compact mode ─── */
body.density-compact .data-table th,
body.density-compact .data-table td {
  padding: 0.15rem 0.36rem;
  font-size: 0.83rem;
  line-height: 1.25;
}

body.density-compact #table-container {
  margin-top: 0.6rem;
}

body.density-compact .panel {
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.6rem;
}

body.density-compact .card {
  padding: 0.42rem 0.55rem;
}

body.density-compact .card-value {
  font-size: 1.1rem;
}

body.density-compact h1 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

body.density-compact h2 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

body.density-compact .eyebrow {
  display: none;
}

body.density-compact .hero-stats {
  gap: 0.38rem;
}

body.density-compact .counter-chip {
  padding: 0.1rem 0.42rem;
  font-size: 0.73rem;
}

body.density-compact .grid-toolbar {
  margin-bottom: 0.38rem;
  gap: 0.5rem;
}

body.density-compact input,
body.density-compact select,
body.density-compact textarea {
  padding-block: 0.2rem;
  font-size: 0.88rem;
}

body.density-compact .data-form {
  gap: 0.45rem;
}

body.density-compact #table-container.carousel-mode .data-table tr.data-row {
  min-width: min(86vw, 350px);
  padding: 0.18rem;
}

body.density-compact #table-container.carousel-mode .data-table td::before {
  font-size: 0.71rem;
  margin-bottom: 0.06rem;
}

/* ─── High-contrast theme ─── */
body.theme-hc {
  --bg: #ffffff;
  --bg-mesh-a: #ffffff;
  --bg-mesh-b: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f0f0f0;
  --ink: #000000;
  --muted: #2a2a2a;
  --primary: #004d28;
  --primary-strong: #003018;
  --secondary: #994000;
  --danger: #8a0000;
  --border: #555555;
  --ring: rgba(0, 77, 40, 0.45);
  background: #ffffff;
}

body.theme-hc .topbar {
  background: #ffffff;
  border-bottom: 2px solid #000;
  backdrop-filter: none;
}

body.theme-hc .panel {
  border-width: 2px;
  border-color: #333;
}

body.theme-hc .menu a:hover,
body.theme-hc .menu a:focus-visible {
  background: #d0f0d0;
  border-color: #000;
  color: #000;
}

body.theme-hc .data-table th,
body.theme-hc .data-table td {
  border-bottom: 1px solid #555;
}

body.theme-hc .data-table th {
  background: #f0f0f0;
}

body.theme-hc input,
body.theme-hc select {
  border-color: #555;
  border-width: 2px;
}

body.theme-hc .user-pill {
  border-color: #555;
  color: #000;
}

body.theme-hc .user-avatar {
  border-color: #fff;
  box-shadow: none;
}

body.theme-hc .card {
  border-color: #555;
}

/* ─── Topbar tool buttons ─── */
.icon-btn {
  background: #f0f4ef;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.icon-btn:hover {
  background: #dde8d8;
}

.icon-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-strong);
}

.bird-photo-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.62rem;
  height: 1.62rem;
  padding: 0;
  border-radius: 0.58rem;
  border: 1px solid rgba(20, 47, 32, 0.18);
  background: linear-gradient(160deg, #ffffff 0%, #eef6ef 100%);
  box-shadow: 0 4px 10px rgba(19, 41, 28, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  color: #17382a;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.bird-photo-action-btn svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  stroke: currentColor;
}

.bird-photo-action-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(160deg, #ffffff 0%, #dff0e2 100%);
  border-color: rgba(31, 111, 67, 0.35);
  box-shadow: 0 8px 16px rgba(19, 41, 28, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bird-photo-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(19, 41, 28, 0.14), inset 0 1px 2px rgba(15, 33, 23, 0.18);
}

.bird-photo-action-btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
  box-shadow: 0 2px 6px rgba(19, 41, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.bird-photo-action-btn.is-star-primary {
  color: #1e8a3f;
  border-color: rgba(30, 138, 63, 0.42);
  background: linear-gradient(160deg, #f8fff8 0%, #dff7e4 100%);
  box-shadow: 0 6px 14px rgba(30, 138, 63, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.bird-photo-action-btn.is-star-secondary {
  color: #d5a100;
  border-color: rgba(213, 161, 0, 0.42);
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c9 100%);
  box-shadow: 0 6px 14px rgba(213, 161, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.bird-photo-action-btn.is-danger {
  color: #a63027;
  border-color: rgba(166, 48, 39, 0.4);
  background: linear-gradient(160deg, #fff8f7 0%, #ffe0de 100%);
}

.bird-photo-action-btn.is-share {
  color: #0f6179;
  border-color: rgba(15, 97, 121, 0.38);
  background: linear-gradient(160deg, #f4fcff 0%, #d7f2ff 100%);
}

.bird-photo-action-btn.is-download {
  color: #2a5b8e;
  border-color: rgba(42, 91, 142, 0.38);
  background: linear-gradient(160deg, #f5f9ff 0%, #dfeaff 100%);
}

.bird-photo-action-btn.is-privacy {
  color: #86621a;
  border-color: rgba(134, 98, 26, 0.38);
  background: linear-gradient(160deg, #fffdf1 0%, #ffefbf 100%);
}

.bird-photo-actions-row {
  margin-top: 0.45rem;
  display: flex;
  justify-content: center;
}

.bird-photo-actions-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.2rem;
}

.bird-photo-actions-grid .bird-photo-action-btn {
  width: 100%;
  min-width: 0;
}

.topbar-tools {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

/* ─── Keyboard shortcuts overlay ─── */
.shortcuts-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  background: rgba(22, 35, 28, 0.6);
  padding: 1rem;
}

.shortcuts-overlay.visible {
  display: flex;
}

.shortcuts-box {
  width: min(520px, 100%);
  max-height: 80vh;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
  padding: 1.4rem;
}

.shortcuts-box h2 {
  margin-top: 0;
}

.shortcuts-list {
  width: 100%;
  border-collapse: collapse;
}

.shortcuts-list td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.shortcuts-list td:first-child {
  width: 35%;
}


.professional-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.75rem;
  border: 1px solid #d8e2d8;
  border-radius: 0.35rem;
  background: #fafcf9;
}

.professional-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a8f5f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: -0.3rem;
}

.professional-group-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.professional-group-fields label {
  display: flex;
  flex-direction: column;
}

@media (max-width: 760px) {
  .professional-group-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {

  .data-table thead {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.65rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 34, 27, 0.05);
  }

  .data-table td {
    border-bottom: 1px dashed #dfe7e1;
    padding: 0.5rem 0.58rem;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .actions-cell {
    flex-direction: column;
    align-items: stretch;
  }

  .data-form .taxonomy-inline-field {
    flex: 1 1 100%;
    min-width: min(100%, 220px);
  }

  .data-form .espece-add-field {
    flex: 1 1 100%;
    min-width: min(100%, 220px);
  }

  .form-field--classifications-description {
    margin-inline-start: 0;
  }

  .actions-cell form,
  .actions-cell a,
  .actions-cell button {
    width: 100%;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Keep true table layout on mobile when carousel mode is disabled. */
  #table-container:not(.carousel-mode) .data-table {
    display: table;
    width: 100%;
    table-layout: auto;
  }

  #table-container:not(.carousel-mode) .data-table thead {
    display: table-header-group;
  }

  #table-container:not(.carousel-mode) .data-table tbody {
    display: table-row-group;
  }

  #table-container:not(.carousel-mode) .data-table tr,
  #table-container:not(.carousel-mode) .data-table tr.data-row {
    display: table-row;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    background: transparent;
  }

  #table-container:not(.carousel-mode) .data-table td {
    display: table-cell;
    width: auto;
    border-bottom: 1px solid var(--border);
    padding: 0.48rem 0.58rem;
  }

  #table-container:not(.carousel-mode) .data-table td::before {
    content: none;
    display: none;
  }

  .parametres-admin-panel .admin-params-table {
    display: table;
    width: 100%;
    table-layout: auto;
  }

  .parametres-admin-panel .admin-params-table thead {
    display: table-header-group;
  }

  .parametres-admin-panel .admin-params-table tbody {
    display: table-row-group;
  }

  .parametres-admin-panel .admin-params-table tr {
    display: table-row;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    background: transparent;
  }

  .parametres-admin-panel .admin-params-table td {
    display: table-cell;
    width: auto;
    border-bottom: 1px solid var(--border);
    padding: 0.48rem 0.58rem;
  }

  .parametres-admin-panel .admin-params-table td::before {
    content: none;
    display: none;
  }

  #admin-params-table {
    display: table !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  #admin-params-table thead {
    display: table-header-group !important;
  }

  #admin-params-table tbody {
    display: table-row-group !important;
  }

  #admin-params-table tr {
    display: table-row !important;
  }

  #admin-params-table td {
    display: table-cell !important;
    width: auto !important;
  }

  #admin-params-table td::before {
    content: none !important;
    display: none !important;
  }
}

/* ── Dashboard v5.4.0 ───────────────────────────────────────────────────── */
.dashboard-chart-panel .status-histo {
  margin-top: 0.55rem;
  min-height: 220px;
  padding: 0.4rem 0.2rem 0.1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.status-col {
  display: grid;
  grid-template-rows: auto 142px auto auto;
  gap: 0.25rem;
  min-width: 0;
}

.status-col-value {
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-bar-track {
  height: 142px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background:
    linear-gradient(to top, rgba(31, 122, 84, 0.06), rgba(31, 122, 84, 0.01)),
    repeating-linear-gradient(
      to top,
      transparent,
      transparent 23px,
.status-col--drillable {
  cursor: pointer;
}
      rgba(31, 42, 36, 0.06) 24px,
      rgba(31, 42, 36, 0.06) 24px
    );
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.15rem;
}

.status-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 0.45rem 0.45rem 0.2rem 0.2rem;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.status-col-label {
  text-align: center;
  font-size: 0.79rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-col-percent {
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .dashboard-chart-panel .status-histo {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 0.55rem;
  }

  .status-col {
    grid-template-rows: auto 118px auto auto;
  }

  .status-bar-track {
    height: 118px;
  }
}

/* Onglets saisons */
.saison-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.saison-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Grille cages */
.cages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 0.6rem;
}

.cage-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.cage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cage-num {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--primary);
}

.cage-souche {
  font-size: 0.78rem;
  background: var(--bg);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  color: var(--muted);
}

.cage-birds {
  display: flex;
  gap: 0.5rem;
  font-size: 0.87rem;
  flex-wrap: wrap;
}

.cage-male { color: #2563eb; }
.cage-femelle { color: #db2777; }

.cage-nichees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.nichee-chip {
  font-size: 0.75rem;
  background: #f0faf3;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  color: var(--muted);
}

/* .cage-edit supprimé v5.4.0 */
.cage-edit-icon {
  position: absolute;
  bottom: 0.5rem;
  right: 0.6rem;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.45;
  line-height: 1;
  transition: opacity 0.15s;
}
.cage-edit-icon:hover { opacity: 1; color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   BIRD MASCOT — v5.6.1
   ═══════════════════════════════════════════════════════════════ */

/* ── A. Mascotte topbar ────────────────────────────────────────── */
.brand-mark--bird {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(140deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-bird-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 20%;
  display: block;
  transition: transform 0.35s ease;
}

.brand:hover .brand-bird-img {
  transform: scale(1.12) rotate(-4deg);
}

/* ── B. Login split-screen ─────────────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 700px) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    min-height: 60vh;
  }
}

.auth-split-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #e8f5e9 0%, #fff9c4 50%, #fce4ec 100%);
  box-shadow: var(--shadow-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  gap: 0.75rem;
  min-height: 18rem;
}

.auth-bird-img {
  width: 42%;
  max-width: 160px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.18));
  animation: bird-float 4s ease-in-out infinite;
}

@keyframes bird-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.auth-split-tagline {
  font-family: "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-strong);
  line-height: 1.3;
  text-align: center;
  margin: 0;
}

.registration-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(8, 24, 16, 0.58);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.registration-success-card {
  width: min(100%, 38rem);
  background: #ffffff;
  border: 3px solid #1f7a54;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 1rem 1rem 1.1rem;
  text-align: center;
}

.registration-success-icon {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1;
}

.registration-success-card h2 {
  margin: 0.35rem 0 0.5rem;
  color: #13583c;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
}

.registration-success-message {
  margin: 0;
  color: #1b2a22;
  font-size: 1rem;
  line-height: 1.45;
}

.registration-success-message strong {
  font-weight: 800;
}

.registration-success-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.registration-success-open-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid #1f7a54;
  background: #1f7a54;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.registration-success-open-mail:hover,
.registration-success-open-mail:focus {
  background: #14543a;
}

.registration-success-resend-form {
  margin: 0;
}

.registration-success-resend-link {
  background: transparent;
  border: 0;
  color: #155c40;
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
  padding: 0.22rem 0.15rem;
}

.registration-success-resend-link:hover,
.registration-success-resend-link:focus {
  color: #0e412d;
}

.registration-success-secondary-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.registration-success-close,
.registration-success-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 0.9rem;
  border-radius: 0.65rem;
  font-weight: 700;
  text-decoration: none;
}

.registration-success-close {
  background: #f3f7f5;
  color: #155c40;
  border: 1px solid #bfd8cc;
  cursor: pointer;
}

.registration-success-login {
  background: #14543a;
  color: #ffffff;
  border: 1px solid #14543a;
}

.registration-success-close:hover,
.registration-success-close:focus {
  background: #e5f0ea;
}

.registration-success-login:hover,
.registration-success-login:focus {
  background: #0f432e;
}

.registration-success-footnote {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── C. Dashboard hero bird ────────────────────────────────────── */
.hero-title-bird {
  margin: 0.15rem 0 0.4rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-bird-flight {
  position: absolute;
  top: 0.72rem;
  left: -3rem;
  width: 3rem;
  height: 2.2rem;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  animation: bird-fly-across 18s ease-in-out infinite;
}

@keyframes bird-fly-across {
  0% {
    transform: translateX(0) translateY(0) rotate(-4deg);
  }
  16% {
    transform: translateX(calc(16vw - 2.3rem)) translateY(-26px) rotate(-1deg);
  }
  32% {
    transform: translateX(calc(35vw - 4rem)) translateY(-18px) rotate(1deg);
  }
  48% {
    transform: translateX(calc(50vw - 5rem)) translateY(10px) rotate(0deg);
  }
  66% {
    transform: translateX(calc(68vw - 5.8rem)) translateY(24px) rotate(-1deg);
  }
  82% {
    transform: translateX(calc(86vw - 6.6rem)) translateY(24px) rotate(0deg);
  }
  100% {
    transform: translateX(calc(100vw - 7rem)) translateY(0) rotate(0deg);
  }
}

.hero-bird-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.parrot-body {
  fill: #27ae60;
  stroke: #1e8449;
  stroke-width: 0.8;
}

.parrot-chest {
  fill: #f1c40f;
  stroke: #d4a017;
  stroke-width: 0.6;
}

.parrot-head {
  fill: #2ecc71;
  stroke: #27ae60;
  stroke-width: 0.8;
}

.parrot-face-mark {
  fill: #ecf0f1;
  opacity: 0.7;
}

.parrot-tail-red {
  fill: #e74c3c;
  stroke: #c0392b;
  stroke-width: 0.8;
}

.parrot-tail-blue {
  fill: #3498db;
  stroke: #2980b9;
  stroke-width: 0.8;
  opacity: 0.85;
}

.parrot-crest {
  fill: none;
  stroke: #e74c3c;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.parrot-eye-base {
  fill: #ecf0f1;
}

.parrot-eye {
  fill: #2c3e50;
}

.parrot-pupil {
  fill: #ffffff;
}

.parrot-beak {
  fill: #34495e;
  stroke: #2c3e50;
  stroke-width: 0.6;
}

.parrot-beak-top {
  fill: #7f8c8d;
  opacity: 0.5;
}

.parrot-legs,
.parrot-feet {
  stroke: #d4a574;
}

.parrot-wing {
  fill: #3498db;
  stroke: #2980b9;
  stroke-width: 0.8;
  opacity: 0.95;
  transform-origin: 50% 50%;
}

.parrot-wing-main {
  animation: wing-flap-main 0.35s ease-in-out infinite alternate;
}

.parrot-wing-accent {
  fill: #e74c3c;
  stroke: #c0392b;
  stroke-width: 0.6;
  opacity: 0.8;
  animation: wing-flap-main 0.35s ease-in-out infinite alternate;
}

.hero-bird-flight.bird-glide .parrot-wing-main,
.hero-bird-flight.bird-glide .parrot-wing-accent {
  animation: none;
  transform: rotate(8deg);
}

@keyframes wing-flap-main {
  0% { transform: rotate(-28deg); }
  100% { transform: rotate(24deg); }
}

@keyframes wing-flap-secondary {
  0% { transform: rotate(-18deg); }
  100% { transform: rotate(18deg); }
}

.hero-bird-flight:hover .hero-bird-svg {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-bird-flight:hover .hero-bird-photo {
  transform: scale(1.08);
}

/* Bulle Piou ! */
.piou-bubble {
  position: fixed;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-strong);
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 1rem 1rem 1rem 0;
  padding: 0.25rem 0.65rem;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  animation: piou-rise 0.9s ease-out forwards;
}

@keyframes piou-rise {
  0%   { opacity: 1; transform: translate(-50%, 0) scale(1); }
  60%  { opacity: 1; transform: translate(-50%, -28px) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(0.9); }
}

/* ── Responsive : cacher le héros bird sur très petit écran ───── */
@media (max-width: 480px) {
  .auth-split-visual { min-height: 12rem; }
  .auth-bird-img { max-width: 110px; }
  .registration-success-card {
    padding: 0.95rem 0.85rem 1rem;
  }
  .registration-success-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .registration-success-open-mail {
    width: 100%;
  }
  .registration-success-resend-link {
    width: 100%;
    text-align: center;
    padding: 0.55rem 0.4rem;
    border: 1px solid #bfd8cc;
    border-radius: 0.6rem;
    text-decoration: none;
  }
  .registration-success-secondary-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .registration-success-close,
  .registration-success-login {
    width: 100%;
  }
  .hero-bird-flight {
    top: 0.65rem;
    animation-duration: 14s;
    left: -2.5rem;
    width: 2.5rem;
    height: 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bird-flight,
  .parrot-wing,
  .parrot-wing-accent,
  .piou-bubble {
    animation: none !important;
  }
}
