/*
 * MyBase - Affichage mobile
 * Fichier : /css/mobile-compact.css
 * Version : 1.0.5 - 19/08/2026
 * Thème : Mobile Compact V1.0
 *
 * Rôle : présentation mobile uniquement.
 * Le seuil d'activation reste défini UNE SEULE FOIS dans :
 * /commun/config_affichage.php -> $mobileMaxWidth
 *
 * Aucune règle PC ne doit être ajoutée dans ce fichier.
 */

/* =====================================================================
   BASE MOBILE
   ===================================================================== */

html {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #f4f6f8;
}

body,
button,
input,
select,
textarea {
    font-size: 16px;
}

img,
iframe,
table {
    max-width: 100%;
}

.mobile-only {
    display: initial;
}

/* =====================================================================
   BANDEAU MOBILE
   Ligne 1 : menu | logo | Manuel / CRIT / Diag
   Ligne 2 : recherche + loupe
   Ligne 3 : filtres
   ===================================================================== */

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: 44px 54px minmax(0, 1fr) 44px;
    grid-template-areas:
        "menu home tools tools"
        "search search search searchButton"
        "example example example example"
        "filters filters filters filters";
    align-items: center;
    width: 100%;
    min-height: 0;
    padding: max(7px, env(safe-area-inset-top)) 9px 9px;
    gap: 7px;
    background: #ffffff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, .12);
}

.mobile-menu-toggle {
    grid-area: menu;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #1f1f1f;
    color: #ffffff;
    font-size: 25px;
    line-height: 1;
}

.topbar-home {
    grid-area: home;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-home .home img,
.home img {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* Le formulaire et sa première ligne deviennent transparents pour la grille. */
.topbar-form,
.topbar-search-row {
    display: contents;
}

.topbar-search-row .tech-search,
.top-bar input.tech-search {
    grid-area: search;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #cfd6dc;
    border-radius: 8px;
    background: #ffffff;
    font-size: 16px;
    outline: none;
}

.topbar-search-row .tech-search:focus {
    border-color: #006fab;
    box-shadow: 0 0 0 2px rgba(0, 111, 171, .12);
}

.search-button {
    grid-area: searchButton;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 4px;
    border: 0;
    background: transparent;
}

.search-button img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.search-example,
.mobile-search-example {
    grid-area: example;
    display: block;
    width: 100%;
    margin: -2px 0 0;
    padding: 0 2px;
    color: #66717a;
    font-size: 11px;
    line-height: 1.2;
}

.topbar-tools {
    grid-area: tools;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

.topbar-tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 8px;
}

.topbar-tool-link img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.topbar-filters {
    grid-area: filters;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 4px;
    margin: 0;
}

.topbar-filters label {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding: 2px 5px;
    border-radius: 6px;
    background: #f6f8fa;
}

.topbar-filters label > span {
    font-size: 13px;
    font-weight: 600;
    color: #3a4650;
}

.topbar-filters select,
.top-bar select {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    margin: 0;
    padding: 4px 26px 4px 7px;
    border: 1px solid #ccd3d9;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
}


/* =====================================================================
   FICHE BT : bandeau mobile allégé
   La fiche conserve le menu, le logo et les 3 accès rapides.
   Recherche + filtres sont masqués uniquement sur la fiche.
   ===================================================================== */

.fiche-page .top-bar {
    grid-template-areas: "menu home tools tools";
}

.fiche-page .topbar-search-row .tech-search,
.fiche-page .search-button,
.fiche-page .topbar-filters,
.fiche-page .mobile-filter-toggle,
.fiche-page .mobile-search-example,
.fiche-page .search-example {
    display: none !important;
}

/* =====================================================================
   MENU COULISSANT
   ===================================================================== */

.parent-container {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
}

.menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1400;
    width: min(86vw, 320px);
    height: 100dvh;
    min-height: 100vh;
    padding: max(8px, env(safe-area-inset-top)) 0 max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform .2s ease;
    background: #1f1f1f;
    box-shadow: 6px 0 24px rgba(0, 0, 0, .28);
}

.menu.is-open {
    transform: translateX(0);
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    background: rgba(0, 0, 0, .42);
}

.menu-backdrop.is-open {
    display: block;
}

.menu .menu-section-title {
    margin: 14px 12px 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    text-align: left;
    font-size: 17px;
}

.menu .menu-account {
    padding: 4px 14px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #d7d7d7;
}

.menu-button {
    min-height: 45px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, .04);
    text-align: left;
    font-size: 14px;
    line-height: 1.25;
}

