/* HelvetiBuild 0.24.0 — expérience téléphone. */
.mobile-menu-button,.mobile-nav-backdrop{display:none}

@media(max-width:820px){
  html,body,#root{max-width:100%;overflow-x:hidden}
  body.mobile-nav-locked{overflow:hidden;touch-action:none}
  .app-shell{display:block;min-height:100dvh}
  .app-shell .sidebar{position:fixed;inset:0 auto 0 0;z-index:120;width:min(86vw,320px);height:100dvh;padding:18px 12px max(18px,env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;transform:translateX(-104%);transition:transform .22s ease;box-shadow:18px 0 45px rgba(0,35,29,.28)}
  .app-shell.mobile-nav-open .sidebar{transform:translateX(0)}
  .mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:110;border:0;background:rgba(0,30,25,.48);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s ease;backdrop-filter:blur(2px)}
  .app-shell.mobile-nav-open .mobile-nav-backdrop{opacity:1;visibility:visible;pointer-events:auto}
  .mobile-menu-button{display:grid;flex:0 0 42px;width:42px;height:42px;padding:10px;border:1px solid #d9e1dd;border-radius:10px;background:#fff;place-content:center;gap:4px;color:#123b31;cursor:pointer}
  .mobile-menu-button span{display:block;width:19px;height:2px;border-radius:9px;background:currentColor}
  .sidebar>.brand{padding:0 8px 14px}
  .sidebar .brand strong{font-size:22px}
  .sidebar-current-top{margin:4px 4px 12px;width:calc(100% - 8px)}
  .sidebar nav{display:flex!important;flex-direction:column!important;width:100%;min-height:0;overflow:visible!important;gap:3px}
  .sidebar .sidebar-nav-group{display:flex!important;flex-direction:column;grid-column:auto;width:100%}
  .sidebar .sidebar-fixed{padding-bottom:4px}
  .sidebar nav button,.sidebar .global-chat,.sidebar-about{min-height:44px;height:auto;width:100%;padding:11px 13px;font-size:14px}
  .sidebar-collapsible>summary,.sidebar-tools>summary{min-height:40px;padding:9px 13px}
  .sidebar-tools{margin-top:9px}
  .main-area{width:100%;max-width:100%;min-width:0;overflow:visible}
  .topbar{position:sticky;top:0;z-index:70;height:62px;padding:0 10px;gap:8px;background:rgba(255,255,255,.97);backdrop-filter:blur(12px)}
  .breadcrumbs{flex:1;min-width:0;gap:4px;overflow:hidden;white-space:nowrap}
  .breadcrumbs>*{display:none}
  .breadcrumbs>strong:last-child{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12px}
  .top-actions{flex:0 0 auto;gap:3px}
  .top-actions .weather{display:grid;width:36px;height:38px;padding:0;place-items:center}
  .top-actions .weather span{display:none}
  .top-actions .icon-button{display:grid;width:36px;height:38px;padding:8px;place-items:center;border-radius:8px}
  .top-actions .notification i{right:-1px;top:-5px}
  .top-actions .language-select{width:51px;height:38px;padding:0 4px;font-size:11px}
  .top-actions .avatar{width:38px;height:38px;font-size:11px}
  .view-area{min-height:calc(100dvh - 62px)}
  .page{width:100%;max-width:none;padding:22px 14px max(86px,calc(24px + env(safe-area-inset-bottom)))}
  .page-heading h1{font-size:28px;line-height:1.08}
  .page-heading p{font-size:12px;line-height:1.5}
  .action-heading{align-items:stretch;flex-direction:column;gap:14px}
  .action-heading>div:last-child{display:flex;flex-wrap:wrap;width:100%;gap:8px}
  .action-heading>div:last-child>.button{flex:1 1 135px;min-height:44px;justify-content:center}
  .panel{border-radius:12px}
  .floating{right:14px;bottom:max(14px,env(safe-area-inset-bottom));z-index:60;max-width:calc(100vw - 28px);padding:13px 18px}

  /* Tableau de bord */
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:14px}
  .kpi{min-height:126px;padding:13px 11px;column-gap:9px}
  .kpi-icon{width:44px;height:44px}
  .kpi strong{font-size:28px}
  .kpi p{font-size:11px;line-height:1.3}
  .kpi small{font-size:8px;line-height:1.35}
  .dashboard-main,.dashboard-bottom{grid-template-columns:1fr;gap:10px;margin-top:10px}
  .priorities,.meeting{min-height:0;padding:15px}
  .table{overflow-x:auto;scrollbar-width:thin}
  .table-head,.table-row{min-width:590px}
  .meeting h3{margin-top:24px}
  .progress-row{grid-template-columns:86px minmax(0,1fr) 34px;gap:8px}
  .activity-row{grid-template-columns:47px 28px minmax(0,1fr);gap:7px}

  /* Préparation et consultation des PV */
  .prepare .page-heading{margin-bottom:13px}
  .prepare .page-heading>div:last-child{display:grid;grid-template-columns:1fr 1fr}
  .prepare .page-heading>div:last-child>.button{min-width:0}
  .stepper{display:flex;height:auto;margin-bottom:13px;padding:12px;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin}
  .stepper>div{flex:0 0 112px;scroll-snap-align:start}
  .stepper>div:not(:last-child)::after{display:none}
  .stepper i{width:31px;height:31px}
  .stepper span{font-size:8px}
  .stepper span b{font-size:12px}
  .prepare-select{align-items:stretch;flex-direction:column;gap:8px;margin-bottom:12px}
  .prepare-select label{display:grid;grid-template-columns:1fr;gap:5px}
  .prepare-select select{width:100%;min-height:44px;margin:0;font-size:16px}
  .prepare-select>span{text-align:left}
  .prepare .prepare-columns,.prepare .prepare-columns.notes-collapsed{grid-template-columns:1fr;gap:10px}
  .prepare .notes-column,.prepare-review-workspace{grid-column:1!important}
  .prepare-review-workspace{display:grid;grid-template-columns:1fr;gap:10px}
  .prepare-review-workspace>.panel{padding:14px}
  .prepare-splitter{display:none}
  .prepare .notes-column textarea{min-height:320px;max-height:55dvh;font-size:16px}
  .proposal .panel-title{align-items:stretch;flex-direction:column;gap:11px}
  .proposal-header-actions{display:grid;grid-template-columns:1fr;gap:9px;width:100%}
  .prepare-text-size{grid-template-columns:auto minmax(100px,1fr) 44px;width:100%}
  .proposal-header-actions>.button{width:100%;min-height:44px;justify-content:center}
  .analysis-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .analysis-stats span{display:grid;place-items:center;min-width:0;padding:8px 5px;text-align:center;line-height:1.35}
  .prepare-review-workspace .proposal{--prepare-point-column:66px}
  .prepare-review-workspace .proposal-row{grid-template-columns:66px minmax(0,1fr) 34px!important;gap:8px;min-height:0;padding:12px 3px;font-size:var(--prepare-body-size,12.5px)}
  .prepare-review-workspace .proposal-row>span:first-child{padding-left:7px;padding-right:3px}
  .prepare-review-workspace .proposal-row>span:first-child b{font-size:1.13em}
  .prepare-review-workspace .proposal-row>span:first-child small{font-size:.72em;line-height:1.3}
  .prepare-review-workspace .proposal-row>.person{font-size:.88em}
  .prepare-review-workspace .proposal-row>.person i{width:25px;height:25px}
  .prepare-review-workspace .pv-preview-scroll{min-height:520px;max-height:72dvh}
  .prepare-review-workspace .pv-model-frame{height:680px}
  .draft-bar{height:auto;align-items:stretch;flex-direction:column;gap:9px;padding:12px}
  .draft-bar .button{width:100%;min-height:42px;justify-content:center}
  .minute-review-grid{display:grid;grid-template-columns:1fr;gap:10px}
  .minute-review-divider{display:none}
  .minute-review-grid .minute-edit-point{grid-template-columns:68px minmax(0,1fr)}
  .minute-review-grid .minute-point-number{font-size:11px}
  .minute-preview-tools,.minute-editor-tools{justify-content:flex-start}
  .minute-pdf-preview{min-height:560px;height:70dvh}

  /* Chat : saisie toujours visible et commandes lisibles. */
  .chat-page{height:auto;min-height:calc(100dvh - 62px);padding-bottom:20px;overflow:visible}
  .chat-page .page-heading{gap:13px}
  .chat-page .page-heading>div:last-child{display:grid;grid-template-columns:1fr;width:100%}
  .mode-tabs{gap:6px;margin-top:13px;padding-bottom:4px;overflow-x:auto;scroll-snap-type:x proximity}
  .mode-tabs button{flex:0 0 auto;min-width:max-content;height:43px;padding:0 15px;border-radius:8px!important;scroll-snap-align:start}
  .privacy{line-height:1.45}
  .chat-grid{display:block;min-height:0}
  .conversation,.sources{min-height:0;padding:14px}
  .conversation{max-height:none}
  .sources{margin-top:10px}
  .suggestions{display:grid;grid-template-columns:1fr;margin:13px 0}
  .user-message{max-width:88%;font-size:12px}
  .assistant-message>div{max-width:calc(100% - 42px);font-size:12px}
  .composer{position:sticky;bottom:max(8px,env(safe-area-inset-bottom));z-index:35;margin-top:10px;padding:9px 10px;background:rgba(255,255,255,.98);box-shadow:0 8px 28px rgba(0,49,40,.16)}
  .composer>div:first-child{position:static;transform:none;gap:5px;margin-bottom:6px;overflow-x:auto}
  .composer>div:first-child span{flex:0 0 auto}
  .composer textarea{height:72px;padding:8px 0;font-size:16px;line-height:1.45}
  .composer-actions small{display:none}
  .composer-actions>span{flex:none}
  .composer-actions button{margin-left:auto;min-height:44px}

  /* Listes, tâches, calendrier et zones détail. */
  .hb-resource-grid,.resource-grid,.calendar-grid{grid-template-columns:1fr;gap:10px}
  .resource-list{min-height:0;max-height:44dvh;overflow:auto}
  .resource-detail{min-height:260px;padding:15px}
  .detail-toolbar{flex-wrap:wrap}
  .detail-toolbar .button{flex:1 1 130px;justify-content:center}
  .task-group-row{grid-template-columns:50px minmax(0,1fr);gap:8px;min-height:62px;padding:7px 5px}
  .task-group-row>span:nth-child(2)>strong{font-size:11.5px}
  .task-group-row>.priority-chip,.task-group-row>.status-pill{justify-self:start;font-size:8px}
  .event-list>button{grid-template-columns:50px minmax(0,1fr);gap:9px}
  .event-detail-toolbar{display:grid;grid-template-columns:1fr 1fr}
  .event-detail-toolbar .button{min-width:0}

  /* Gestion documentaire et aperçu de fichiers. */
  .documents-page .page-heading>div:last-child{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .document-manager{grid-template-columns:1fr;gap:10px;min-height:0}
  .document-manager>.panel{padding:13px}
  .document-tree{max-height:38dvh}
  .document-file-list{max-height:none}
  .document-file-list>article{grid-template-columns:24px 43px minmax(0,1fr);gap:7px;padding:9px 7px}
  .document-file-list>article>span:last-child{grid-column:2/-1;justify-content:flex-start;flex-wrap:wrap}
  .document-detail-head{align-items:stretch;flex-direction:column}
  .document-detail-head>div:last-child{justify-content:flex-start}
  .document-preview{min-height:430px;max-height:68dvh}
  .document-preview iframe{height:68dvh}
  .document-preview.ifc-viewer-host,.ifc-viewer-shell{min-height:440px}
  .ifc-viewer-shell{grid-template-rows:auto minmax(360px,1fr) auto}
  .ifc-viewer-viewport{min-height:360px}
  .company-document-browser{grid-template-columns:1fr}

  /* Fenêtres d'ajout et de modification comme feuilles mobiles. */
  .hb-modal-overlay{align-items:end;padding:0}
  .hb-modal,.hb-modal-wide{width:100%;max-width:none;max-height:94dvh;border-radius:18px 18px 0 0;border-bottom:0}
  .hb-modal>header{padding:18px 16px 13px}
  .hb-modal h2{font-size:22px}
  .hb-modal form,.hb-modal-body{padding:16px}
  .hb-form-grid{grid-template-columns:1fr;gap:13px}
  .hb-form-grid label.wide,.hb-form-grid .check-field{grid-column:1}
  .hb-form-grid input,.hb-form-grid select,.hb-form-grid textarea,.hb-editor{min-height:44px;font-size:16px}
  .hb-modal footer{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1fr;padding:12px 16px max(12px,env(safe-area-inset-bottom));background:#fff}
  .hb-modal form footer{margin:18px -16px -16px}
  .hb-modal footer .button{width:100%;min-width:0;min-height:44px;justify-content:center}
  .hb-details{grid-template-columns:105px minmax(0,1fr);font-size:12px}
  #toast-host{right:12px;left:12px;top:72px}
  .hb-toast{min-width:0;width:100%}

  /* Portail entreprise. */
  .company-header{position:sticky;top:0;z-index:70;padding:0 12px;gap:8px}
  .company-header>div:last-child{gap:5px}
  .company-portal-nav{position:sticky;top:66px;z-index:60;overflow-x:auto;scroll-snap-type:x proximity;padding:8px 12px}
  .company-portal-nav button{flex:0 0 auto;min-height:42px;white-space:nowrap;scroll-snap-align:start}
  .company-hero{padding-inline:16px}
  .company-stats{grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:16px}
  .company-layout{grid-template-columns:1fr;padding:0 16px 36px}
  .company-document-manager{margin-inline:14px}
}

@media(max-width:560px){
  .projects-top{height:66px;padding:0 13px;gap:9px}
  .projects-top .brand{gap:7px;min-width:0}
  .projects-top .brand strong{font-size:19px}
  .projects-user{gap:6px}
  .projects-user>span{display:none}
  .projects-user select{width:54px;height:40px;padding:0 5px}
  .projects-user .button{min-height:40px;padding:8px 10px;font-size:10px}
  .projects-content{padding:34px 15px 46px}
  .projects-heading{align-items:stretch;flex-direction:column;gap:15px}
  .projects-heading .button{width:100%;min-height:46px;justify-content:center}
  .projects-content h1{font-size:34px}
  .project-grid{grid-template-columns:1fr;gap:13px}
  .project-card{min-height:0;padding:19px}
  .project-card h2{font-size:20px}
  .project-card-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding-top:17px}
  .project-card-actions .project-open-button{grid-column:1/-1;min-height:44px}
  .project-card-actions .project-edit-button,.project-card-actions .project-delete-button{min-height:42px}
  .project-archives>summary{padding:16px}
  .archive-project-grid{padding:10px}
  .top-actions .weather{display:none}
  .page-heading h1{font-size:26px}
  .analysis-stats{grid-template-columns:1fr}
  .prepare .page-heading>div:last-child,.documents-page .page-heading>div:last-child{grid-template-columns:1fr}
  .prepare-review-workspace .proposal{--prepare-point-column:58px}
  .prepare-review-workspace .proposal-row{grid-template-columns:58px minmax(0,1fr) 32px!important;gap:6px}
  .prepare-review-workspace .proposal-row>span:first-child small{font-size:.66em}
  .minute-review-grid .minute-edit-point{grid-template-columns:60px minmax(0,1fr)}
  .event-detail-toolbar{grid-template-columns:1fr}
  .company-header>div:first-child>span,.company-header .brand span{display:none}
  .company-header .brand strong{font-size:18px}
  .company-header .button{padding:8px 9px;font-size:10px}
}
