
:root{
  --bg:#07110d;--side:#06100c;--panel:#112119;--panel2:#162a20;
  --line:#29463a;--text:#f2f7f4;--muted:#9eb5a8;--accent:#91d47f;
  --accent2:#5aa868;--danger:#6e2d2d;--gold:#ddbd72;--blue:#80b7d2;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,#07100d,#0a1712);color:var(--text);font-family:Inter,system-ui,Segoe UI,sans-serif;padding-bottom:env(safe-area-inset-bottom)}
button,input,select{font:inherit}.hidden{display:none!important}
.layout{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;background:var(--side);border-right:1px solid var(--line);padding:20px 17px 54px}
.sidebar-head{display:flex;justify-content:space-between;gap:12px;align-items:center}
.mobile-menu-toggle{display:none;border:1px solid var(--line);border-radius:10px;background:#12251c;color:var(--text);padding:10px 12px;font-weight:800;cursor:pointer}
.app-tools{display:grid;gap:8px;margin-top:16px}
.connection-status{display:block;color:var(--muted);font-size:.76rem;text-align:center}
.connection-status.offline{color:#ffe5a4}
.logo{font-size:1.9rem;font-weight:900;letter-spacing:-.04em}.logo.large{font-size:2.5rem}.logo span{color:var(--accent)}
.subtitle{color:var(--muted);font-size:.85rem;margin-top:3px}.search-box{display:grid;gap:7px;margin:22px 0 14px}
nav{display:grid;gap:8px}.nav,.button{border:1px solid var(--line);border-radius:10px;background:#12251c;color:var(--text);padding:10px 12px;cursor:pointer}
.nav{text-align:left;background:transparent;color:var(--muted)}.nav.active,.nav:hover,.button:hover{background:var(--panel2);color:var(--text);border-color:#4c705e}
.button.primary{background:var(--accent);color:#07110d;font-weight:850;border:0}.button.danger{background:var(--danger)}.button.gold{background:var(--gold);color:#171108;border:0}
.button.mode-switch{background:#183344;border-color:#426e83;color:#d9f2ff;font-weight:800}
.button.dev{font-size:.82rem}.version{position:fixed;left:17px;bottom:12px;color:var(--muted);font-size:.8rem;background:var(--side);padding:4px 7px;border-radius:6px}
main{padding:24px 28px;max-width:1550px;width:100%;min-width:0;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;min-width:0;margin-bottom:20px}
.topbar h1{margin:0}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pill{border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:8px 11px}
.grid{display:grid;gap:14px}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line);border-radius:15px;padding:16px;box-shadow:0 18px 50px #0003}
.card h2,.card h3{margin-top:0}.kpi{font-size:1.9rem;font-weight:850}.muted{color:var(--muted)}.tiny{font-size:.78rem}
.item{border:1px solid var(--line);border-radius:10px;padding:10px;margin-bottom:8px;background:#0b1812}
.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}
table{width:100%;border-collapse:collapse}th,td{padding:9px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{color:var(--muted)}
.bar{height:7px;background:#06100c;border-radius:99px;overflow:hidden;border:1px solid #20372d}.bar span{display:block;height:100%;background:linear-gradient(90deg,var(--accent2),var(--accent))}
.badge{display:inline-block;border-radius:999px;padding:4px 8px;background:#20342a;font-size:.76rem}.badge.blue{background:#183344;color:#cceeff}.badge.gold{background:#3a311a;color:#ffe5a4}
input,select{width:100%;padding:10px;background:#06100c;color:white;border:1px solid var(--line);border-radius:9px}
.game-mode-choice{display:grid;gap:8px;margin:4px 0;padding:12px;border:1px solid var(--line);border-radius:12px}
.game-mode-choice label{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;padding:10px;border-radius:9px;background:#0b1812;cursor:pointer}
.game-mode-choice input{width:auto;margin-top:3px}
.game-mode-choice span{display:grid;gap:3px}.game-mode-choice small{color:var(--muted);line-height:1.35}
.modal{position:fixed;inset:0;background:#000c;display:grid;place-items:center;padding:20px;z-index:100}.modal-card{display:grid;gap:12px;width:min(540px,100%);max-height:calc(100vh - 40px);overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:24px}
#newGameModal .modal-card{gap:8px;padding:18px}#newGameModal h1,#newGameModal p{margin:0}#newGameModal .notice{margin-bottom:0;padding:9px 12px}#newGameModal .game-mode-choice{padding:8px;margin:0}#newGameModal .game-mode-choice label{padding:7px}
.race-visual{height:170px;border-radius:12px;background:radial-gradient(circle at 50% 35%,#eff5ec 0 15%,#b7c7ba 16% 27%,transparent 28%),linear-gradient(145deg,#21372d,#0b1812);display:grid;place-items:end center;padding:13px;overflow:hidden}
.rabbit-shape{font-size:5rem;filter:drop-shadow(0 8px 12px #0008)}.id-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#cbe7d5;font-size:.82rem}
.notice{border-left:4px solid var(--accent);background:#10241a;border-radius:9px;padding:12px 14px;margin-bottom:14px}.notice.warn{border-color:var(--gold);background:#2a2515}
.assistant-toggle{position:fixed;right:18px;bottom:18px;z-index:80;background:var(--accent);color:#07110d;border:0;border-radius:999px;padding:12px 17px;font-weight:850;box-shadow:0 12px 35px #0008}
.assistant-panel{position:fixed;right:18px;bottom:72px;width:min(400px,calc(100vw - 36px));height:580px;z-index:79;background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 70px #000a;display:grid;grid-template-rows:auto 1fr auto}
.assistant-head{display:flex;justify-content:space-between;gap:10px;padding:14px;border-bottom:1px solid var(--line)}.icon-button{border:0;background:transparent;color:white;font-size:1.5rem;cursor:pointer}
.assistant-messages{overflow:auto;padding:12px}.message{padding:10px 11px;background:#172b21;border-radius:10px;margin-bottom:8px;line-height:1.45}.assistant-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:10px;border-top:1px solid var(--line)}.assistant-actions .button{font-size:.78rem;padding:8px}
.search-result{cursor:pointer}.search-result:hover{border-color:var(--accent)}
@media(max-width:980px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:sticky;z-index:70;top:0;height:auto;overflow:visible;border-right:0;border-bottom:1px solid var(--line);padding:calc(10px + env(safe-area-inset-top)) 14px 10px}
  .mobile-menu-toggle{display:block;min-height:44px}
  .mobile-navigation{display:none;max-height:calc(100vh - 78px);overflow:auto;padding-top:6px;padding-bottom:12px}
  .sidebar.menu-open .mobile-navigation{display:block}
  .sidebar.menu-open{z-index:110;box-shadow:0 18px 45px #000b}
  .sidebar .subtitle{font-size:.72rem}
  .sidebar .logo{font-size:1.55rem}
  .search-box{margin:10px 0}
  nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .nav{min-height:44px;padding:9px;font-size:.88rem}
  .version{display:none}
  .g4,.g3,.g2{grid-template-columns:1fr}
  .topbar{align-items:flex-start;flex-direction:column}
}
@media(max-width:650px){
  main{padding:15px 11px}
  nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  .assistant-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .assistant-panel{right:8px;bottom:68px;width:calc(100vw - 16px);height:min(650px,calc(100vh - 82px))}
  .assistant-toggle{left:10px;right:auto;bottom:calc(10px + env(safe-area-inset-bottom))}
  .topbar{gap:10px;margin-bottom:14px}
  .topbar h1{font-size:1.65rem}
  .actions{gap:6px;min-width:0;width:100%}
  .pill,.actions .button{padding:8px 10px;min-height:42px}
  #content,.card{min-width:0;max-width:100%}
  .card{padding:13px;border-radius:12px}
  table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  #rankingTable{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  #rankingTable table{display:table;width:max-content;min-width:100%}
}

.sex{font-size:1.15rem;font-weight:900}
.sex-f{color:#ef9ebd}
.sex-m{color:#7dbbe8}
.capacity-meter{height:15px;background:#06100c;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.capacity-meter span{display:block;height:100%;background:linear-gradient(90deg,var(--accent2),var(--accent))}
.capacity-meter.over span{background:linear-gradient(90deg,#a94444,#e47c7c)}
.metric{display:grid;grid-template-columns:1fr auto;gap:10px;padding:7px 0;border-bottom:1px solid var(--line)}
.assistant-input{display:grid;grid-template-columns:1fr auto;gap:7px;padding:10px;border-top:1px solid var(--line)}
.message.user{margin-left:45px;background:#203249}
.notice.danger{border-color:#d46f6f;background:#2a1717}

.date-button{color:var(--text)}
.calendar-card{width:min(900px,96vw);max-height:90vh;overflow:auto}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}
.calendar-day{min-height:86px;border:1px solid var(--line);border-radius:10px;background:#0b1812;padding:8px}
.calendar-day.today{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.calendar-day.outside{opacity:.35}
.calendar-day-number{font-weight:800}
.calendar-event{font-size:.72rem;margin-top:5px;padding:3px 5px;border-radius:6px;background:#1b3327;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.waiting-tag{background:#513d1d;color:#ffe1a4}
.construction-progress{height:12px;background:#06100c;border:1px solid var(--line);border-radius:99px;overflow:hidden}
.construction-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--accent))}
.money-negative{color:#ff9d9d}

.animal-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-top:10px}
.sex-chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:.78rem;font-weight:800;background:#20342a}
.sex-chip.f{color:#ffd2e3;border:1px solid #8f5068}
.sex-chip.m{color:#cae7ff;border:1px solid #3c6889}
.age-chip{display:inline-block;margin-top:5px;padding:4px 8px;border-radius:999px;background:#1b3026;color:#d7e8dd;font-size:.76rem}
.index-row{margin-bottom:11px}
.index-label{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.index-value{font-variant-numeric:tabular-nums;font-weight:850}
.race-picture{width:100%;height:auto;aspect-ratio:3/2;border-radius:13px;position:relative;overflow:hidden;border:1px solid #2c4639;background:#343838}
.race-picture::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 30%,#ffffff18,transparent 45%)}
.rabbit-svg{width:100%;height:100%;display:block}
.card .floating-stage{position:absolute;right:10px;bottom:10px}
.no-overlap{position:relative;z-index:2}

.real-rabbit-photo{
  width:100%;height:100%;object-fit:cover;object-position:center;display:block;
}
.real-rabbit-photo.lapereau,.real-rabbit-photo.jeune,.real-rabbit-photo.adulte{transform:none}
.filter-grid{
  display:grid;
  grid-template-columns:minmax(180px,1fr) minmax(200px,1fr) minmax(190px,1fr) auto;
  gap:10px;
  align-items:end;
}
@media(max-width:900px){.filter-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.filter-grid{grid-template-columns:1fr}}

.orientation-note{
  margin-top:8px;
  padding:8px 10px;
  border-radius:9px;
  background:#0d1c15;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:.82rem;
}

.lab-notice{
  border-color:#d2a333;
  background:linear-gradient(135deg,#3c2b0c,#171309);
  color:#ffe9a8;
  margin-bottom:14px;
}

.bar{
  position:relative;
  height:10px;
  background:
    linear-gradient(90deg,
      transparent 24.5%, #ffffff18 25%, transparent 25.5%,
      transparent 49.5%, #ffffff18 50%, transparent 50.5%,
      transparent 74.5%, #ffffff18 75%, transparent 75.5%),
    #06100c;
  border:1px solid #294236;
  border-radius:999px;
  overflow:hidden;
}
.bar span{
  display:block;
  height:100%;
  min-width:2%;
  border-radius:999px;
}

.dual-index{
  padding:10px 0 12px;
  border-bottom:1px solid #20372c;
}
.dual-index:last-child{border-bottom:0}
.dual-bar-line{
  display:grid;
  grid-template-columns:118px minmax(120px,1fr) minmax(86px,auto);
  gap:8px;
  align-items:center;
  margin-top:6px;
}
.dual-bar-name{
  font-size:.76rem;
  color:var(--muted);
}
.dual-bar-value{
  font-size:.75rem;
  text-align:right;
  color:#d8e8df;
  white-space:nowrap;
}
.measure-bar span{
  background:linear-gradient(90deg,#8ec7ff,#c6e5ff);
}
.rank-bar span{
  background:linear-gradient(90deg,#7fcf84,#b7ee96);
}
.measure-bar,.rank-bar{
  height:8px;
}
@media(max-width:640px){
  .dual-bar-line{
    grid-template-columns:1fr;
    gap:4px;
  }
  .dual-bar-value{text-align:left}
}

.dual-legend{
  margin-top:14px;
  font-size:.86rem;
  line-height:1.5;
}

.pair-result{
  padding:12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0c1913;
}
.pair-result h3{margin-top:0}
.kpi.small{font-size:1.45rem}
select[multiple]{min-height:135px}
.search-result{cursor:pointer}
.search-result:hover{background:#173024}

.filter-grid-advanced{
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}
.filter-grid-advanced input{
  width:100%;
}
.filter-summary{
  margin-top:14px;
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0d1b15;
  color:var(--muted);
}
.animal-name-link,.animal-id-link{
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  text-align:left;
  cursor:pointer;
  font:inherit;
}
.animal-name-link:hover,.animal-id-link:hover{
  color:#a7eb8b;
  text-decoration:underline;
}
.animal-open-row:focus{
  outline:2px solid #8fdb7c;
  outline-offset:-2px;
}
.genetic-audit{
  overflow:auto;
}

.assistant-comparison{
  overflow:auto;
}
.assistant-comparison table{
  min-width:540px;
  font-size:.82rem;
}
.comparison-table-wrap{overflow-x:auto;margin:10px 0}
.comparison-table-wrap table{min-width:720px}
.comparison-table-wrap th:not(:first-child),
.comparison-table-wrap td:not(:first-child){min-width:130px;text-align:center}
.comparison-panel select[multiple]{min-height:190px}
.assistant-comparison th,
.assistant-comparison td{
  padding:7px 8px;
}
.compare-best{
  color:#a9ee8f;
  font-weight:800;
  background:#183322;
}
.message ol,.message ul{
  margin:.5rem 0 .2rem 1.2rem;
  padding:0;
}
.message li{
  margin:.35rem 0;
}

.compact-animal-card{
  max-width:980px;
}
.compact-animal-header{
  display:grid;
  grid-template-columns:240px 1fr;
  gap:18px;
  align-items:start;
}
.compact-animal-photo{
  width:100%;
  height:190px;
  object-fit:contain;
  background:#343838;
  border-radius:12px;
  border:1px solid var(--line);
}
.animal-details-toggle{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:10px;
}
.animal-details-toggle summary{
  cursor:pointer;
  font-weight:800;
  color:#a8e994;
  padding:8px 0;
}
.details-inner{
  padding-top:8px;
}
.compact-actions{
  margin-top:14px;
}
.comparison-panel{
  display:grid;
  gap:10px;
}
.comparison-panel label{
  display:grid;
  gap:5px;
}
@media(max-width:720px){
  .compact-animal-header{
    grid-template-columns:1fr;
  }
  .compact-animal-photo{
    height:220px;
  }
}

.compact-card-actions{
  margin-top:12px;
}
.compact-animal-summary h2{
  margin:.2rem 0 .5rem;
}
.compact-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:8px;
}
.compact-index{
  font-size:1.1rem;
}
.market-card .dual-index,
.market-card .index-row{
  display:none !important;
}
.market-card[data-show],
.animal-card[data-show],
.animal-open-row[data-show]{cursor:pointer}
.market-card[data-show]:focus-visible,
.animal-card[data-show]:focus-visible,
.animal-open-row[data-show]:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}

.animal-modal{
  position:fixed;
  inset:0;
  z-index:3000;
  display:none;
}
.animal-modal.open{
  display:block;
}
.animal-modal-backdrop{
  position:absolute;
  inset:0;
  background:#000a;
  backdrop-filter:blur(3px);
}
.animal-modal-dialog{
  position:relative;
  width:min(1180px,calc(100% - 30px));
  max-height:calc(100vh - 30px);
  overflow:auto;
  margin:15px auto;
  background:#10271c;
  border:1px solid #335844;
  border-radius:18px;
  box-shadow:0 24px 90px #000b;
  padding:22px;
}
.animal-modal-close{
  position:sticky;
  top:0;
  float:right;
  z-index:2;
  width:42px;
  height:42px;
  border:1px solid #476956;
  border-radius:50%;
  background:#0a1711;
  color:white;
  font-size:1.8rem;
  cursor:pointer;
}
.animal-sheet-layout{
  display:grid;
  grid-template-columns:minmax(280px,420px) minmax(420px,1fr);
  gap:28px;
  align-items:start;
}
.animal-sheet-left{position:sticky;top:0}
.animal-sheet-photo{
  width:100%;
  height:320px;
  object-fit:contain;
  background:#343838;
  border-radius:14px;
  border:1px solid #3b5d49;
}
.animal-sheet-identity{display:grid;gap:10px;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#0b1b13}
.animal-sheet-identity p{margin:0}
.animal-sheet-right h2{margin:4px 54px 8px 0;font-size:2rem}
.animal-sheet-index-title{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-top:18px;padding-bottom:10px;border-bottom:1px solid var(--line);font-size:1.05rem;font-weight:800}
.animal-sheet-index-title strong{color:#b7ee96;font-size:1.45rem}
.animal-sheet-indices{max-height:58vh;overflow:auto;padding-right:8px}
body.modal-open{
  overflow:hidden;
}
.litter-list{display:grid;gap:14px;margin-top:14px}
.litter-card{padding:20px}
.litter-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.litter-head h2{margin:8px 0 0}
.litter-survival{display:grid;text-align:right}
.litter-survival strong{font-size:1.65rem;color:#b7ee96}
.litter-survival span{color:var(--muted);font-size:.8rem}
.litter-parents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}
.litter-parent{display:grid;gap:3px;text-align:left;padding:12px;border:1px solid var(--line);border-radius:11px;background:#0b1b13;color:var(--text);cursor:pointer}
.litter-parent:hover{border-color:var(--accent)}
.litter-parent span,.litter-parent small{color:var(--muted)}
.litter-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.litter-metrics div{display:grid;gap:4px;padding:12px;border-radius:10px;background:#14291e}
.litter-metrics span{color:var(--muted);font-size:.78rem}
.litter-offspring{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.litter-young{display:grid;grid-template-columns:1fr auto;gap:3px 10px;text-align:left;padding:10px;border:1px solid var(--line);border-radius:10px;background:#0b1812;color:var(--text);cursor:pointer}
.litter-young small{grid-column:1;color:var(--muted)}
.litter-young b{grid-column:2;grid-row:1 / span 2;align-self:center;color:#b7ee96}
.litter-young:hover{border-color:var(--accent)}
.litter-young.recommended{border-color:#6cae70;background:#12281b;box-shadow:inset 3px 0 #91dc80}
.litter-young em{display:inline-block;margin-left:5px;padding:2px 6px;border-radius:999px;background:#28482f;color:#bff0ad;font-size:.65rem;font-style:normal;font-weight:800}
.litter-young em.weaned{background:#18384b;color:#bfe7ff}
.litter-selection-head{display:flex;justify-content:space-between;align-items:end;gap:14px;margin:4px 0 10px}
.litter-selection-head h3,.litter-selection-head p{margin:0}
.breeding-preview{margin:4px 0 14px;padding:14px;border:1px solid #355c45;border-radius:12px;background:#0b1b13}
.breeding-preview h3{margin:0 0 12px}
.breeding-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.breeding-preview-grid div{display:grid;gap:4px;padding:10px;border-radius:9px;background:#14291e}
.breeding-preview-grid span{color:var(--muted);font-size:.76rem}
.breeding-preview-grid b{font-size:1.08rem;color:#b7ee96}
.breeding-preview .notice{margin:12px 0 0}
.gestation-section{display:grid;gap:12px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:4px 2px}
.section-heading h2,.section-heading p{margin:0}
.gestation-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
.gestation-card{display:grid;gap:12px}
.gestation-head{display:flex;justify-content:space-between;align-items:start;gap:12px}
.animal-name-link{display:grid;gap:3px;text-align:left;border:0;padding:0;background:transparent;color:var(--text);cursor:pointer}
.animal-name-link small{color:var(--muted)}
.animal-name-link:hover b{color:#b7ee96}
.gestation-progress{height:10px;overflow:hidden;border:1px solid var(--line);border-radius:999px;background:#06100c}
.gestation-progress span{display:block;height:100%;background:linear-gradient(90deg,#7fcf84,#b7ee96)}
.gestation-card p{margin:0}
.gestation-father{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;padding:10px;border-radius:9px;background:#0b1b13}
.gestation-father>span{color:var(--muted);font-size:.78rem}
.gestation-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.gestation-metrics div{display:grid;gap:4px;padding:9px;border-radius:8px;background:#14291e}
.gestation-metrics span{color:var(--muted);font-size:.72rem}
.gestation-metrics b{color:#b7ee96}
.save-manager{grid-column:1 / -1}
.restore-list{display:grid;gap:8px;margin-top:14px}
.restore-item{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px;background:#0b1812}
.restore-item>div{display:grid;gap:3px}.restore-item small{color:var(--muted)}
.save-manager hr{margin:18px 0;border:0;border-top:1px solid var(--line)}
.complete-backup-card{border-color:#4e795d;background:linear-gradient(160deg,#173324,#102118)}
.complete-backup-card .button,.file-import-label{width:100%;margin:5px 0}
.file-import-label{display:grid;gap:7px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#0b1812;font-weight:750;cursor:pointer}
.file-import-label input{padding:7px;font-weight:400}
@media(max-width:720px){
  .animal-sheet-layout{
    grid-template-columns:1fr;
  }
  .animal-sheet-left{position:static}
  .animal-sheet-photo{
    height:230px;
  }
  .animal-sheet-indices{max-height:none;overflow:visible;padding-right:0}
  .litter-head{display:grid}.litter-survival{text-align:left}
  .litter-parents,.litter-metrics{grid-template-columns:1fr}
  .breeding-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gestation-metrics{grid-template-columns:1fr}
  .litter-selection-head{display:grid;align-items:start}
  .restore-item{grid-template-columns:1fr}.save-manager{grid-column:auto}
}
.race-program-section{margin-bottom:28px}.race-program-section>.card{margin-bottom:14px}.race-program-card{overflow:hidden}.race-program-head{display:flex;gap:16px;align-items:center;margin-bottom:14px}.race-program-head img{width:170px;aspect-ratio:3/2;object-fit:contain;border-radius:12px;background:#414747}.race-program-head h2{margin:5px 0}.race-program-head h2 small{font-size:.68em;color:var(--muted)}.race-status{display:inline-block;padding:4px 9px;border-radius:999px;font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.race-status.main{background:#dcece3;color:#295c40}.race-status.selection{background:#e7e1f5;color:#553988}.race-status.development{background:#f4dfc9;color:#7a471c}.program-total{display:flex;justify-content:space-between;align-items:center;margin:13px 0;font-size:1.05rem}.trait-program-list{display:grid;gap:7px}.trait-program-row{display:grid;grid-template-columns:minmax(150px,1.4fr) minmax(80px,1fr) auto;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid rgba(120,120,120,.16)}.trait-program-row small{display:block;color:var(--muted)}.trait-progress{height:8px;border-radius:999px;background:rgba(120,120,120,.18);overflow:hidden}.trait-progress i{display:block;height:100%;background:linear-gradient(90deg,#697d65,#a7884e)}.selection-register{margin-top:15px;padding-top:13px;border-top:1px solid rgba(120,120,120,.2)}.selection-register label{display:block;margin:8px 0}.selection-register select{width:100%}@media(max-width:700px){.race-program-head{align-items:flex-start;flex-direction:column}.race-program-head img{width:100%}.trait-program-row{grid-template-columns:1fr auto}.trait-progress{grid-column:1/-1;grid-row:2}}
.race-program-summary{display:grid;grid-template-columns:145px minmax(0,1fr) auto;gap:15px;align-items:center;cursor:pointer;list-style:none}.race-program-summary::-webkit-details-marker{display:none}.race-program-summary img{width:145px;aspect-ratio:3/2;object-fit:contain;border-radius:11px;background:#414747}.race-program-summary h2{margin:5px 0}.race-program-summary p{margin:4px 0;color:var(--muted)}.race-expand-label{align-self:center;color:var(--accent);font-weight:800}.race-program-card[open] .race-expand-label{font-size:0}.race-program-card[open] .race-expand-label::after{content:"Replier";font-size:.92rem}.race-program-body{margin-top:15px;padding-top:15px;border-top:1px solid var(--line)}
.market-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.market-refresh{margin-left:auto}.contest-section{margin-top:22px}.contest-section>.card{margin-bottom:14px}.contest-lineup{display:grid;gap:5px;margin:12px 0;padding:12px;border-radius:10px;background:rgba(95,115,92,.10)}.contest-lineup span{color:var(--muted)}
.contest-lineup-details{margin-top:8px}.contest-lineup-details summary,.item details summary{cursor:pointer;color:var(--accent);font-weight:750;padding:7px 0}.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.contest-results-table{margin-top:8px}.animal-category-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;margin-bottom:10px;scrollbar-width:none}.animal-category-tabs::-webkit-scrollbar{display:none}.animal-category-tabs .button{flex:0 0 auto;white-space:nowrap}.animal-category-tabs .button span{display:inline-grid;place-items:center;min-width:23px;height:23px;margin-left:5px;padding:0 6px;border-radius:999px;background:#07110d;color:var(--muted)}.animal-category-tabs .button.primary span{background:#183d22;color:#fff}.breeder-section{margin-top:22px}.breeder-section>h2{margin-bottom:12px}
.full-ranking{min-width:230px;margin-top:5px}.full-ranking summary{font-size:.78rem}.full-ranking ol{margin:4px 0;padding-left:27px}.full-ranking li{padding:3px 0}.full-ranking li span{display:inline-block;min-width:150px;margin-right:8px}.full-ranking .player-rank{color:var(--accent);font-weight:800}
@media(max-width:700px){.race-program-summary{grid-template-columns:92px minmax(0,1fr);gap:10px}.race-program-summary img{width:92px}.race-program-summary h2{font-size:1.05rem}.race-expand-label{grid-column:1/-1;text-align:right}.animal-category-tabs{margin-left:-11px;margin-right:-11px;padding-left:11px;padding-right:11px}}
@media(max-width:650px){.market-refresh{width:100%;margin-left:0}.button.mode-switch{width:100%}}

/* BreedSim 0.9.37 — navigation animaux et actions groupées */
.animal-tree{display:grid;gap:8px}.animal-tree-head,.animal-tree-special{display:flex;gap:8px;flex-wrap:wrap}.animal-tree details{border:1px solid rgba(120,120,120,.18);border-radius:10px;padding:7px 10px}.animal-tree summary{cursor:pointer;font-weight:800;display:flex;justify-content:space-between;gap:10px}.animal-tree details>div{display:flex;gap:8px;flex-wrap:wrap;padding-top:8px}.animal-tree-item{border:0;background:rgba(120,120,120,.12);padding:8px 10px;border-radius:8px;cursor:pointer;font:inherit;color:inherit}.animal-tree-item span{opacity:.72;margin-left:4px}.animal-tree-item.active{outline:2px solid currentColor;font-weight:800}.animal-bulk-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.animal-bulk-toolbar span{margin-left:auto}.animal-list-count{margin:0 0 10px;color:var(--muted)}.animal-actions{display:flex;gap:6px;flex-wrap:wrap;min-width:190px}.no-repro-tag{margin-top:4px}.animal-sale-check{width:18px;height:18px}.filter-grid select,.filter-grid input{min-height:40px}
@media(max-width:700px){.animal-bulk-toolbar span{margin-left:0}.animal-actions{min-width:150px}.animal-tree-head,.animal-tree-special,.animal-tree details>div{display:grid;grid-template-columns:1fr 1fr}.animal-tree-item{width:100%}}

/* BreedSim 1.0.2 — fiche animal, historique et responsive tablette */
.animal-sheet-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.animal-sheet-tabs .button{min-width:110px}
.animal-rank-summary{display:grid;gap:7px;margin:12px 0 16px;padding:12px;border:1px solid var(--line);border-radius:11px;background:#0b1b13}
.animal-rank-summary>span{color:var(--muted)}.animal-rank-summary summary{cursor:pointer;color:var(--accent);font-weight:800}
.animal-trait-ranks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;margin-top:9px}.animal-trait-ranks span{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid rgba(120,120,120,.14)}
.animal-history-panel{display:grid;gap:16px}.history-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.history-summary-grid>div{display:grid;gap:4px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#0b1b13}.history-summary-grid small{color:var(--muted)}
.history-relations,.history-events{padding:14px;border:1px solid var(--line);border-radius:11px;background:#0b1812}.history-relations h3,.history-events h3{margin-top:0}.history-animal-links{display:grid;gap:7px;margin-top:9px}
.animal-history-link{display:inline-flex;width:auto;text-align:left;border:0;background:transparent;color:var(--accent);font:inherit;font-weight:800;padding:2px 0;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.animal-history-link:hover{opacity:.85}
.history-event{display:grid;grid-template-columns:115px minmax(0,1fr);gap:12px;padding:9px 0;border-bottom:1px solid rgba(120,120,120,.14)}.history-event:last-child{border-bottom:0}.history-event time{color:var(--muted);font-size:.84rem}
.ranking-table td:nth-child(5){min-width:180px}

/* Tablette : exploiter la largeur sans perdre le confort tactile. */
@media (min-width:721px) and (max-width:1180px){
  .animal-modal-dialog{width:min(94vw,1050px);max-height:92vh}
  .animal-sheet-layout{grid-template-columns:minmax(230px,34%) minmax(0,1fr);gap:18px}
  .animal-sheet-photo{width:100%;max-height:360px;object-fit:contain}
  .grid.g3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid.g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-grid-advanced{grid-template-columns:repeat(2,minmax(0,1fr))}
  .button,.animal-tree-item,select,input{min-height:44px}
  table th,table td{padding:10px 9px}
}
@media (max-width:720px){
  .animal-modal-dialog{width:calc(100vw - 12px);max-height:96vh;margin:6px;padding:15px}
  .animal-sheet-tabs{position:sticky;top:0;z-index:3;padding:6px 0;background:var(--panel)}
  .animal-sheet-tabs .button{flex:1 1 120px;min-height:44px}
  .animal-trait-ranks,.history-summary-grid{grid-template-columns:1fr}
  .history-event{grid-template-columns:1fr;gap:3px}
  .ranking-table{min-width:720px}
  .compact-actions .button{flex:1 1 145px;min-height:44px}
}
@media (min-width:1181px){
  .animal-modal-dialog{width:min(92vw,1240px)}
  .history-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

button[data-days]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button[data-days]:disabled{opacity:.6;cursor:wait}

/* 1.2.39 — arborescence animaux */
.animal-race-tree summary[data-animal-stage-category]{cursor:pointer}
.animal-race-tree summary[data-animal-stage-category].active{font-weight:800;outline:2px solid currentColor;border-radius:10px;padding-left:8px;padding-right:8px}


/* BreedSim 1.2.40 — sélection verte de l'arborescence */
.animal-tree .tree-node-selected,
.animal-tree-item.active,
.animal-race-tree summary[data-animal-stage-category].active{
  outline:none !important;
  border-color:var(--accent) !important;
  background:color-mix(in srgb, var(--accent) 22%, transparent) !important;
  color:var(--accent) !important;
  box-shadow:inset 3px 0 0 var(--accent);
  font-weight:850 !important;
}

.animal-tree-item.active{
  border:1px solid color-mix(in srgb, var(--accent) 70%, transparent) !important;
}

.animal-tree .tree-species-selected{
  border-radius:10px;
  padding:8px 10px;
}

.animal-tree .tree-race-selected{
  border-radius:9px;
  padding:7px 9px;
}

.animal-race-tree summary[data-animal-stage-category].active{
  border:1px solid color-mix(in srgb, var(--accent) 70%, transparent) !important;
  border-radius:9px;
  padding:7px 9px !important;
}

.animal-tree .tree-branch-selected{
  border-color:color-mix(in srgb, var(--accent) 55%, var(--line)) !important;
}

.animal-tree-item.active span,
.animal-tree .tree-node-selected span{
  color:inherit;
  opacity:.95;
}

@supports not (background:color-mix(in srgb, red 20%, transparent)){
  .animal-tree .tree-node-selected,
  .animal-tree-item.active,
  .animal-race-tree summary[data-animal-stage-category].active{
    background:rgba(144, 215, 110, .16) !important;
  }
}

/* BreedSim 1.2.44 — barres globales sous Index */
.animal-sheet-index-title + .global-index-bars{
  margin-top:8px;
  margin-bottom:14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(120,120,120,.06);
}

/* BreedSim 1.2.47 — classements par catégorie d'âge */
.ranking-stage-tabs{margin-bottom:12px}
.ranking-stage-tabs .button.primary{font-weight:850}


/* BreedSim 1.2.48 — corrections mobile liste animaux + badges fiche */
.animal-list-count{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.animal-list-selected{color:var(--accent);font-weight:800}
.animals-table-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.animals-table-scroll table{display:table;width:max-content;min-width:100%}
.compact-badges{align-items:center}
.compact-badges .badge{display:inline-flex;align-items:center;justify-content:center;min-height:34px;line-height:1.15;vertical-align:middle}
.compact-badges .badge .sex{display:inline-flex;align-items:center;line-height:1;margin-right:3px}
@media(max-width:700px){
  .animals-table-scroll{margin:0;overscroll-behavior-inline:contain}
  .animals-table-scroll table{min-width:940px}
  .animals-table-scroll th,.animals-table-scroll td{white-space:normal;vertical-align:top}
  .animals-table-scroll th:first-child,.animals-table-scroll td:first-child{position:sticky;left:0;z-index:2;background:var(--panel)}
  .animal-list-count{position:sticky;left:0;min-width:0}
  .compact-badges{display:flex;align-items:center;gap:8px}
  .compact-badges .badge{min-height:36px;margin:0}
}

/* 1.2.49 sauvegarde serveur */
.cloud-account-card{grid-column:1/-1}.cloud-account-card label{display:grid;gap:6px;margin:10px 0}.cloud-account-card input{width:100%}.cloud-account-badge.cloud-connected{border-color:var(--accent);color:var(--accent)}#cloudSyncStatus.cloud-error{color:#f0aaa2}@media(max-width:700px){.cloud-account-card .row{display:grid;grid-template-columns:1fr;gap:8px}.cloud-account-card .button{width:100%}}


/* BreedSim 1.2.51 — généalogie */
.animal-genealogy-panel{display:grid;gap:14px}
.genealogy-root,.genealogy-branch{display:grid;gap:10px}
.genealogy-parents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.genealogy-node{display:grid;gap:3px;padding:10px;border:1px solid var(--line);border-radius:12px;background:rgba(120,120,120,.05);min-width:0}
.genealogy-node.current{border-color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
.genealogy-node.male{border-left:3px solid #79aef2}
.genealogy-node.female{border-left:3px solid #e88cab}
.genealogy-node.archived,.genealogy-node.genealogy-unknown{opacity:.72}
.genealogy-node small,.genealogy-node em,.genealogy-node span{font-size:.78rem}
.genealogy-node em{font-style:normal;color:var(--muted)}
.genealogy-animal-link,.genealogy-child{display:grid;gap:2px;text-align:left;width:100%;background:none;border:0;color:inherit;padding:0;cursor:pointer}
.genealogy-animal-link:hover b,.genealogy-child:hover b{color:var(--accent)}
.genealogy-descendants{display:grid;gap:8px;margin-top:10px}
.genealogy-child{padding:9px;border:1px solid var(--line);border-radius:10px}
.genealogy-child span{font-size:.8rem;color:var(--muted)}
@media(max-width:700px){
  .genealogy-parents{grid-template-columns:1fr}
  .genealogy-branch{padding-left:8px;border-left:1px dashed var(--line)}
  .animal-sheet-tabs{overflow-x:auto;flex-wrap:nowrap}
  .animal-sheet-tabs .button{white-space:nowrap}
}

/* BreedSim 1.2.52 — Index dans la généalogie */
.genealogy-index{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid color-mix(in srgb,var(--accent) 55%,var(--line));
  color:var(--accent);
  font-size:.8rem;
}
.genealogy-child .genealogy-index{margin-top:3px}

/* BreedSim 1.2.54 — alignement stable des actions de filtres */
.filter-actions{display:flex;align-items:end;gap:10px}
.filter-actions-wide{grid-column:1/-1;justify-content:flex-end;padding-top:2px}
.filter-actions-wide .button{min-width:132px}
@media(max-width:700px){
  .filter-actions-wide{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  .filter-actions-wide .button{min-width:0;width:100%;margin:0}
}

/* BreedSim 1.2.55 — navigation globale toutes races */
.animal-global-tree{display:grid;gap:7px;margin:8px 0 14px;padding:10px;border:1px solid var(--line);border-radius:12px}
.animal-global-tree>details>summary{cursor:pointer;padding:7px 9px;border-radius:9px;font-weight:750}
.animal-global-tree>details>summary.active{background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
.animal-global-tree .animal-tree-item{margin-top:5px}
.animal-tree-races-title{margin:12px 2px 7px;color:var(--muted);font-size:.86rem;text-transform:uppercase;letter-spacing:.04em}
@supports not (background:color-mix(in srgb, red 20%, transparent)){
  .animal-global-tree>details>summary.active{background:rgba(144,215,110,.16)}
}

/* BreedSim 1.2.56 — statuts globaux et par race */
.animal-tree-special-race{margin-top:10px;padding-top:9px;border-top:1px dashed var(--line)}
.animal-tree-special-global{margin-top:14px;padding-top:10px;border-top:1px solid var(--line)}
.animal-tree-special-title{margin:2px 4px 6px;color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}

/* BreedSim 1.2.58 — contrôle révélation par race */
.genetic-audit-races{display:grid;gap:9px;margin-top:16px}
.genetic-race-audit{border:1px solid var(--line);border-radius:11px;padding:0 10px}
.genetic-race-audit>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;cursor:pointer;padding:10px 0}
.genetic-race-counts{font-size:.8rem;color:var(--muted);text-align:right}
.genetic-race-audit[open]>summary{color:var(--accent)}
@media(max-width:700px){
  .genetic-race-audit>summary{align-items:flex-start;flex-direction:column}
  .genetic-race-counts{text-align:left}
}

/* BreedSim 1.2.62 — filtres gestantes + actions groupées */
.animal-filter-heading{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.animal-filter-heading span{color:var(--muted);font-size:.85rem}
.animal-bulk-toolbar{display:block}
.animal-bulk-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.animal-bulk-head #animalSelectionCount{margin-left:0}
.animal-bulk-buttons{display:flex;gap:8px;flex-wrap:wrap;width:100%}
@media(max-width:700px){
 .animal-bulk-head{align-items:flex-start}
 .animal-bulk-buttons{display:grid;grid-template-columns:1fr 1fr}
 .animal-bulk-buttons .button{width:100%;margin:0}
}
@media(max-width:430px){.animal-bulk-buttons{grid-template-columns:1fr}}

/* BreedSim 1.2.62 — statuts toutes races alignés */
.animal-tree-special-global,
.animal-tree-special-race{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  align-items:stretch;
}
.animal-tree-special-title{
  grid-column:1/-1;
  width:100%;
  margin:0 0 2px;
}
.animal-tree-special-global .animal-tree-item,
.animal-tree-special-race .animal-tree-item{
  width:100%;
  min-width:0;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  text-align:left;
}
@media(max-width:900px){
  .animal-tree-special-global,
  .animal-tree-special-race{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .animal-tree-special-global,
  .animal-tree-special-race{
    grid-template-columns:1fr;
  }
}

/* BreedSim 1.2.62 — validation mobile statuts */
@media(max-width:700px){
  .animal-tree-special-global,
  .animal-tree-special-race{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  .animal-tree-special-global .animal-tree-special-title,
  .animal-tree-special-race .animal-tree-special-title{
    grid-column:1/-1 !important;
  }
}
@media(max-width:520px){
  .animal-tree-special-global,
  .animal-tree-special-race{
    grid-template-columns:1fr !important;
  }
  .animal-tree-special-global .animal-tree-item,
  .animal-tree-special-race .animal-tree-item{
    min-height:44px;
    padding:10px 12px;
  }
}

/* BreedSim 1.2.64 — maturité des jeunes */
.young-maturity{display:inline-block;margin-top:3px;color:var(--muted);line-height:1.3}
.young-maturity.soon{font-weight:800;color:var(--accent)}

/* BreedSim 1.2.66 — pagination, filtres actifs et contrôle de révélation */
.filter-grid label.filter-active{
  border:2px solid var(--accent);
  background:color-mix(in srgb,var(--accent) 12%,transparent);
  border-radius:10px;
  padding:7px;
  box-shadow:inset 3px 0 0 var(--accent);
}
.animal-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:8px 0 12px}
.animal-pagination label{display:flex;align-items:center;gap:8px}
.animal-pagination select{width:auto;min-width:74px}
.pager-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.animal-list-nav{display:flex;justify-content:flex-end;margin-top:10px}
.audit-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.audit-scope{margin:8px 0 12px}
.audit-scope label{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.audit-scope select{width:auto}
.assistant-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media(max-width:700px){
  .animal-pagination{align-items:stretch;flex-direction:column}
  .pager-buttons{justify-content:space-between}
  .animal-list-nav .button,.audit-head .button{width:100%}
  .audit-scope select{width:100%}
  .assistant-actions{grid-template-columns:1fr}
}

/* BreedSim 1.2.71 — classement dynamique complet */
.ranking-tree{margin-bottom:14px}
.ranking-tree .animal-global-tree{margin-bottom:12px}
.ranking-tree summary.active{background:color-mix(in srgb,var(--accent) 20%,transparent);color:var(--accent);box-shadow:inset 3px 0 0 var(--accent);border-radius:8px;padding:7px 9px}
.ranking-filter-card .filter-grid{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr)}
.ranking-scope{margin:4px 0 12px;color:var(--muted)}
.ranking-pagination{margin:10px 0}
@media(max-width:700px){
  .ranking-filter-card .filter-grid{grid-template-columns:1fr}
  .ranking-tree .animal-race-tree,.ranking-tree .animal-global-tree{grid-template-columns:1fr}
}

/* BreedSim 1.2.76 — badges dynamiques de conservation */
.keep-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.keep-badges.compact{margin-top:5px}
.keep-badge{border:1px solid currentColor;font-weight:800}
.keep-badge.bestIndex{box-shadow:inset 3px 0 0 var(--accent);background:color-mix(in srgb,var(--accent) 15%,transparent)}
.keep-badge.top10{background:color-mix(in srgb,var(--accent) 8%,transparent)}
.keep-badges.compact .keep-badge{font-size:.72rem;padding:3px 6px}

/* BreedSim 1.2.77 — décision génétique garder / vendre */
.keep-decision{font-weight:900;letter-spacing:.02em}
.keep-decision.keep{background:#dff5e6;color:#156b35;border:1px solid #2f9e58}
.keep-decision.sell{background:#fde3e3;color:#9b1c1c;border:1px solid #d84a4a}
.keep-badge.bestIndex{background:#cdefd7;color:#0f5f2c;border-color:#27934e}
.keep-badge.traitTop{background:#e8f7ed;color:#176836;border-color:#56a96f}
.keep-rule{margin-bottom:12px}

/* BreedSim 1.2.78 — distinction reproduction TOP INDEX / TOP INDICE */
.repro-priority-notice{border-left:4px solid var(--accent)}
.repro-race-priority-summary{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.repro-race-priority-summary .badge{font-weight:800}
#femaleSelect optgroup[label*="PRIORITÉ"],#maleSelect optgroup[label*="PRIORITÉ"]{font-weight:900}

/* BreedSim 1.2.79 — centrage badges + potentiel des jeunes */
.keep-badge,
.keep-decision{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.15;
  min-height:28px;
  padding:5px 9px;
  vertical-align:middle;
}
.keep-badges.compact .keep-badge,
.keep-badges.compact .keep-decision{
  min-height:24px;
  padding:4px 7px;
}
.keep-decision.watch{
  background:#fff3cd;
  color:#7a5a00;
  border:1px solid #d6b54a;
}
.keep-badge.youngIndex{
  background:#e7f0ff;
  color:#244f91;
  border-color:#6d95d8;
}
.keep-badge.youngTrait{
  background:#f3f7ff;
  color:#365e9d;
  border-color:#9cb5df;
}
@media(max-width:700px){
  .keep-badges{align-items:stretch}
  .keep-badge,.keep-decision{max-width:100%}
}

/* BreedSim 1.2.81 — jeune supérieur à l'adulte de référence */
.keep-decision.young-better{
  background:#dff5e6;
  color:#156b35;
  border:1px solid #2f9e58;
}
.keep-badge.youngIndex,
.keep-badge.youngTrait{
  background:#e8f7ed;
  color:#176836;
  border-color:#56a96f;
}

/* BreedSim 1.2.83 — signalement des nouveaux adultes par race */
.new-adults-race-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  background:#dff5e6;
  color:#156b35;
  border:1px solid #2f9e58;
  font-weight:900;
  white-space:nowrap;
}
.new-adults-overview{
  margin-bottom:12px;
  border-left:4px solid #2f9e58;
}
@media(max-width:700px){
  .animal-race-node>summary,
  .animal-species-node>summary{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
  }
  .new-adults-race-badge{margin-left:0}
}

/* BreedSim 1.2.84 — pastille nouveaux adultes collée au nom sans décaler les compteurs */
.animal-race-node>summary,
.animal-species-node>summary{
  display:flex;
  align-items:center;
  width:100%;
  gap:8px;
}
.tree-name-with-alert{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.tree-count{
  margin-left:auto;
  flex:0 0 auto;
}
.tree-name-with-alert .new-adults-race-badge{
  margin-left:0;
  flex:0 0 auto;
}
@media(max-width:700px){
  .animal-race-node>summary,
  .animal-species-node>summary{
    flex-wrap:nowrap;
  }
  .tree-name-with-alert{
    flex-wrap:wrap;
    gap:4px 7px;
  }
}

/* BreedSim 1.2.85 — page de connexion */
.auth-gate{z-index:10000;background:rgba(3,10,7,.96)}
.login-card{max-width:520px}
.login-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.login-card input{width:100%}
@media(max-width:600px){.login-actions{grid-template-columns:1fr}.login-card{max-height:92vh;overflow:auto}}

/* BreedSim 1.2.91 — comparaison génétique avec les parents */
.parent-genetic-compare{margin:12px 0 16px;border:1px solid var(--border);border-radius:12px;padding:10px 12px}
.parent-genetic-compare>summary{cursor:pointer;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.parent-compare-controls{margin:12px 0}
.parent-compare-controls select{width:100%;max-width:420px}
.parent-compare-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.parent-compare-grid>div{display:flex;flex-direction:column;gap:3px;padding:10px;border:1px solid var(--border);border-radius:10px;text-align:center}
.parent-compare-grid .parent-mean{background:color-mix(in srgb,var(--accent) 10%,transparent);border-color:color-mix(in srgb,var(--accent) 45%,var(--border))}
.parent-compare-grid small{color:var(--muted)}
.parent-compare-grid b{overflow-wrap:anywhere}
.parent-compare-grid span{font-weight:800}
.parent-compare-summary{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;padding:9px;border-radius:10px;background:var(--surface-2)}
.parent-compare-delta.positive{color:#15713a}
.parent-compare-delta.negative{color:#a32323}
.parent-compare-delta.neutral{color:var(--muted)}
@media(max-width:760px){.parent-compare-grid{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.parent-compare-grid{grid-template-columns:1fr}}

/* BreedSim 1.2.94 — génétique cachée jusqu'à l'âge adulte */
.genetic-locked-notice{margin:10px 0;text-align:center}

/* BreedSim 1.3.00 — tableau Animaux original, boutons alignés sur la ligne */
.animals-table-scroll{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.animals-table-scroll table{
  border-collapse:collapse;
}

.animals-table-scroll tbody tr{
  vertical-align:middle;
}

.animals-table-scroll tbody td{
  vertical-align:middle !important;
}

.animal-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex-wrap:nowrap !important;
  white-space:nowrap;
}

.animal-actions .button{
  flex:0 0 auto;
  white-space:nowrap;
  margin:0;
}

/* Mobile : on garde EXACTEMENT le tableau en lignes d'origine.
   Il défile horizontalement si nécessaire, mais aucune carte verticale n'est créée. */
@media(max-width:700px){
  .animals-table-scroll{
    margin:0;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
  }

  .animals-table-scroll table{
    min-width:940px;
    table-layout:auto;
  }

  .animals-table-scroll th,
  .animals-table-scroll td{
    white-space:nowrap;
    vertical-align:middle !important;
  }

  /* On annule l'effet sticky du premier champ qui pouvait masquer le nom en défilement. */
  .animals-table-scroll th:first-child,
  .animals-table-scroll td:first-child{
    position:static !important;
    left:auto !important;
  }

  .animal-actions{
    min-width:max-content !important;
    flex-wrap:nowrap !important;
    align-items:center;
  }

  .animal-actions .button{
    min-height:38px;
    padding:7px 10px;
    font-size:.85rem;
  }

  .keep-badges{
    vertical-align:middle;
  }
}

/* Tablette : même tableau en lignes, avec plus de place, sans casser les boutons. */
@media(min-width:701px) and (max-width:1100px){
  .animals-table-scroll{
    overflow-x:auto;
  }

  .animals-table-scroll table{
    min-width:1000px;
  }

  .animals-table-scroll th,
  .animals-table-scroll td{
    vertical-align:middle !important;
  }

  .animal-actions{
    flex-wrap:nowrap !important;
    min-width:max-content;
  }
}

/* BreedSim 1.3.01 — alignement strict de chaque ligne Animaux */
.animals-table-scroll tbody tr{
  display:table-row !important;
  height:72px;
}

.animals-table-scroll tbody tr > td{
  display:table-cell !important;
  height:72px;
  min-height:72px;
  box-sizing:border-box;
  vertical-align:middle !important;
  padding-top:8px !important;
  padding-bottom:8px !important;
  border-bottom:1px solid var(--line) !important;
}

.animals-table-scroll tbody tr > td.animal-actions{
  display:table-cell !important;
  vertical-align:middle !important;
  white-space:nowrap;
}

.animals-table-scroll tbody tr > td.animal-actions > .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  vertical-align:middle;
  margin:0 4px 0 0 !important;
  min-height:40px;
}

/* Annule les anciennes règles flex de la cellule Actions. */
.animals-table-scroll .animal-actions{
  flex-wrap:initial !important;
  gap:initial !important;
  align-items:initial !important;
  justify-content:initial !important;
}

/* Mobile : même ligne horizontale, même hauteur pour toutes les colonnes. */
@media(max-width:700px){
  .animals-table-scroll tbody tr{
    display:table-row !important;
    height:72px !important;
  }

  .animals-table-scroll tbody tr > td{
    display:table-cell !important;
    height:72px !important;
    min-height:72px !important;
    vertical-align:middle !important;
  }

  .animals-table-scroll tbody tr > td.animal-actions{
    display:table-cell !important;
    height:72px !important;
    vertical-align:middle !important;
    min-width:330px !important;
  }

  .animals-table-scroll tbody tr > td.animal-actions > .button{
    display:inline-flex !important;
    min-height:40px;
    margin:0 4px 0 0 !important;
  }
}

/* Tablette : même principe, sans changement de présentation. */
@media(min-width:701px) and (max-width:1100px){
  .animals-table-scroll tbody tr,
  .animals-table-scroll tbody tr > td{
    height:72px;
    vertical-align:middle !important;
  }

  .animals-table-scroll tbody tr > td.animal-actions{
    display:table-cell !important;
    vertical-align:middle !important;
  }
}

/* BreedSim 1.3.02 — 10 indices visibles dans la liste Animaux */
.all-indices-cell{
  min-width:980px;
  vertical-align:middle !important;
}
.animal-row-indices{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:nowrap;
  white-space:nowrap;
}
.animal-row-index{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:30px;
  padding:4px 7px;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(120,120,120,.06);
  white-space:nowrap;
}
.animal-row-index-label{
  color:var(--muted);
  font-size:.70rem;
}
.animal-row-index b{
  font-size:.80rem;
  color:var(--text);
}
.animal-row-index.selected-trait{
  border-color:#8fdc72;
  background:rgba(143,220,114,.20);
  box-shadow:inset 0 0 0 1px rgba(143,220,114,.35);
}
.animal-row-index.selected-trait .animal-row-index-label,
.animal-row-index.selected-trait b{
  color:#b7ee96;
  font-weight:900;
}
.filter-active select#animalsTrait{
  border-color:#8fdc72;
  box-shadow:0 0 0 2px rgba(143,220,114,.20);
}

/* Le tableau reste strictement en lignes sur téléphone/tablette.
   Les indices supplémentaires défilent horizontalement avec le reste du tableau. */
@media(max-width:700px){
  .animals-table-scroll table{
    min-width:1950px;
  }
  .all-indices-cell{
    min-width:920px;
  }
  .animal-row-index{
    min-height:28px;
    padding:3px 6px;
  }
  .animal-row-index-label{font-size:.66rem}
  .animal-row-index b{font-size:.76rem}
}
@media(min-width:701px) and (max-width:1100px){
  .animals-table-scroll table{
    min-width:2050px;
  }
  .all-indices-cell{
    min-width:980px;
  }
}

/* BreedSim 1.3.03 — statuts reproduction compacts sur deux lignes */
.status-two-lines{
  display:inline-flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  line-height:1.15;
  white-space:nowrap;
  vertical-align:middle;
}
.status-two-lines > span:last-child{
  font-size:.88em;
  color:var(--muted);
}

/* BreedSim 1.3.04 — Pas repro + gommettes sur une même ligne */
.animal-decision-line{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex-wrap:nowrap;
  min-height:30px;
  margin-top:5px;
  white-space:nowrap;
}
.animal-decision-line .no-repro-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 !important;
  min-height:28px;
  padding:4px 7px;
  vertical-align:middle;
}
.animal-decision-line .keep-badges{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
  margin:0 !important;
  vertical-align:middle;
}
.animal-decision-line .keep-badges .badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 !important;
  min-height:28px;
  vertical-align:middle;
}

/* Même position verticale pour toutes les lignes, avec ou sans Pas repro */
.animals-table-scroll tbody td:nth-child(2){
  vertical-align:middle !important;
}
.animals-table-scroll tbody td:nth-child(2) .animal-name-link{
  vertical-align:middle;
}

@media(max-width:700px){
  .animal-decision-line{
    gap:5px;
    flex-wrap:nowrap;
  }
  .animal-decision-line .no-repro-tag,
  .animal-decision-line .keep-badges .badge{
    min-height:27px;
    padding:3px 6px;
  }
}

/* BreedSim 1.3.06 — réinitialisation une partie ou toutes */
.reset-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){.reset-actions{display:grid;grid-template-columns:1fr}.reset-actions .button{width:100%}}

/* BreedSim 1.3.08 — INDEX général plus visible dans la liste Animaux */
.animal-index-box{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:96px;
  min-height:38px;
  padding:5px 9px;
  box-sizing:border-box;
  border:1.5px solid #8fdc72;
  border-radius:9px;
  background:rgba(143,220,114,.13);
  box-shadow:inset 0 0 0 1px rgba(143,220,114,.10);
  white-space:nowrap;
  vertical-align:middle;
}
.animal-index-box-label{
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.035em;
  color:#9fdb88;
}
.animal-index-box b{
  font-size:1rem;
  line-height:1;
  color:var(--text);
  font-variant-numeric:tabular-nums;
}
@media(max-width:700px){
  .animal-index-box{
    min-width:91px;
    min-height:36px;
    padding:4px 7px;
    gap:6px;
  }
  .animal-index-box-label{font-size:.64rem}
  .animal-index-box b{font-size:.95rem}
}

/* BreedSim 1.3.10 — résultats concours séparés par race et sexe */
.contest-race-result{margin-top:14px;padding-top:8px;border-top:1px solid var(--line)}
.contest-race-result>h3{margin-bottom:8px}
.contest-sex-ranking{margin:10px 0 16px}
.contest-sex-ranking h4{margin:0 0 7px}
.contest-sex-ranking .player-rank{font-weight:800}

/* BreedSim 1.3.13 — accès rapide aux décisions génétiques */
.animal-quick-decisions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0 12px;
}
.animal-quick-decisions .button.active{
  box-shadow:0 0 0 2px rgba(143,220,114,.35);
  font-weight:900;
}
@media(max-width:700px){
  .animal-quick-decisions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .animal-quick-decisions .button{
    width:100%;
  }
  .animal-quick-decisions #clearKeepFilter{
    grid-column:1/-1;
  }
}


/* BreedSim 1.3.17 — fiche animal tablette corrigée réellement */
@media (min-width:721px) and (max-width:1180px){
  .animal-modal-dialog{
    width:min(96vw,1080px) !important;
    box-sizing:border-box;
  }

  .animal-sheet-layout{
    grid-template-columns:minmax(260px,32%) minmax(0,1fr) !important;
    gap:22px !important;
    align-items:start !important;
  }

  .animal-sheet-left,
  .animal-sheet-right,
  .animal-sheet-identity{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  .animal-sheet-left{
    position:static !important;
  }

  .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    max-height:320px !important;
    aspect-ratio:3/2;
    object-fit:contain !important;
  }

  .animal-sheet-identity{
    overflow:hidden !important;
    padding:13px !important;
  }

  .animal-sheet-identity p,
  .animal-sheet-identity div,
  .animal-sheet-identity b,
  .animal-sheet-identity span{
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  /* Les statuts sur deux lignes restent DANS le bloc de gauche. */
  .animal-sheet-identity .status-two-lines{
    display:inline-flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    max-width:100% !important;
    white-space:normal !important;
    line-height:1.2 !important;
  }

  .animal-sheet-identity .status-two-lines > span{
    display:block;
    max-width:100%;
    white-space:normal !important;
    overflow-wrap:anywhere;
  }

  .animal-sheet-right{
    overflow:hidden !important;
  }

  .animal-sheet-right h2{
    font-size:1.7rem !important;
    overflow-wrap:anywhere;
  }

  .animal-sheet-index-title,
  .global-index-bars,
  .animal-rank-summary,
  .animal-sheet-indices,
  .index-row,
  .dual-index,
  .dual-bar-line{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  .dual-bar-name{
    min-width:0 !important;
    white-space:normal !important;
  }
}

/* Tablette portrait : une colonne nette plutôt que deux colonnes qui se chevauchent. */
@media (min-width:721px) and (max-width:900px){
  .animal-sheet-layout{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }

  .animal-sheet-left{
    display:grid;
    grid-template-columns:minmax(220px,38%) minmax(0,1fr);
    gap:16px;
    align-items:start;
  }

  .animal-sheet-photo{
    margin:0 !important;
  }

  .animal-sheet-identity{
    margin-top:0 !important;
  }

  .animal-sheet-indices{
    max-height:none !important;
    overflow:visible !important;
    padding-right:0 !important;
  }
}


/* BreedSim 1.3.29 — fiche animal : photo tablette légèrement agrandie,
   sans empiéter sur le bloc d'informations. */
@media (min-width:901px) and (max-width:1180px){
  .animal-sheet-layout{
    grid-template-columns:minmax(300px,36%) minmax(0,1fr) !important;
    gap:20px !important;
  }
  .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    aspect-ratio:3 / 2 !important;
    object-fit:contain !important;
    object-position:center !important;
  }
}
@media (min-width:721px) and (max-width:900px){
  .animal-sheet-left{
    grid-template-columns:minmax(250px,42%) minmax(0,1fr) !important;
    gap:16px !important;
  }
  .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    aspect-ratio:3 / 2 !important;
    object-fit:contain !important;
    object-position:center !important;
  }
}
@media (max-width:720px){
  .animal-sheet-photo{
    object-fit:contain !important;
    object-position:center !important;
  }
}

/* BreedSim 1.3.31 — afficher la photo entière sur toutes les fiches */
.animal-sheet-photo{
  object-fit:contain !important;
  object-position:center center !important;
}

/* BreedSim 1.3.32 — cadre photo au ratio des visuels, sans recadrage */
@media (min-width:721px){
  .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    aspect-ratio:3 / 2 !important;
    object-fit:contain !important;
    object-position:center center !important;
  }
}

/* BreedSim 1.3.33 — ratio réel des photos lapins : 1536×1024 = 3:2 */
.animal-sheet-photo{
  width:100% !important;
  height:auto !important;
  aspect-ratio:3 / 2 !important;
  object-fit:contain !important;
  object-position:center center !important;
}

/* BreedSim 1.3.34 — synthèse génétique tableau de bord */
.dashboard-genetic-position{overflow:hidden}
.dashboard-race-ranks{display:grid;gap:18px;margin-top:14px}
.dashboard-race-rank{padding-top:12px;border-top:1px solid var(--line)}
.dashboard-race-rank:first-child{border-top:0;padding-top:0}
.dashboard-race-rank h3{margin:0 0 10px}
.dashboard-sex-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dashboard-sex-rank{min-width:0;border:1px solid var(--line);border-radius:12px;padding:10px;background:#0b1b13}
.dashboard-sex-rank h4{margin:0 0 8px;display:flex;justify-content:space-between;gap:8px}
.dashboard-sex-rank h4 small{font-weight:500;color:var(--muted)}
.dashboard-rank-table{width:100%;font-size:.86rem}
.dashboard-rank-table th,.dashboard-rank-table td{padding:7px 6px;white-space:nowrap}
.dashboard-rank-table .rank-first td{background:rgba(120,210,100,.12)}
.dashboard-rank-table .rank-first td:nth-child(3){color:#b7ee96}
.dashboard-rank-table .rank-top3 td:nth-child(3){font-weight:900}
.dashboard-rank-table .rank-top10 td:nth-child(3){font-weight:800}
.compact-dashboard-link{padding:0!important;min-height:0!important}
@media(max-width:900px){.dashboard-sex-grid{grid-template-columns:1fr}}

/* BreedSim 1.3.35 — inscription concours visible sur la fiche */
.animal-contest-badge{border-color:#b7ee96!important;background:rgba(143,220,100,.14)!important;color:#d7ffb8!important}
.animal-contest-registration{margin:0 0 14px;padding:12px;border:1px solid rgba(183,238,150,.45);border-radius:12px;background:rgba(92,160,69,.08)}
.animal-contest-registration h3{margin:0 0 10px}
.animal-contest-registration-row{display:grid;gap:4px;padding:9px 0;border-top:1px solid var(--line)}
.animal-contest-registration-row:first-of-type{border-top:0;padding-top:0}
.animal-contest-registration-row small{color:var(--muted)}

/* BreedSim 1.3.37 — concours protégés */
.contest-list-badge{display:inline-flex;max-width:100%;white-space:normal;border-color:#b7ee96!important;background:rgba(143,220,100,.12)!important}

/* BreedSim 1.3.37 — report bancaire exceptionnel */
.bank-deferral-box{margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:12px}
.bank-deferral-box h3{margin:0 0 6px}
.bank-deferral-box p{margin:0 0 10px}

/* BreedSim 1.3.48 — palmarès visuel */
.animal-award-badges{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.award-chip{display:inline-flex;align-items:center;justify-content:center;min-height:25px;padding:2px 7px;border:1px solid var(--line);border-radius:999px;font-weight:800;line-height:1;background:var(--panel)}
.animal-award-badges.compact{gap:3px}
.animal-award-badges.compact .award-chip{min-height:21px;padding:1px 5px;font-size:.86rem}
.award-chip.trophy{box-shadow:inset 0 0 0 1px rgba(180,130,20,.18)}

/* BreedSim 1.3.65 — trophées distincts des médailles */
.trophy-icon{display:inline-flex;align-items:center;gap:4px;font-weight:850;white-space:nowrap}
.trophy-icon svg{width:1.15em;height:1.15em;fill:currentColor;vertical-align:-.16em}
.trophy-rank-1{color:#d7a900}.trophy-rank-2{color:#bfc6ce}.trophy-rank-3{color:#b87333}
.award-chip.trophy.rank-1{border-color:#d7a900}.award-chip.trophy.rank-2{border-color:#bfc6ce}.award-chip.trophy.rank-3{border-color:#b87333}
.public-contest-summary{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:6px 0}
.contest-result-badge{font-weight:800}

/* BreedSim 1.3.70 — Palmarès neutre : texte/fond blancs-neutres, couleur uniquement sur l'icône */
.award-chip,
.award-chip.trophy,
.award-chip.medal,
.award-chip.trophy.rank-1,
.award-chip.trophy.rank-2,
.award-chip.trophy.rank-3,
.award-chip.medal.rank-1,
.award-chip.medal.rank-2,
.award-chip.medal.rank-3{
  background:var(--panel) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
  box-shadow:none !important;
}
.reward-inline{display:inline-flex;align-items:center;gap:5px;color:var(--text) !important;background:transparent !important}
.reward-label,.award-count,.palmares-reward-cell{color:var(--text) !important;background:transparent !important}
.trophy-icon{display:inline-flex;align-items:center}
.trophy-icon svg{width:1.15em;height:1.15em;fill:currentColor}
.trophy-rank-1{color:#d7a900 !important}
.trophy-rank-2{color:#c7cdd4 !important}
.trophy-rank-3{color:#b87333 !important}
.medal-icon{font-size:1.05em;line-height:1}
.palmares-reward-cell .reward-inline{font-weight:700}

/* BreedSim 1.3.74 — Palmarès navigable vers le détail du concours */
.palmares-clickable-row{cursor:pointer}
.palmares-clickable-row:hover,.palmares-clickable-row:focus{background:rgba(255,255,255,.055);outline:none}
.contest-palmares-focus{margin-bottom:16px}
.contest-palmares-focus .player-rank{font-weight:850;background:rgba(255,255,255,.055)}

/* BreedSim 1.3.75 — résultats complets directement dans Concours */
.contest-result-block{margin-bottom:14px}
.contest-result-block>details>summary{cursor:pointer;font-weight:850;margin-top:8px}
.contest-results-table td,.contest-results-table th{vertical-align:top}
.contest-participants-table{margin-top:8px;max-height:520px;overflow:auto}
.contest-participants-table .player-rank{background:rgba(255,255,255,.055)}
.full-ranking summary{cursor:pointer;font-weight:750}

/* BreedSim 1.3.85 — classement général éleveurs du concours */
.contest-breeder-ranking{margin:10px 0 14px}
.contest-breeder-ranking>summary{cursor:pointer;font-weight:850}
.contest-breeder-ranking .player-rank{font-weight:850;background:rgba(255,255,255,.055)}

.contest-animal-ranking-card{margin-bottom:16px}.contest-animal-ranking-card .filter-grid{margin:12px 0}

/* BreedSim 1.3.88 — menus déroulants Classements / Concours */
.ranking-fold,.contest-fold{margin-bottom:12px}
.ranking-fold>summary,.contest-fold>summary,.contest-race-result>summary,.contest-sex-ranking>summary,.contest-race-entry>summary{
  cursor:pointer;font-weight:850;display:flex;align-items:center;justify-content:space-between;gap:10px
}
.ranking-fold>.fold-content,.contest-fold>.fold-content,.contest-race-result>.fold-content,.contest-race-entry>.fold-content{margin-top:12px}
.contest-race-result,.contest-sex-ranking{margin:10px 0}
.contest-race-result>summary,.contest-sex-ranking>summary{padding:8px 0}
.nested-card{box-shadow:none}

/* BreedSim 1.3.92 — détail du classement éleveurs par race */
.breeder-race-breakdown>summary{cursor:pointer;font-weight:800}
.breeder-race-detail{margin-top:8px}
.breeder-race-detail table{font-size:.94em}

/* BreedSim 1.3.93 — classement des éleveurs par race */
.breeder-race-ranking-card label{display:block;max-width:420px;margin:10px 0}

/* BreedSim 1.4.45 — base module Poules */
.poultry-section{margin-bottom:14px}
.poultry-race-card>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;align-items:center}
.poultry-traits{columns:2;column-gap:24px;margin:8px 0 0}
.poultry-traits li{break-inside:avoid;margin:4px 0}
.poultry-traits li.specific{font-weight:650}
.compact-table{width:100%;border-collapse:collapse}
.compact-table th,.compact-table td{padding:6px 8px;text-align:left;vertical-align:top}
.compact-table th{width:42%}
@media(max-width:760px){.poultry-traits{columns:1}}

.animal-species-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}

.building-species-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.poultry-facility-card .metric{margin:7px 0}

.animal-name-with-photo{display:flex;align-items:center;gap:10px}
.animal-table-photo{width:62px;height:62px;object-fit:cover;border-radius:10px;background:#b8b8b8;border:1px solid rgba(255,255,255,.12)}
.market-animal-photo{width:100%;max-height:180px;aspect-ratio:4/3;object-fit:contain;border-radius:12px;background:#b8b8b8;margin-bottom:10px}
.animal-detail-photo-wrap{text-align:center;margin-bottom:14px}
.animal-detail-photo{width:min(360px,100%);aspect-ratio:4/3;object-fit:contain;border-radius:16px;background:#b8b8b8}

/* Poultry 1.4.46: photos use the same 3:2 source format as rabbit photos. */
.market-animal-photo,.animal-detail-photo{object-fit:cover;object-position:center;background:#343838}
.poultry-detail-modal{display:none;position:fixed;inset:0;z-index:9999}
.poultry-detail-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.78)}
.poultry-detail-modal-panel{position:relative;z-index:1;max-width:900px;max-height:92vh;overflow:auto;margin:4vh auto;padding:12px}
@media(max-width:760px){.poultry-detail-modal-panel{margin:1vh 8px;max-height:98vh}}

/* 1.4.46 : centrage de sécurité des volailles dans les cartes/fiches. */
.market-animal-photo,.animal-table-photo,.animal-detail-photo{
  object-fit:contain !important;
  object-position:center center !important;
  background:#252723 !important;
}

/* 1.4.46 — affichage volailles calé sur les cartes lapins.
   Le fichier reste 1536x1024 ; l'image remplit maintenant toute la zone. */
.market-animal-photo{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:3/2 !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0 0 10px 0 !important;
  padding:0 !important;
  border-radius:12px !important;
  background:#242725 !important;
}
.animal-table-photo{
  width:112px !important;
  aspect-ratio:3/2 !important;
  object-fit:cover !important;
  object-position:center !important;
  background:#242725 !important;
}
.animal-detail-photo{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:3/2 !important;
  object-fit:cover !important;
  object-position:center !important;
  background:#242725 !important;
}

/* 1.4.46 — Poules utilisent exactement les composants Lapins.
   Aucun format image spécifique dans les cartes/fiches. */
.market-card .race-picture .race-photo{
  width:100% !important;height:100% !important;object-fit:cover !important;object-position:center !important;
}
.modal-animal-sheet .animal-sheet-photo{
  width:100% !important;aspect-ratio:3/2 !important;object-fit:cover !important;object-position:center !important;
}

/* 1.4.46 — photos poules: même cadre que lapins, sans cadre intérieur. */
.market-card .race-picture{overflow:hidden !important;}
.market-card .race-picture > img.race-photo{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:cover !important;
  object-position:center center !important;
  background:transparent !important;
}
.modal-animal-sheet img.animal-sheet-photo{
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  aspect-ratio:3/2 !important;
  object-fit:cover !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
}

/* 1.4.46 — volailles: photo studio plein cadre, même occupation que lapins */
.market-card .race-picture>img.race-photo{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;margin:0!important;padding:0!important;max-width:none!important;max-height:none!important}

/* 1.4.63 — structure commune : photo entière dans toutes les listes/classements */
.animal-table-photo{
  width:140px;
  height:88px;
  object-fit:contain !important;
  object-position:center center !important;
  background:#252927;
  border-radius:10px;
  flex:0 0 140px;
}
.animal-name-with-photo{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:360px;
}
@media (max-width:900px){
  .animal-table-photo{width:112px;height:76px;flex-basis:112px}
  .animal-name-with-photo{min-width:300px}
}

.poultry-cycle-status{display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.2;color:var(--accent,#91df7f)}
.poultry-cycle-status small{display:block;margin-top:4px;color:#d9e8dc;font-size:.78em;white-space:nowrap;font-weight:500}
.poultry-cycle-detail{margin-top:10px;line-height:1.5}

/* 1.4.64 — cadre commun listes/classements */
.animal-table-photo{
  width:156px !important;
  height:104px !important;
  flex:0 0 156px !important;
  box-sizing:border-box !important;
  object-fit:contain !important;
  object-position:center center !important;
  padding:7px !important;
  background:#242826 !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:12px !important;
}
.animal-name-with-photo{
  min-width:390px !important;
  gap:12px !important;
}
@media (max-width:900px){
  .animal-table-photo{
    width:128px !important;
    height:88px !important;
    flex-basis:128px !important;
    padding:6px !important;
  }
  .animal-name-with-photo{min-width:320px !important}
}


/* 1.4.67 — structure commune Lapins/Volailles : catégorie + M/F */
.animal-global-tree .animal-tree-stage{
  min-width:0;
  border:1px solid var(--line,rgba(255,255,255,.12));
  border-radius:14px;
  padding:10px;
}
.animal-tree-stage>.animal-tree-stage-all{
  width:100%;
  display:flex;
  justify-content:space-between;
  font-weight:700;
}
.animal-tree-sexes{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  margin-top:4px;
}
.animal-tree-sexes .animal-tree-item{
  width:100%;
  display:flex;
  justify-content:space-between;
}
.animal-race-tree .animal-tree-stage{
  display:block;
  width:100%;
}


/* BreedSim 1.4.91 — gommettes génétiques communes toutes espèces */
.keep-decision.keep,
.keep-decision.young-better,
.keep-badge.bestIndex,
.keep-badge.traitTop,
.keep-badge.youngIndex,
.keep-badge.youngTrait{
  background:#dff5e6 !important;
  color:#156b35 !important;
  border:1px solid #2f9e58 !important;
}
.keep-decision.sell{
  background:#fde3e3 !important;
  color:#9b1c1c !important;
  border:1px solid #d84a4a !important;
}
.duck-period-list{display:grid;gap:8px}
.duck-period-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(150px,.8fr) auto;gap:10px;align-items:center;padding:9px 10px;border:1px solid var(--border);border-radius:9px}
.duck-period-active{background:#dff5e6;color:#156b35;border:1px solid #2f9e58}
.duck-period-inactive{background:rgba(255,255,255,.05)}
@media(max-width:720px){.duck-period-row{grid-template-columns:1fr}.duck-period-row .badge{justify-self:start}}


/* BreedSim 1.4.92 — même gommette sur listes ET fiches, toutes espèces */
.keep-badges{display:flex;gap:5px;flex-wrap:wrap;align-items:center;margin:4px 0}
.modal-animal-sheet .keep-badges{margin:7px 0}
.keep-decision.keep,
.keep-decision.young-better,
.keep-badge.bestIndex,
.keep-badge.traitTop,
.keep-badge.trait,
.keep-badge.youngIndex,
.keep-badge.youngTrait{
  background:#dff5e6 !important;
  color:#156b35 !important;
  border:1px solid #2f9e58 !important;
}
.keep-decision.sell{
  background:#fde3e3 !important;
  color:#9b1c1c !important;
  border:1px solid #d84a4a !important;
}

/* BreedSim 1.4.93 — À GARDER plein vert ; TOP génétique vert clair distinct */
.keep-decision.keep,.keep-decision.young-better{background:#2f9e58 !important;color:#fff !important;border:1px solid #237a43 !important}
.keep-badge.bestIndex,.keep-badge.traitTop,.keep-badge.trait,.keep-badge.index,.keep-badge.youngIndex,.keep-badge.youngTrait{background:#eaf7ee !important;color:#156b35 !important;border:1px solid #74bd8b !important}

.reproduction-follow-dashboard{margin:12px 0}.incubator-tier-list{display:grid;gap:8px;margin:8px 0 12px}

/* 1.4.95 */
.poultry-building-subtabs{margin:12px 0 14px}.incubator-expansion-card{margin-top:14px}


/* BreedSim 1.4.96 — tablette, attente, classements, IA */
.poultry-building-subtabs{display:flex!important;gap:8px!important;flex-wrap:wrap!important;margin:8px 0 12px!important}
.poultry-building-subtabs .button{width:auto!important;min-width:0!important;flex:0 0 auto!important}
.waiting-summary-grid{gap:12px!important}
.waiting-summary-grid>.card{min-width:0;padding:14px}
.waiting-summary-grid .card b{display:block;font-size:1.35rem;margin-top:5px}
.waiting-metrics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}
.waiting-metric-card{border:1px solid var(--border);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:5px}
.waiting-metric-card b{font-size:1.2rem}
.ranking-navigation-card{margin-bottom:12px}
.ranking-main-filters{margin-top:12px}
.breeder-directory-tabs{margin:10px 0}
@media(max-width:900px){
  .waiting-summary-grid{grid-template-columns:1fr 1fr!important}
  .waiting-metrics-grid{grid-template-columns:1fr!important}
}
@media(max-width:620px){
  .waiting-summary-grid{grid-template-columns:1fr!important}
}


/* BreedSim 1.4.97 — poulailler sans bandeau + attente séparée */
.poultry-building-subtabs{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.waiting-species-section{
  margin-top:18px;
  padding-top:12px;
  border-top:1px solid var(--border);
}
.waiting-species-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.waiting-species-title h3{margin:0}
@media(max-width:900px){
  .waiting-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  .waiting-summary-grid{grid-template-columns:1fr!important}
}


/* BreedSim 1.5.02 — règles de conservation génétique */
.retention-rules-card{margin:12px 0}
.retention-rule-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.retention-rules-card input[type="number"]{width:100%}
.danger-text{color:#d94b4b}
\n\n/* BreedSim 1.5.12 — rappel des règles de gestion automatique */
.retention-rule-reminder{margin-top:14px;padding-top:12px;border-top:1px solid var(--border)}
.retention-rule-reminder h4{margin:0 0 4px}
.retention-rule-reminder-sex{margin-top:10px;padding:10px;border:1px solid var(--border);border-radius:10px}
.retention-rule-reminder-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.retention-rule-reminder-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px}
.retention-rule-reminder-item{display:flex;justify-content:space-between;gap:8px;padding:6px 8px;border:1px solid var(--border);border-radius:8px}

/* BreedSim 1.5.15 — pastilles reproduction */
.reproduction-count-badge,.reproduction-nav-badge{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:22px;height:22px;padding:0 6px;margin-left:6px;border-radius:999px;
  font-size:.78rem;font-weight:800;line-height:1;background:var(--accent);color:#fff;
}
.reproduction-nav-badge{margin-left:auto}
.nav[data-view="breeding"]{display:flex;align-items:center;gap:6px}
.reproduction-nav-badge.hidden{display:none!important}


/* BreedSim 1.5.21 — COULEUR DE NAVIGATION VERROUILLÉE
   Une seule couleur pour toute sélection active dans Animaux, toutes espèces/races/catégories. */
:root{
  --bs-nav-active-bg:#284f36;
  --bs-nav-active-border:#78a86f;
  --bs-nav-active-text:#eaf5e7;
  --bs-nav-active-inset:#9bc58f;
}

/* Boutons/branches de l'arbre animaux */
.animal-tree-item.active,
.animal-tree details > summary[data-animal-stage-category].active,
.animal-tree details > summary[data-poultry-stage-category].active,
.animal-tree .tree-node-selected,
.animal-tree .tree-race-selected,
.animal-tree .animal-race-node.tree-branch-selected > summary{
  background:var(--bs-nav-active-bg) !important;
  border:1px solid var(--bs-nav-active-border) !important;
  color:var(--bs-nav-active-text) !important;
  box-shadow:inset 3px 0 0 var(--bs-nav-active-inset) !important;
  outline:none !important;
  font-weight:800 !important;
}

/* Les sous-boutons mâles/femelles et autres catégories actives utilisent exactement le même état. */
.animal-tree button.active,
.animal-tree [data-animal-category].active,
.animal-tree [data-poultry-category].active{
  background:var(--bs-nav-active-bg) !important;
  border:1px solid var(--bs-nav-active-border) !important;
  color:var(--bs-nav-active-text) !important;
  box-shadow:inset 3px 0 0 var(--bs-nav-active-inset) !important;
  outline:none !important;
  font-weight:800 !important;
}

/* Même couleur pour la catégorie/race sélectionnée, sans vert fluorescent hérité. */
.animal-tree details[open] > summary.tree-node-selected,
.animal-tree details[open] > summary.tree-race-selected{
  background:var(--bs-nav-active-bg) !important;
  color:var(--bs-nav-active-text) !important;
}


/* BreedSim 1.5.22 — finition de l'état de navigation verrouillé */
:root{
  --bs-nav-active-radius:9px;
}

/* Le même arrondi est imposé à TOUS les états actifs de l'arbre. */
.animal-tree-item.active,
.animal-tree details > summary[data-animal-stage-category].active,
.animal-tree details > summary[data-poultry-stage-category].active,
.animal-tree .tree-node-selected,
.animal-tree .tree-race-selected,
.animal-tree .animal-race-node.tree-branch-selected > summary,
.animal-tree button.active,
.animal-tree [data-animal-category].active,
.animal-tree [data-poultry-category].active{
  border-radius:var(--bs-nav-active-radius) !important;
  overflow:hidden;
}

/* Pastille "nouvel adulte" : contraste indépendant du fond actif vert.
   Elle reste lisible même lorsqu'elle est placée dans une ligne sélectionnée. */
.new-adults-race-badge,
.tree-name-with-alert .new-adults-race-badge,
.animal-tree .active .new-adults-race-badge,
.animal-tree .tree-node-selected .new-adults-race-badge,
.animal-tree .tree-race-selected .new-adults-race-badge{
  background:#eef8f0 !important;
  color:#174f2b !important;
  border:1px solid #8fbd98 !important;
  border-radius:999px !important;
  box-shadow:none !important;
  text-shadow:none !important;
  font-weight:900 !important;
}


/* BreedSim 1.5.23 — navigation active : contraste verrouillé */
:root{
  --bs-nav-active-bg:#173a25;
  --bs-nav-active-border:#74ad7b;
  --bs-nav-active-text:#ffffff;
  --bs-nav-active-inset:#9ed3a5;
}

.animal-tree .animal-tree-item.active,
.animal-tree button.active,
.animal-tree [data-animal-category].active,
.animal-tree [data-poultry-category].active,
.animal-tree details > summary[data-animal-stage-category].active,
.animal-tree details > summary[data-poultry-stage-category].active,
.animal-tree summary.tree-node-selected,
.animal-tree summary.tree-race-selected,
.animal-tree .animal-race-node.tree-branch-selected > summary{
  background:#173a25 !important;
  color:#ffffff !important;
  border:1px solid #74ad7b !important;
  box-shadow:inset 3px 0 0 #9ed3a5 !important;
  outline:none !important;
  text-shadow:none !important;
  font-weight:850 !important;
  border-radius:9px !important;
}

.animal-tree .active span,
.animal-tree .active b,
.animal-tree .tree-node-selected span,
.animal-tree .tree-node-selected b,
.animal-tree .tree-race-selected span,
.animal-tree .tree-race-selected b{
  color:#ffffff !important;
}

.animal-tree .new-adults-race-badge{
  background:#f3faf4 !important;
  color:#174f2b !important;
  border:1px solid #9bc7a3 !important;
}


/* BreedSim 1.5.25 — parent Adultes fixe + compteur reproduction lisible */
.reproduction-species-tabs .button.primary .reproduction-count-badge{
  background:#d9f86e !important;
  color:#111 !important;
  border:2px solid #111 !important;
  box-shadow:0 0 0 1px rgba(255,255,255,.45) !important;
  font-weight:900 !important;
}


/* BreedSim 1.5.27 — blocs d'âge copiés sur le modèle Lapins
   Un seul composant visuel pour Lapereaux/Poussins/Canetons, Jeunes et Adultes. */
.animal-tree details > summary[data-animal-stage-category],
.animal-tree details > summary[data-poultry-stage-category]{
  box-sizing:border-box !important;
  width:100% !important;
  min-height:42px !important;
  padding:8px 12px !important;
  margin:0 !important;
  border-radius:9px !important;
  overflow:visible !important;
  line-height:1.2 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
}

/* Même état actif, quelle que soit l'espèce ou l'étage. */
.animal-tree details > summary[data-animal-stage-category].active,
.animal-tree details > summary[data-poultry-stage-category].active{
  background:var(--bs-nav-active-bg) !important;
  color:var(--bs-nav-active-text) !important;
  border:1px solid var(--bs-nav-active-border) !important;
  box-shadow:inset 4px 0 0 var(--bs-nav-active-inset) !important;
  outline:none !important;
  font-weight:800 !important;
  border-radius:9px !important;
  padding:8px 12px !important;
}

/* Le compteur ne touche jamais la bordure. */
.animal-tree details > summary[data-animal-stage-category] > span,
.animal-tree details > summary[data-poultry-stage-category] > span{
  flex:0 0 auto !important;
  margin-left:auto !important;
  padding-left:8px !important;
}

/* Les sous-catégories M/F utilisent le même gabarit chez toutes les espèces. */
.animal-tree details > .animal-tree-item{
  box-sizing:border-box !important;
  min-height:40px !important;
  padding:8px 10px !important;
  border-radius:9px !important;
}

/* Grille identique pour les groupes d'âge globaux et par race. */
.animal-global-tree,
.animal-race-tree{
  align-items:start !important;
}

/* BreedSim 1.5.42 — Volailles/Canards utilisent le composant PAR RACE des Lapins.
   Œufs est volontairement hors du composant pour ne jamais modifier sa géométrie. */
.animal-race-eggs{
  display:flex !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  padding-top:8px !important;
  margin-bottom:0 !important;
}
.animal-race-eggs + .animal-race-tree{
  padding-top:8px !important;
}

/* BreedSim — Toulouse française : PNG/WebP détourés, sans fond gris. */
.market-animal-photo[src*="tlf_"],
.animal-table-photo[src*="tlf_"],
.animal-detail-photo[src*="tlf_"]{
  background:transparent !important;
}

/* BreedSim — Toulouse française : détourage réellement transparent dans toutes les vues. */
img.animal-sheet-photo[src*="/geese/photos/tlf_"],
img.animal-sheet-photo[src*="tlf_"],
img.market-animal-photo[src*="/geese/photos/tlf_"],
img.market-animal-photo[src*="tlf_"],
img.animal-table-photo[src*="/geese/photos/tlf_"],
img.animal-table-photo[src*="tlf_"],
img.animal-detail-photo[src*="/geese/photos/tlf_"],
img.animal-detail-photo[src*="tlf_"],
img.race-photo[src*="/geese/photos/tlf_"],
img.race-photo[src*="tlf_"]{
  background:transparent !important;
}

/* Si une Toulouse est affichée dans le cadre de marché, le cadre ne rajoute pas de gris. */
.race-picture:has(> img.race-photo[src*="/geese/photos/tlf_"]),
.race-picture:has(> img.race-photo[src*="tlf_"]){
  background:transparent !important;
}

/* BreedSim 1.5.74 — Embden : images détourées, aucun fond gris. */
img.animal-sheet-photo[src*="/geese/photos/emb_"],
img.animal-sheet-photo[src*="emb_"],
img.market-animal-photo[src*="/geese/photos/emb_"],
img.market-animal-photo[src*="emb_"],
img.animal-table-photo[src*="/geese/photos/emb_"],
img.animal-table-photo[src*="emb_"],
img.animal-detail-photo[src*="/geese/photos/emb_"],
img.animal-detail-photo[src*="emb_"],
img.race-photo[src*="/geese/photos/emb_"],
img.race-photo[src*="emb_"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/geese/photos/emb_"]),
.race-picture:has(> img.race-photo[src*="emb_"]){
  background:transparent !important;
}

/* BreedSim 1.5.75 — Oie de Chine blanche (CHB) : aucun fond gris. */
img.animal-sheet-photo[src*="/geese/photos/chb_"],
img.animal-sheet-photo[src*="chb_"],
img.market-animal-photo[src*="/geese/photos/chb_"],
img.market-animal-photo[src*="chb_"],
img.animal-table-photo[src*="/geese/photos/chb_"],
img.animal-table-photo[src*="chb_"],
img.animal-detail-photo[src*="/geese/photos/chb_"],
img.animal-detail-photo[src*="chb_"],
img.race-photo[src*="/geese/photos/chb_"],
img.race-photo[src*="chb_"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/geese/photos/chb_"]),
.race-picture:has(> img.race-photo[src*="chb_"]){
  background:transparent !important;
}

/* BreedSim 1.5.77 — Fiche volaille : agrandissement réel du bloc photo.
   Cible la structure visible sur tablette/mobile où photo + identification
   sont dans .animal-sheet-left. */
.poultry-animal-sheet .animal-sheet-photo{
  object-fit:contain !important;
  object-position:center !important;
  background:transparent !important;
}

/* Grand écran : vraie colonne photo plus large. */
@media (min-width:1181px){
  .poultry-animal-sheet .animal-sheet-layout{
    grid-template-columns:minmax(480px,46%) minmax(0,1fr) !important;
    gap:22px !important;
  }
  .poultry-animal-sheet .animal-sheet-photo{
    width:100% !important;
    aspect-ratio:3/2 !important;
    height:auto !important;
    max-height:500px !important;
  }
}

/* Tablette paysage / petite fenêtre desktop. */
@media (min-width:901px) and (max-width:1180px){
  .poultry-animal-sheet .animal-sheet-layout{
    grid-template-columns:minmax(410px,44%) minmax(0,1fr) !important;
    gap:18px !important;
  }
  .poultry-animal-sheet .animal-sheet-photo{
    width:100% !important;
    aspect-ratio:3/2 !important;
    height:auto !important;
    max-height:460px !important;
  }
}

/* C'est la structure de la capture : photo à gauche + Identification à droite.
   On passe la photo de ~42% à 52% sans toucher à l'ordre des informations. */
@media (min-width:721px) and (max-width:900px){
  .poultry-animal-sheet .animal-sheet-layout{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }
  .poultry-animal-sheet .animal-sheet-left{
    display:grid !important;
    grid-template-columns:minmax(0,52%) minmax(0,48%) !important;
    gap:18px !important;
    align-items:start !important;
    position:static !important;
  }
  .poultry-animal-sheet .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    max-height:480px !important;
    aspect-ratio:3/2 !important;
    margin:0 !important;
  }
  .poultry-animal-sheet .animal-sheet-identity{
    margin-top:0 !important;
    min-width:0 !important;
    padding:14px !important;
    font-size:.94rem !important;
    line-height:1.24 !important;
  }
}

/* Téléphone : image au-dessus pour éviter tout écrasement du texte. */
@media (max-width:720px){
  .poultry-animal-sheet .animal-sheet-left{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .poultry-animal-sheet .animal-sheet-photo{
    width:100% !important;
    height:auto !important;
    max-height:430px !important;
    aspect-ratio:3/2 !important;
  }
  .poultry-animal-sheet .animal-sheet-identity{
    margin-top:0 !important;
  }
}

/* BreedSim 1.5.78 — femelles : cycle d'œufs repliable pour garder une fiche compacte. */
.poultry-animal-sheet .poultry-cycle-sheet-details{
  margin-top:10px !important;
  border:1px solid #315b45 !important;
  border-radius:10px !important;
  background:rgba(12,38,27,.42) !important;
  overflow:hidden !important;
}
.poultry-animal-sheet .poultry-cycle-sheet-details > summary{
  cursor:pointer !important;
  list-style:none !important;
  padding:10px 12px !important;
  font-weight:800 !important;
  color:#dff7e8 !important;
  user-select:none !important;
}
.poultry-animal-sheet .poultry-cycle-sheet-details > summary::-webkit-details-marker{
  display:none !important;
}
.poultry-animal-sheet .poultry-cycle-sheet-details > summary::after{
  content:"+" !important;
  float:right !important;
  font-size:1.15em !important;
}
.poultry-animal-sheet .poultry-cycle-sheet-details[open] > summary::after{
  content:"−" !important;
}
.poultry-animal-sheet .poultry-cycle-sheet-body{
  padding:0 12px 11px !important;
  display:grid !important;
  gap:5px !important;
  font-size:.92em !important;
  line-height:1.25 !important;
}

/* BreedSim 1.5.82 — taille de fiche photo universelle, toutes espèces.
   Même cadre 3:2 et même occupation; l'animal reste entier sans déformation. */
.modal-animal-sheet img.animal-sheet-photo{
  display:block !important;
  width:100% !important;
  height:auto !important;
  aspect-ratio:3/2 !important;
  max-height:none !important;
  object-fit:contain !important;
  object-position:center center !important;
  margin:0 !important;
  padding:0 !important;
}

/* Grand écran : même largeur de colonne photo pour toutes les espèces. */
@media (min-width:1181px){
  .modal-animal-sheet .animal-sheet-layout{
    grid-template-columns:minmax(480px,46%) minmax(0,1fr) !important;
    gap:22px !important;
    align-items:start !important;
  }
}

/* Tablette paysage / petit desktop. */
@media (min-width:901px) and (max-width:1180px){
  .modal-animal-sheet .animal-sheet-layout{
    grid-template-columns:minmax(410px,44%) minmax(0,1fr) !important;
    gap:18px !important;
    align-items:start !important;
  }
}

/* Tablette portrait : photo et identification côte à côte avec taille identique,
   quelle que soit l'espèce. */
@media (min-width:721px) and (max-width:900px){
  .modal-animal-sheet .animal-sheet-layout{
    grid-template-columns:1fr !important;
    gap:18px !important;
  }
  .modal-animal-sheet .animal-sheet-left{
    display:grid !important;
    grid-template-columns:minmax(0,52%) minmax(0,48%) !important;
    gap:18px !important;
    align-items:start !important;
    position:static !important;
  }
  .modal-animal-sheet .animal-sheet-identity{
    margin-top:0 !important;
    min-width:0 !important;
  }
}

/* Téléphone : cadre universel pleine largeur. */
@media (max-width:720px){
  .modal-animal-sheet .animal-sheet-left{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    position:static !important;
  }
  .modal-animal-sheet .animal-sheet-identity{
    margin-top:0 !important;
  }
}

/* BreedSim 1.5.82 — Race 4 CHN : aucune couleur de fond derrière les images. */
img.animal-sheet-photo[src*="/geese/photos/chn_"],
img.animal-sheet-photo[src*="chn_"],
img.market-animal-photo[src*="/geese/photos/chn_"],
img.market-animal-photo[src*="chn_"],
img.animal-table-photo[src*="/geese/photos/chn_"],
img.animal-table-photo[src*="chn_"],
img.animal-detail-photo[src*="/geese/photos/chn_"],
img.animal-detail-photo[src*="chn_"],
img.race-photo[src*="/geese/photos/chn_"],
img.race-photo[src*="chn_"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/geese/photos/chn_"]),
.race-picture:has(> img.race-photo[src*="chn_"]){
  background:transparent !important;
}

/* BreedSim 1.5.82 — Race 5 AFG : fond transparent partout. */
img.animal-sheet-photo[src*="/geese/photos/afg_"],
img.animal-sheet-photo[src*="afg_"],
img.market-animal-photo[src*="/geese/photos/afg_"],
img.market-animal-photo[src*="afg_"],
img.animal-table-photo[src*="/geese/photos/afg_"],
img.animal-table-photo[src*="afg_"],
img.animal-detail-photo[src*="/geese/photos/afg_"],
img.animal-detail-photo[src*="afg_"],
img.race-photo[src*="/geese/photos/afg_"],
img.race-photo[src*="afg_"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/geese/photos/afg_"]),
.race-picture:has(> img.race-photo[src*="afg_"]){
  background:transparent !important;
}

/* BreedSim 1.5.82 — Race 6 ABF : images sans fond. */
img.animal-sheet-photo[src*="/geese/photos/abf_"],
img.animal-sheet-photo[src*="abf_"],
img.market-animal-photo[src*="/geese/photos/abf_"],
img.market-animal-photo[src*="abf_"],
img.animal-table-photo[src*="/geese/photos/abf_"],
img.animal-table-photo[src*="abf_"],
img.animal-detail-photo[src*="/geese/photos/abf_"],
img.animal-detail-photo[src*="abf_"],
img.race-photo[src*="/geese/photos/abf_"],
img.race-photo[src*="abf_"] { background: transparent !important; }
.race-picture:has(> img.race-photo[src*="/geese/photos/abf_"]),
.race-picture:has(> img.race-photo[src*="abf_"]) { background: transparent !important; }

/* Race 7 Pilgrim — transparent cutouts */
img.animal-sheet-photo[src*="/geese/photos/pil_"],img.animal-sheet-photo[src*="pil_"],img.market-animal-photo[src*="pil_"],img.animal-table-photo[src*="pil_"],img.animal-detail-photo[src*="pil_"],img.race-photo[src*="pil_"]{background:transparent!important}.race-picture:has(> img.race-photo[src*="pil_"]){background:transparent!important}

/* Race 8 — Sebastopol: transparent image surfaces */
img.animal-sheet-photo[src*="/geese/photos/seb_"],img.animal-sheet-photo[src*="seb_"],img.market-animal-photo[src*="seb_"],img.animal-table-photo[src*="seb_"],img.animal-detail-photo[src*="seb_"],img.race-photo[src*="seb_"]{background:transparent!important}.race-picture:has(> img.race-photo[src*="seb_"]){background:transparent!important}

img.animal-sheet-photo[src*="/geese/photos/pom_"],img.animal-sheet-photo[src*="pom_"],img.market-animal-photo[src*="pom_"],img.animal-table-photo[src*="pom_"],img.animal-detail-photo[src*="pom_"],img.race-photo[src*="pom_"]{background:transparent!important}.race-picture:has(> img.race-photo[src*="pom_"]){background:transparent!important}

/* BreedSim 1.5.95 — tous les lapins sont des détourages alpha : aucun fond de studio dans le jeu. */
img.animal-sheet-photo[src*="/rabbits/photos/"],
img.real-rabbit-photo[src*="/rabbits/photos/"],
img.market-animal-photo[src*="/rabbits/photos/"],
img.animal-table-photo[src*="/rabbits/photos/"],
img.animal-detail-photo[src*="/rabbits/photos/"],
img.race-photo[src*="/rabbits/photos/"]{
  background:transparent !important;
}
.race-picture:has(> img.real-rabbit-photo[src*="/rabbits/photos/"]),
.race-picture:has(> img.race-photo[src*="/rabbits/photos/"]){
  background:transparent !important;
}

/* BreedSim 1.5.96 — rendu officiel détouré pour toutes les oies. */
img.animal-sheet-photo[src*="/geese/photos/"],
img.market-animal-photo[src*="/geese/photos/"],
img.animal-table-photo[src*="/geese/photos/"],
img.animal-detail-photo[src*="/geese/photos/"],
img.race-photo[src*="/geese/photos/"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/geese/photos/"]){
  background:transparent !important;
}

/* BreedSim 1.5.99 — fond du jeu et échelle biologique pour toutes les volailles. */
img.animal-sheet-photo[src*="/poultry/photos/"],
img.market-animal-photo[src*="/poultry/photos/"],
img.animal-table-photo[src*="/poultry/photos/"],
img.animal-detail-photo[src*="/poultry/photos/"],
img.race-photo[src*="/poultry/photos/"],
img.animal-sheet-photo[src*="/ducks/photos/"],
img.market-animal-photo[src*="/ducks/photos/"],
img.animal-table-photo[src*="/ducks/photos/"],
img.animal-detail-photo[src*="/ducks/photos/"],
img.race-photo[src*="/ducks/photos/"]{
  background:transparent !important;
}
.race-picture:has(> img.race-photo[src*="/poultry/photos/"]),
.race-picture:has(> img.race-photo[src*="/ducks/photos/"]){
  background:transparent !important;
}
img[data-animal-stage][style*="--animal-visual-scale"]{
  transform:scale(var(--animal-visual-scale)) !important;
  transform-origin:center bottom !important;
  object-fit:contain !important;
  transition:transform .18s ease !important;
}
.animal-weight-chip{
  margin-top:5px;
  color:#cfe7d7;
  font-size:.78rem;
  line-height:1.2;
}

/* BreedSim 1.6.06 — le cadre ne dépend jamais de l'échelle biologique de l'animal. */
.poultry-photo-frame,
.rabbit-photo-frame{
  position:relative !important;
  display:block !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  flex-shrink:0 !important;
}
.poultry-photo-frame > img[data-animal-stage][style*="--animal-visual-scale"],
.rabbit-photo-frame > img[data-animal-stage][style*="--animal-visual-scale"]{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  object-fit:contain !important;
  object-position:center bottom !important;
  transform:scale(var(--animal-visual-scale)) !important;
  transform-origin:center bottom !important;
}
.race-picture > .race-photo-frame{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
}
.race-picture > .race-photo-frame + .floating-stage{
  position:absolute;
  z-index:2;
}
.race-program-summary > .race-photo-frame{
  width:145px !important;
  aspect-ratio:3/2 !important;
  background:#112119 !important;
  border:1px solid #29463a !important;
  border-radius:11px !important;
}
.animal-name-with-photo > .animal-table-photo-frame,
.animal-table-photo-frame{
  width:140px !important;
  height:93px !important;
  flex:0 0 140px !important;
  aspect-ratio:3/2 !important;
  background:#112119 !important;
  border:1px solid #29463a !important;
  border-radius:10px !important;
}
.poultry-animal-sheet .animal-sheet-photo-frame{
  width:100% !important;
  height:auto !important;
  aspect-ratio:3/2 !important;
  min-height:0 !important;
  background:#112119 !important;
  border:1px solid #29463a !important;
  border-radius:14px !important;
}
@media(max-width:700px){
  .race-program-summary > .race-photo-frame{width:92px !important}
}
.betta-photo-frame{height:190px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:12px;background:transparent}
.betta-photo-frame .betta-dynamic-photo{display:block;width:100%;height:100%;object-fit:contain;transform:scale(var(--betta-scale,1)) scaleY(var(--betta-morph,1));filter:saturate(var(--betta-saturation,1)) contrast(var(--betta-contrast,1));transition:transform .2s ease;background:transparent}
.betta-dynamic-photo[data-betta-pending="1"]{opacity:0}
.betta-dynamic-photo{transition:opacity .08s linear,transform .2s ease}
.race-picture>.betta-dynamic-photo{display:block;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;transform:scale(var(--betta-scale,1)) scaleY(var(--betta-morph,1));filter:saturate(var(--betta-saturation,1)) contrast(var(--betta-contrast,1));background:transparent!important}
.betta-animal-sheet .animal-sheet-left>.race-picture{width:100%;aspect-ratio:3/2;height:auto;overflow:hidden}
.betta-animal-sheet .animal-sheet-left>.race-picture,
.race-picture:has(>.betta-dynamic-photo){background:transparent!important}
.betta-animal-sheet .animal-sheet-left>.race-picture::before,
.race-picture:has(>.betta-dynamic-photo)::before{display:none!important}
.betta-animal-sheet .animal-sheet-left>.race-picture{border:1px solid #2c4639!important;border-radius:13px!important;box-shadow:none!important;padding:0!important}
.betta-animal-sheet .animal-sheet-left>.race-picture>img.animal-sheet-photo{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.market-card .race-picture>.betta-photo-frame{position:absolute;inset:0;width:100%;height:100%;border-radius:0}
.market-card .race-picture>.betta-photo-frame .betta-dynamic-photo{object-fit:contain;object-position:center}
.betta-animal-sheet .animal-sheet-left>.betta-photo-frame{width:100%;height:auto;aspect-ratio:3/2;min-height:0;border:1px solid var(--line);border-radius:14px}
.betta-animal-sheet .animal-sheet-left>.betta-photo-frame .animal-sheet-photo{width:100%;height:100%;object-fit:contain;object-position:center}
@media(max-width:720px){.betta-animal-sheet .animal-sheet-left>.betta-photo-frame{aspect-ratio:4/3}}
.animal-image-wrap{position:relative;width:100%;height:220px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--line);border-radius:14px;background:#0e2118}
.animal-image-wrap>.animal-photo{display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:transparent;image-rendering:auto}
.animal-image-wrap>.stage-chip{position:absolute;right:10px;bottom:10px;padding:5px 10px;border-radius:999px;background:#183326;color:#fff;font-size:.82rem}
.animal-photo-missing{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--muted);background:linear-gradient(135deg,#10251b,#0b1a13)}
.animal-photo-missing small{font-size:.78rem}

/* Sélection des Combattants : commande compacte intégrée à la photo. */
.animal-card:has([data-select-betta]){position:relative}
.animal-card>.animal-select:has([data-select-betta]){position:static;display:inline-flex;align-items:center;align-self:flex-start;gap:7px;width:max-content;max-width:100%;margin:0 0 10px 0;padding:7px 10px;border:1px solid #416c55;border-radius:9px;background:#0b1b13;color:var(--text);font-size:.82rem;font-weight:700;line-height:1;cursor:pointer;box-shadow:none}
.animal-card>.animal-select:has([data-select-betta]) input{width:17px;height:17px;margin:0;accent-color:var(--accent);cursor:pointer}
.animal-card.selected:has([data-select-betta]){border-color:var(--accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 40%,transparent)}
@media(max-width:900px){
  .betta-reproduction-parent{display:grid;grid-template-columns:minmax(120px,180px) minmax(0,1fr);grid-template-rows:auto auto 1fr;gap:6px 14px;align-items:start}
  .betta-reproduction-parent>h3{grid-column:1/-1;margin:0}
  .betta-reproduction-parent>.race-picture{grid-column:1;grid-row:2/4;height:120px;aspect-ratio:auto}
  .betta-reproduction-parent>b,.betta-reproduction-parent>p{grid-column:2;margin:0}
}
@media(max-width:520px){
  .betta-reproduction-parent{grid-template-columns:105px minmax(0,1fr);padding:10px}
  .betta-reproduction-parent>.race-picture{height:90px}
}
