/* Shared layout across phones, tablets and desktop workspaces. */
:root{--layout-gutter:clamp(1rem,2.2vw,2.5rem)}
/* Historique : styles limités aux cellules directes pour préserver les fenêtres de détails. */
.fuel-history-table>thead>tr>th{font-size:.68rem;letter-spacing:.06em;padding:.85rem 1rem}
.fuel-history-table>tbody>tr>td{padding:1rem;font-size:.84rem;line-height:1.55}
.fuel-history-table>tbody>tr>td:nth-child(4){text-align:right;font-variant-numeric:tabular-nums}
.fuel-history-table>thead>tr>th:nth-child(4){text-align:right}
.history-site-name{display:block;font-weight:650}
.history-author{display:inline-flex;align-items:center;gap:.5rem}
.history-author>i{color:var(--muted);font-size:1.2rem}
.history-edit{display:flex;align-items:center;gap:.35rem;width:fit-content;min-height:36px;margin-top:.15rem;color:var(--primary-dark);font-size:.74rem;font-weight:600;text-decoration:none}
.history-edit:hover{text-decoration:underline;text-underline-offset:3px}
@media(pointer:coarse){.history-edit{min-height:44px}}
*,*::before,*::after{box-sizing:border-box}
.main-content{min-width:0;padding:0}
.main-content>.container-fluid{padding:var(--layout-gutter)!important;margin-inline:auto;max-width:1760px}
.row>*{min-width:0}
.page-hero{padding:clamp(1.25rem,3vw,2.5rem);isolation:isolate}
.page-hero::after{z-index:-1;pointer-events:none}
.page-hero h3,.notifications-hero h1{font-size:clamp(1.4rem,2.2vw,2rem);overflow-wrap:anywhere}
.page-hero.d-flex,.card-header.d-flex{flex-wrap:wrap;gap:1rem}
.card-body,.notification-panel,.generator-entry{min-width:0}
.badge{max-width:100%;white-space:normal;line-height:1.35}
.user-meta{max-width:240px;overflow-wrap:anywhere}
.user-avatar,.brand-mark,.sidebar .nav-link i{flex-shrink:0}
.table-responsive{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:auto}
.table-responsive:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
.table th,.table td{white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none}
.table td{min-width:100px}
.table th *,.table td *{white-space:nowrap;overflow-wrap:normal;word-break:normal}
.table td .btn,.table td .badge{white-space:nowrap}
/* Les fenêtres de détail sont incluses dans les cellules, mais ne sont pas des lignes du tableau. */
.measurement-details,.table td .measurement-details *{white-space:normal;overflow-wrap:anywhere;word-break:normal}
.measurement-details .modal-title{line-height:1.35}
.measurement-details .card,.measurement-details .card-body{min-width:0}
.measurement-details .alert{line-height:1.65}
.table-scroll-hint{margin:0;padding:.6rem 1rem;color:var(--muted);font-size:.78rem;background:#f7fafc;border-bottom:1px solid var(--border)}
.table-scroll-hint[hidden]{display:none}
.form-control,.form-select{max-width:100%}
.generator-preview{display:block;line-height:1.7;overflow-wrap:anywhere}
.sidebar-backdrop{position:fixed;inset:64px 0 0;background:rgba(7,26,47,.55);backdrop-filter:blur(2px);z-index:1025}
.sidebar-backdrop[hidden]{display:none}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid #37bdb2;outline-offset:3px}
.auth-shell{width:100%;max-width:1020px}
.modal-dialog{margin:1.5rem auto}
.modal-content{max-height:calc(100dvh - 3rem)}
.modal-body{max-height:none;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.modal-header,.modal-footer{flex-shrink:0}
@media(max-width:1199.98px){
 .main-content>.container-fluid>.d-flex{flex-wrap:wrap;gap:1rem}
 .table>thead th,.table>tbody td{padding:.8rem}
}
@media(max-width:991.98px){
 body.sidebar-open{overflow:hidden}
 .sidebar{width:min(310px,calc(100vw - 48px));overscroll-behavior:contain;visibility:hidden}
 .sidebar.show{visibility:visible}
 .sidebar-inner{padding:1rem .75rem max(1rem,env(safe-area-inset-bottom))}
 .main-content{min-height:calc(100dvh - 64px)}
 .btn,.notification-bell,.notification-read-button,.table-pagination-controls .btn{min-height:44px}
 .notification-bell{width:44px}
 .auth-shell{max-width:520px}
}
@media(max-width:575.98px){
 .topbar>.container-fluid{padding-inline:.75rem!important;flex-wrap:nowrap;gap:.5rem}
 .topbar-actions{gap:.5rem}
 .brand-subtitle{display:none}
 .navbar-brand{font-size:.95rem}
 .brand-mark{display:none}
 .user-chip{border:0;background:none;padding:0}
 .user-avatar{width:30px;height:30px}
 .main-content>.container-fluid{padding:1rem .75rem 2rem!important}
 .main-content>.container-fluid>.d-flex{align-items:stretch!important}
 .main-content>.container-fluid>.d-flex>.btn{width:100%}
 .page-hero{margin-bottom:1rem;border-radius:16px}
 .page-hero p{font-size:.9rem;line-height:1.6}
 .card-body{padding:1rem}
 .card-header{padding:1rem}
 .stat-card .display-6{font-size:1.65rem}
 .modal-dialog{margin:0;max-width:none;width:100%;height:100dvh}
 .modal-content{height:100%;max-height:100dvh;border-radius:0}
 .modal-header,.modal-body,.modal-footer{padding:1rem}
 .modal-footer{padding-bottom:max(1rem,env(safe-area-inset-bottom));gap:.5rem}
 .modal-footer>.btn{flex:1;margin:0}
 .form-control,.form-select{font-size:1rem}
 .generator-entry{padding:1rem!important}
 .generator-entry>.d-flex{flex-wrap:wrap;gap:.75rem}
 .table-pagination{gap:.75rem;padding:.85rem}
 .table-pagination-controls{gap:.25rem}
 .table-pagination-controls .btn{min-width:38px;padding:.4rem .55rem}
 .notification-read-all{white-space:normal;text-align:left}
 .notification-item{padding:1rem;gap:.6rem}
 .notification-item-actions{gap:.75rem}
 .auth-page{min-height:100dvh}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Shared table containers and site headings (both themes). */
.card>.table-responsive{border-radius:inherit}
.card>.table-scroll-hint:not([hidden])+.table-responsive{border-top-left-radius:0;border-top-right-radius:0}
.card>.table-scroll-hint{border-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}
.card .table tbody tr:last-child td{border-bottom:0}
.site-generator-link{display:inline-flex;align-items:center;gap:.35rem;text-decoration:none;font-weight:600;color:var(--primary-dark)}
.site-generator-link:hover{text-decoration:underline;text-underline-offset:3px}
.sites-heading{align-items:center;gap:1rem}
.sites-heading h3{margin:0}