/* =====================================================================
   CONTENU GÉNÉRAL
   ===================================================================== */

.container {
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.page-content {
    width: 100%;
    padding: 10px 9px 24px;
}

.page-message {
    margin: 9px 0;
    padding: 10px 11px;
    border-left-width: 3px;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    font-size: 14px;
}

.buttonPro,
.buttonPro2,
.buttonProExc {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 6px;
    font-size: 14px;
}

/* Recherche des pages Historique / Lien Technique. */
.page-content > form:first-child {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin: 2px 0 10px;
}

.search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #ccd3d9;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

/* =====================================================================
   RÉSULTATS DE RECHERCHE / HISTORIQUE / LIENS TECHNIQUES
   ===================================================================== */

.result,
.result2 {
    width: 100%;
    overflow: visible;
}

.responsive-table,
.responsive-table tbody,
.responsive-table tr,
.responsive-table td {
    display: block;
    width: 100%;
}

.responsive-table thead {
    display: none;
}

.responsive-table tr {
    margin: 0 0 9px;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    overflow: hidden;
    background: #ffffff !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .055);
}

.responsive-table td {
    position: relative;
    min-height: 38px;
    padding: 8px 10px 8px 41%;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    background: #ffffff !important;
    font-size: 14px;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.responsive-table td:last-child {
    border-bottom: 0;
}

.responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 8px;
    left: 10px;
    width: 36%;
    font-size: 12px;
    font-weight: 700;
    color: #57616a;
}

/* Le sujet d'un BT devient le titre de la carte. */
.responsive-table td[data-label="Sujet"] {
    min-height: 0;
    padding: 11px 12px;
    background: #eef6fa !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.responsive-table td[data-label="Sujet"]::before {
    display: none;
}

.responsive-table td[data-label="Sujet"] a {
    display: block;
    color: #075985;
    text-decoration: none;
}

/* Sur Lien Technique, le modèle est lui-même le titre de la carte. */
.responsive-table td[data-label="Modèle"] {
    min-height: 0;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.responsive-table td[data-label="Modèle"]::before {
    display: none;
}

.responsive-table td[data-label="Modèle"] a {
    display: block;
    text-decoration: none;
}

/* =====================================================================
   PAGINATION
   ===================================================================== */

.pagination {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    width: 100%;
    margin: 12px 0;
    padding: 3px 1px 7px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.pagination a,
.pagination .is-current,
.pagination button {
    flex: 0 0 auto;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 7px;
    background: #ffffff;
    text-decoration: none;
}

.pagination .is-current {
    background: #006fab;
    color: #ffffff;
}

.pagination button img,
.pagination a img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* =====================================================================
   TOP CONSULTATIONS / NOUVEAUTÉS / MODIFICATIONS
   ===================================================================== */

.top3-section {
    width: 100%;
    max-width: none;
    margin: 6px 0;
    border: 1px solid #d7dde2;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .045);
}

.top3-heading {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-areas: "select title";
    align-items: center;
    width: 100%;
    gap: 4px 6px;
    margin: 0;
    padding: 4px 6px;
    background: #f1f6f9;
    border-bottom: 1px solid #dbe3e8;
}

.top3-heading form {
    grid-area: select;
    margin: 0;
}

.top3-heading select {
    width: 58px;
    min-width: 58px;
    min-height: 26px;
    padding: 2px 3px;
    border-radius: 5px;
    font-size: 11px;
}

.top3-heading > strong:nth-of-type(1) {
    grid-area: title;
    font-size: 14px;
    line-height: 1.15;
}

.top3-heading > strong:nth-of-type(2) {
    display: none !important;
}

.top3-table-wrap {
    width: 100%;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.top3-table,
.top3-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
}

.top3-table thead {
    display: none;
}

.top3-table tr {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #edf0f2;
}

.top3-table tr:last-child {
    border-bottom: 0;
}

.top3-table td {
    display: block;
    padding: 6px 7px;
    border: 0;
    font-size: 14px;
}

.top3-table .top3-rank {
    width: auto;
    text-align: center;
}

.top3-table .top3-meta {
    display: none;
}

.top3-badge {
    min-width: 26px;
    padding: 3px 5px;
}

.top3-table a {
    display: block;
    overflow-wrap: anywhere;
    text-decoration: none;
    line-height: 1.3;
}

/* =====================================================================
   PRÉFÉRENCES
   ===================================================================== */

.preferences-card {
    width: 100%;
    max-width: none;
    padding: 13px 11px 16px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.preferences-card h2 {
    margin: 0 0 13px;
    font-size: 21px;
}

.preferences-card h3 {
    margin: 18px 0 8px;
    font-size: 17px;
}

.preferences-card label[for="marque_pref"] {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

#marque_pref {
    width: 100%;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #ccd3d9;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

.preferences-table {
    width: 100%;
    max-width: none;
    margin-top: 7px;
    table-layout: fixed;
}

.preferences-table th,
.preferences-table td {
    padding: 8px 6px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.preferences-table select {
    width: 100%;
    min-height: 38px;
    font-size: 15px;
}

.preferences-table .order-button-cell {
    width: 68px;
    text-align: center;
}

.preferences-table .order-button-cell button {
    width: 40px;
    height: 38px;
    border: 1px solid #ccd3d9;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

/* =====================================================================
   INFORMATION
   ===================================================================== */

.info-content {
    width: 100%;
    max-width: none;
    padding: 12px;
    border-radius: 9px;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.55;
}

/* =====================================================================
   FICHE BT MOBILE
   ===================================================================== */

.fiche-mobile-menu {
    display: block;
}

.bt-page {
    width: 100%;
    padding-top: 9px;
}

.bt-sheet {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-areas:
        "logo title"
        "ids ids"
        "application application"
        "date date"
        "subject subject"
        "error error"
        "products products";
    width: 100%;
    margin: 0 0 10px;
    border: 1px solid #cfd6dc;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.bt-cell {
    min-width: 0;
    padding: 9px 10px;
    border-right: 0;
    border-bottom: 1px solid #e6eaed;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.bt-logo {
    grid-area: logo;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 5px;
    background: #f7f9fa;
}

.bt-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.bt-title {
    grid-area: title;
    background: #f7f9fa;
}

.bt-title-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5px;
    width: 100%;
    text-align: left;
}

.bt-title-inner > strong {
    grid-column: 1 / -1;
    font-size: 15px;
}

.bt-title-inner .buttonPro {
    width: 100%;
    min-height: 34px;
    padding: 6px 5px;
    font-size: 11px;
    line-height: 1.15;
}

.bt-title-inner .buttonPro:last-child {
    grid-column: 1 / -1;
}

.bt-ids {
    grid-area: ids;
}

.bt-application {
    grid-area: application;
}

.bt-products {
    grid-area: products;
    border-bottom: 0;
}

.bt-date {
    grid-area: date;
}

.bt-subject {
    grid-area: subject;
    background: #f5fafc;
    font-size: 15px;
}

.bt-error {
    grid-area: error;
}

.bt-products a {
    display: inline-block;
    margin: 4px 3px 0 0;
    padding: 4px 7px;
    border-radius: 5px;
    background: #edf5fa;
    text-decoration: none;
}

.bt-content {
    width: 100%;
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    background: #ffffff;
    overflow-wrap: anywhere;
    overflow-x: auto;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .04);
}

.bt-content img {
    max-width: 100% !important;
    height: auto !important;
}

.bt-content table {
    max-width: 100%;
}

/* ---------------------------------------------------------------------
   TABLEAUX CKEDITOR / INFORMATION TECHNIQUE
   Les anciens contenus peuvent contenir des dimensions inline fixes
   (ex. table width:926px, cellules width:450px / 700px).
   Sur mobile uniquement, on neutralise ces dimensions sans toucher
   au HTML enregistré en base.
   --------------------------------------------------------------------- */
.bt-richtext {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bt-richtext table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    table-layout: auto !important;
    border-collapse: collapse;
}

.bt-richtext table col,
.bt-richtext table colgroup,
.bt-richtext table th,
.bt-richtext table td {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
}

.bt-richtext table th,
.bt-richtext table td {
    padding: 6px 5px !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.3;
}

/* Les tailles de police inline de CKEditor ne doivent pas empêcher
   le tableau de se compacter correctement sur un petit écran. */
.bt-richtext table th span,
.bt-richtext table td span {
    font-size: inherit !important;
}

.bt-richtext table a {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bt-view-count {
    margin: 8px 0;
    padding: 0 2px;
    color: #5f6870;
    font-size: 12px;
}

.bt-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 7px;
    padding: 4px 0 10px;
}

.bt-actions form,
.bt-actions .buttonPro,
.bt-actions form .buttonPro {
    width: 100%;
    margin: 0;
}

/* Le PDF conserve le principe d'affichage PC : iframe 100 % x 600 px. */
.bt-pdf-frame {
    display: block;
    width: 100%;
    height: 600px;
    min-height: 600px;
    margin: 0 0 10px;
    border: 1px solid #d8dee3;
    border-radius: 8px;
    background: #ffffff;
}

.bt-history {
    margin-top: 10px;
    padding: 10px;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .05);
}

.bt-history > strong {
    display: block;
    margin-bottom: 8px;
}

.bt-history-toggle {
    min-height: 38px;
    margin-top: 7px;
    padding: 6px 8px;
    border: 0;
    background: transparent;
    font-size: 13px;
}

/* =====================================================================
   LOGIN / PUK / INFOBULLES EXISTANTES
   ===================================================================== */

.login-form {
    width: auto;
    height: auto;
    padding: 0 10px;
}

.login-form input {
    width: 100%;
    height: auto;
}

.pdfPuk embed {
    width: 100%;
    height: auto;
}

.tooltip .tooltiptext {
    width: min(240px, 80vw);
}


/* =====================================================================
   COMPATIBILITÉ AVEC LE HTML COMMUN V1.2
   Le thème compact conserve le rendu précédent et masque uniquement
   les composants propres au thème Clean.
   ===================================================================== */

.top-bar > .mobile-app-header,
.mobile-filter-toggle,
.topbar-filters .mobile-filter-submit,
.bottom-nav,
.mobile-top-intro,
.mobile-results-summary,
.bt-mobile-kicker,
.bt-mobile-badges,
.mobile-document-heading,
.top3-mobile-title,
.menu-mobile-close {
    display: none !important;
}

/* =====================================================================
   DIAGNOSTIC - Mobile Compact V1.0
   Utilise le balisage mobile déjà présent dans interface.php.
   ===================================================================== */

.diag-result {
    display: block;
    width: 100%;
    margin: 8px 0 10px;
}

.diag-result a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 56px;
    padding: 9px 10px;
    box-sizing: border-box;
    border: 1px solid #b8d8e8;
    border-radius: 9px;
    background: #eef8fc;
    color: #075f8f;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .045);
}

.diag-result a:active {
    background: #e2f2f9;
}

.diag-result .diag-result-icon {
    display: grid !important;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #c7e2ee;
    font-size: 16px;
    font-weight: 800;
    color: #075f8f;
}

.diag-result strong.mobile-only {
    display: block !important;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    color: #075f8f;
}

.diag-result small.mobile-only {
    display: block !important;
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.2;
    color: #5e7d8d;
}

.diag-result .diag-result-chevron {
    display: block !important;
    justify-self: end;
    font-size: 22px;
    line-height: 1;
    color: #7ba9bd;
}

.diag-result .desktop-diag-label {
    display: none !important;
}

/* Pagination compacte : conserve les flèches/icônes sans doublon texte. */
.pagination button .mobile-only {
    display: none !important;
}

/* Mobile Compact V1.0 : la marque du TOP est volontairement masquée. */
.top3-heading .top3-brand {
    display: none !important;
}

/* Message aucun résultat, absent de l'ancienne structure HTML. */
.empty-state,
.empty-state.mobile-only {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 10px;
    padding: 12px 13px;
    box-sizing: border-box;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .045);
    overflow: hidden;
}

.empty-state strong {
    display: block;
    margin-bottom: 3px;
    font-size: 15px;
    line-height: 1.25;
}

.empty-state p {
    margin: 0;
    color: #606a72;
    font-size: 13px;
    line-height: 1.35;
}

/* Choix de présentation mobile dans Préférences. */
.mobile-theme-preference {
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    background: #f8fafb;
}

.mobile-theme-preference h3 {
    margin-top: 0;
}

.mobile-theme-preference label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.mobile-theme-preference select {
    width: 100%;
    min-height: 42px;
    padding: 7px 9px;
    border: 1px solid #ccd3d9;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

.preference-help {
    margin: 7px 0 0;
    color: #606a72;
    font-size: 12px;
}


/* =====================================================================
   ÉDITION BT : reste optimisée en mobile dans les deux présentations.
   ===================================================================== */
:root {
    --mb-line: #e4e9ee;
    --mb-surface: #ffffff;
    --mb-surface-2: #f8fafb;
    --mb-text: #17202a;
    --mb-muted: #6c7885;
    --mb-accent: #006fab;
    --mb-danger: #b42318;
    --mb-radius: 18px;
    --mb-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.modif-bt-page > .mobile-app-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    height: 60px;
    padding: 7px 10px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border-bottom: 1px solid #dfe5e9;
}

.modif-bt-page .mobile-header-button {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #f5f7f8;
    color: #1f1f1f;
    text-decoration: none;
}

.modif-bt-page .mobile-hamburger span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 2.5px 0;
    background: #1f1f1f;
}

.modif-bt-page .mobile-brand {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.modif-bt-page .mobile-brand-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #006fab;
    color: #ffffff;
    font-weight: 800;
}

.modif-bt-page .mobile-brand strong,
.modif-bt-page .mobile-brand small {
    display: block;
    line-height: 1.1;
}

.modif-bt-page .mobile-brand small {
    margin-top: 2px;
    color: #68727a;
    font-size: 10px;
}

.modif-bt-page .edit-desktop-home,
.modif-bt-page .edit-header {
    display: none;
}

.edit-mobile-menu {
    display: block;
}

.modif-bt-page .edit-main-mobile {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 10px 9px 28px;
}

.edit-bt-table,
.edit-bt-table tbody,
.edit-bt-table tr,
.edit-bt-table td {
    display: block;
    width: 100%;
}

.edit-bt-table {
    border: 0;
    border-collapse: separate;
}

.edit-bt-table tr {
    margin-bottom: 8px;
    border: 0;
}

.edit-bt-table td,
.edit-editor-card,
.edit-upload-card {
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .04);
}

.edit-logo-cell,
.edit-bt-title {
    display: none !important;
}

.edit-field-cell input,
.edit-field-cell select {
    width: 100%;
    min-height: 44px;
    margin: 5px 0;
    padding: 7px 9px;
    border: 1px solid #ccd3d9;
    border-radius: 7px;
    background: #ffffff;
    font-size: 16px;
}

.edit-model-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.edit-model-chips span {
    padding: 5px 7px;
    border-radius: 6px;
    background: #edf5fa;
    font-size: 12px;
}

.edit-editor-card .cke {
    max-width: 100% !important;
    overflow: hidden;
}

.edit-editor-card .cke_top {
    overflow-x: auto;
    white-space: nowrap;
}

.edit-file-picker {
    min-height: 48px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    border: 1px dashed #b8c6d1;
    border-radius: 8px;
    background: #f8fafb;
    color: #006fab;
    font-size: 13px;
    font-weight: 700;
}

.edit-pdf-block {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #d8dee3;
    border-radius: 9px;
    background: #ffffff;
}

.edit-pdf-delete {
    width: 100%;
    min-height: 42px;
    border: 0;
    background: #fff5f4;
    color: #b42318;
}

.edit-mobile-save {
    margin: 12px 0;
    display: grid;
    gap: 7px;
}

.edit-mobile-save .mobile-filter-submit,
.edit-mobile-save a {
    width: 100%;
    min-height: 46px;
    display: grid !important;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: #006fab;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.edit-mobile-save a {
    border: 1px solid #ccd3d9;
    background: #ffffff;
    color: #1f1f1f;
}

.edit-model-separator,
.edit-model-desktop-break,
.edit-desktop-pdf-label {
    display: none;
}

.modif-bt-page #pdfFiles {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* =====================================================================
   CODE PUK - Mobile Compact V1.0
   Affichage uniquement : aucun impact sur le traitement KPAX/XLSX.
   Le PC continue d'utiliser les règles de styles.css.
   ===================================================================== */

.page-code-puk {
    overflow-x: hidden;
}

.page-code-puk > div[align="right"] {
    padding: 8px 12px !important;
}

.page-code-puk .login-form {
    width: auto;
    max-width: none;
    margin: 0 12px;
    padding: 0;
}

.page-code-puk .login-form h1 {
    margin: 8px 0 12px;
    padding: 8px 0;
    font-size: 22px;
    line-height: 1.2;
}

.page-code-puk .login-form h0 {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.35;
}

.page-code-puk .login-form form {
    width: 100%;
    margin: 0;
}

.page-code-puk .login-form input[type="text"] {
    width: 100%;
    min-height: 44px;
    margin: 10px 0 12px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 16px;
}

.page-code-puk .login-form input[type="submit"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 15px;
}

.page-code-puk .pdfPuk {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.page-code-puk .pdfPuk embed {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 65vh !important;
    min-height: 440px;
    border: 0;
}

