/* 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;
}

@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 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);
}

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

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

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

/* ─── 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;
}

.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;
}

.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-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;
}

.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));
}

.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-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);
  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,
body.density-compact .hint {
  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);
}

.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);
  }

  .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;
  }
}

/* ── 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;
}

/* ── 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; }
  .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;
  }
}
