:root{--rail:236px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
#app{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
.bottombar{padding-bottom:calc(12px + env(safe-area-inset-bottom));padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right))}
.bottombar button{min-width:0}
.bottombar button{white-space:nowrap}
.hero .titre{overflow-wrap:anywhere}
img,video,canvas,svg{max-width:100%}
@media (hover:hover){
  button,.ligne[onclick],.t20-carte,.a20-mod{cursor:pointer}
  .bottombar button:hover{color:var(--c-principal)}
  .chip-btn:hover,.actions button:hover,.m-chip:hover{filter:brightness(.96)}
}

@media (max-width:359px){
  body{font-size:14px}
  #app{padding-left:12px;padding-right:12px}
  .hero{padding:16px}
  .hero .gros{font-size:42px}
  .hero .titre{font-size:22px}
  .sw20 button{width:38px;height:38px}
  .sw20 button svg{width:22px;height:22px}
  .bottombar button{font-size:10px}
  .bottombar .plus{flex:0 0 50px;width:50px;height:50px}
  .actions{gap:8px}
  .actions button{padding:12px 6px;font-size:14px}
  .stats{gap:6px}
  .stat small{font-size:9px;letter-spacing:.4px}
  .stat{padding:12px 10px}
  .t20-onglets button{padding:0 8px;font-size:12px;gap:4px}
  .t20-onglets button svg{width:16px;height:16px}
  .t20-grille,.a20-mods{gap:8px}
  .vc-grille.q{grid-template-columns:repeat(2,1fr)}
  .i21-reglages>div,.i20-reg{grid-template-columns:1fr}
  .f20-cpt{gap:4px}
  .a21-duo{grid-template-columns:1fr}
  .al21-seg button b{font-size:12px}
  .al21-seg button small{display:none}
  .n21-btns .btn{min-width:100%}
}

@media (max-height:480px) and (orientation:landscape){
  .bottombar{height:54px;padding-top:2px;padding-bottom:2px;border-radius:0;align-items:center}
  .bottombar .plus{transform:none;width:42px;height:42px;flex:0 0 42px;border-width:3px}
  .bottombar button svg{width:22px;height:22px}
  .bottombar button{font-size:10px}
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  .a21-zone{height:110px}
  #etat-reseau{bottom:64px}
}

@media (min-width:600px){
  #app{max-width:760px;padding-top:24px}
  .actions{grid-template-columns:repeat(4,1fr)}
  .a20-mods{grid-template-columns:repeat(3,minmax(0,1fr))}
  .t20-grille{grid-template-columns:repeat(3,minmax(0,1fr))}
  .semaine{grid-template-columns:repeat(3,1fr)}
  .hero{padding:26px 28px}
  .hero .gros{font-size:60px}
  .bottombar{left:50%;right:auto;width:min(100%,760px);transform:translateX(-50%);border-radius:28px 28px 0 0}
  .a21-zone{height:200px}
  .rec-boite{max-width:420px}
}

@media (min-width:900px){
  body{padding-left:var(--rail);padding-bottom:40px}
  #app{max-width:1000px;padding:32px 40px 56px}
  .bottombar{top:0;bottom:0;left:0;right:auto;width:var(--rail);height:auto;transform:none;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px;padding:28px 14px;border-radius:0;box-shadow:none;border-top:0;border-right:1px solid var(--c-bord,var(--bord))}
  .bottombar::before{content:'Brahma Élevage';order:-2;display:block;padding:0 14px 20px;font-size:20px;font-weight:800;color:var(--c-principal);white-space:normal}
  .bottombar button{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:14px;font-size:15px;padding:12px 16px;border-radius:16px;text-align:left}
  .bottombar button.active{background:var(--chip)}
  .bottombar button svg{width:24px;height:24px;flex:0 0 24px}
  .bottombar .plus{order:-1;flex:0 0 auto;width:100%;height:48px;border:0;border-radius:16px;transform:none;margin-bottom:10px;justify-content:center;gap:0;box-shadow:none}
  .bottombar .plus svg{width:22px;height:22px}
  .bottombar .plus.active{background:var(--c-principal)}
  #etat-reseau{left:calc(50% + var(--rail) / 2);bottom:24px}
  .actions{grid-template-columns:repeat(4,1fr)}
  .t20-grille{grid-template-columns:repeat(4,minmax(0,1fr))}
  .a20-mods{grid-template-columns:repeat(4,minmax(0,1fr))}
  .mgrille{grid-template-columns:repeat(4,1fr)}
  .hero{padding:32px 36px}
  .hero .gros{font-size:68px}
  .a21-tete,.a21-carte,.a21-pied,.i21-tete,.i21-carte,.i21-reglages,.al21-lab,.al21-seg,.al21-tailles,.al21-carte,.al21-note,.n21-carte{max-width:720px;margin-left:auto;margin-right:auto}
  .a21-carte,.i21-carte,.al21-carte,.n21-carte{margin-bottom:14px}
  .a21-zone{height:240px}
}

@media (min-width:1400px){
  #app{max-width:1160px}
  .t20-grille{grid-template-columns:repeat(5,minmax(0,1fr))}
}

.auth21{display:flex;flex-direction:column;justify-content:center;width:100%;max-width:420px;min-height:calc(100dvh - 32px);margin:0 auto;padding:8px 0 24px}
.auth21 .btn{width:100%}
.auth21 .carte{width:100%}
@media (min-width:900px){
  body:has(.bottombar[style*="display: none"]){padding-left:0}
}
