/* Mobile controls: keep full actions and native date editors inside their cells. */
@media(max-width:600px){
 body :is(.btn,.cv-page-navigation-v1>button){box-sizing:border-box;max-width:100%;min-width:0;white-space:normal!important;overflow-wrap:anywhere;height:auto;line-height:1.4}
 #view .cv-reference-row,#view .cv-guide-followups{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;max-width:100%;gap:8px;white-space:normal!important}
 #view .cv-reference-row>.btn,#view .cv-guide-followups>.btn{flex:0 1 auto!important;max-width:100%!important;min-width:0!important;min-height:44px!important;white-space:normal!important}
 #view .cv-reference-scroll-next{display:none!important}
 body input:is([type=checkbox],[type=radio]):not([hidden]){flex-shrink:0!important;min-width:20px;min-height:20px}
 #view .cv-menu-folder-title-v115{letter-spacing:.01em!important}
}
@media(max-width:420px){
 #view .cv-budget-flow .cost-field:has(>input:is([type=date],[type=datetime-local])){grid-column:1/-1!important}
}
.cv-field-fulltext{display:block!important;box-sizing:border-box;max-width:100%;min-width:0;grid-column:1/-1;margin:5px 0 10px;font:inherit;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;color:inherit}
.cv-field-fulltext[hidden]{display:none!important}

/* Compact professional header: accessible help icon keeps its localized text. */
@media(max-width:600px){
 .mtop{flex-wrap:nowrap!important;gap:8px!important;min-height:64px;box-sizing:border-box}
 .mtop>.catpill{display:none!important}
 .mtop>img{flex:0 1 76px!important;max-width:76px!important;min-width:48px;object-fit:contain}
 .mtop>.lang{margin-left:auto!important;flex:0 0 60px!important;min-width:60px}
 .mtop>.lang select{width:100%;min-height:44px;box-sizing:border-box}
 .mtop #cv-spaces-support,.su-top #cv-spaces-support{position:relative!important;flex:0 0 44px!important;box-sizing:border-box!important;width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;font-size:0!important;line-height:0!important;overflow:hidden!important;color:#e8f2d7!important}
 .mtop #cv-spaces-support::before,.su-top #cv-spaces-support::before{content:"";position:absolute;inset:10px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M9.5 8.8a2.6 2.6 0 0 1 5 .9c0 1.7-2.5 2-2.5 3.8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17' r='1'/%3E%3C/svg%3E") center/contain no-repeat}
}

@media(max-width:600px){.mnav:has(>a[data-view=messages]){grid-template-columns:1fr 1.55fr .65fr 1fr .65fr!important}.mnav:has(>a[data-view=drivers]){grid-template-columns:.65fr 1fr 1.3fr 1.15fr .65fr!important}.mnav>a>span{max-width:100%;overflow-wrap:normal;word-break:normal;hyphens:auto}.cv-mobile-logout{display:block!important;min-height:44px;margin-top:16px}}
@media(min-width:601px){.cv-mobile-logout{display:none!important}}
/* Document actions remain full width and distinguish title, state and upload action. */
#view .cv-doc-panel-v18 .cv-doc-row-v18{display:grid!important;grid-template-columns:38px minmax(0,1fr) 16px!important;gap:9px!important;padding:12px!important;min-width:0!important;box-sizing:border-box!important}
#view .cv-doc-row-v18>.cv-doc-photo-v18{width:38px!important;height:38px!important}
#view .cv-doc-row-v18>span:has(>strong){min-width:0;grid-column:2}
#view .cv-doc-row-v18 strong{display:block;font-size:14px!important;line-height:1.4!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:normal!important}
#view .cv-doc-row-v18 small{font-size:12px!important;line-height:1.5!important;white-space:normal!important;overflow:visible!important;word-break:normal!important}
#view .cv-doc-row-v18 .cv-menu-arrow-v18{grid-column:3}
#view .cv-doc-row-v18.scan{border:1px solid #718f3e!important;background:#1c2913!important}
#view .cv-document-add-label{display:flex!important;gap:8px;align-items:center;margin-top:10px!important;padding:0!important;border-radius:0;background:transparent!important;color:inherit!important;font-size:12px!important;font-weight:650}
#view .cv-document-add-label::before,#view .cv-doc-panel-v18 button.scan::before{content:"";display:inline-block;width:22px;height:22px;flex:0 0 22px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' d='M4 7h4l2-3h4l2 3h4v14H2V7h2Z'/%3E%3Ccircle fill='none' stroke='black' stroke-width='1.8' cx='12' cy='13.5' r='4'/%3E%3C/svg%3E") center/contain no-repeat}
#view .cv-doc-row-v18.scan::before{display:none!important}
#view .cv-doc-panel-v18 button.scan:not(.cv-doc-row-v18){display:flex;align-items:center;justify-content:center;gap:9px;grid-column:1/-1;width:100%;min-height:48px;padding:12px!important;font-size:13px!important;line-height:1.4!important;white-space:normal!important;background:#171c13!important;color:var(--text)!important;border:1px solid #39432e;border-radius:9px}
#view .cv-doc-row-v18:has(>button.scan)>span{grid-column:1/-1!important}
#view .cv-local-registration>.cv-doc-access{border:1px solid #718f3e;background:#1c2913;padding:14px;gap:10px}
.cv-document-camera{display:block;width:28px;height:28px;flex:0 0 28px}.cv-document-camera svg{display:block;width:100%;height:100%}
#view .cv-local-registration>.cv-doc-access strong{font-size:15px}.cv-local-registration>.cv-doc-access small{font-size:12px}
/* Keep the send button visible independently of input contents. */
html body #view .cv-via-composer{display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;gap:8px!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;align-items:center}
html body #view .cv-via-composer #ci{width:100%!important;min-width:0!important;max-width:100%!important;height:48px!important;min-height:48px!important;box-sizing:border-box!important;font-size:16px!important;field-sizing:fixed!important}
html body #view .cv-via-composer #cs{width:auto!important;min-width:70px!important;max-width:120px!important;min-height:48px!important;padding:0 12px!important;white-space:nowrap!important;font-size:14px!important;box-sizing:border-box!important}
#view:has(#thread)>.screen,#thread,#thread>.cv-via-bot-message,.cv-via-chat-bottom{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
#thread .bubble{box-sizing:border-box!important;min-width:0!important;overflow-wrap:anywhere!important;word-break:normal!important;white-space:normal;max-width:100%!important}
#thread .cv-via-bot-message>.bubble{width:auto!important;max-width:calc(100% - 38px)!important;margin-left:38px!important}
/* Equal-size sale actions with the same padding and readable hierarchy. */
#view :is(.cv-sale-via-v83,.cv-sale-dealer-v77){box-sizing:border-box!important;min-height:112px!important;padding:16px 14px!important;border-radius:16px!important;grid-template-columns:36px minmax(0,1fr) 18px!important;gap:8px 12px!important}
#view .cv-sale-via-icon-v83{width:36px!important;height:36px!important;grid-row:1/3}#view .cv-sale-via-icon-v83 img{width:34px!important;height:34px!important}
#view .cv-sale-via-copy-v83 strong{font-size:17px!important;line-height:1.4!important}#view .cv-sale-via-copy-v83 small{display:none!important}#view .cv-sale-via-copy-v83 em{font-size:13px!important;line-height:1.5!important}
#view .cv-entretien-vehicle-photo-v73,#view .cv-entretien-vehicle-photo-v73 *{animation:none!important;transition:none!important}

.cv-constat-choice-dialog{width:min(520px,calc(100vw - 28px));max-height:85dvh;overflow:auto;box-sizing:border-box;padding:20px;border-radius:16px;border:1px solid #718f3e;background:#171d12;color:#f3f6ed}
.cv-constat-choice-dialog a,.cv-constat-choice-dialog button{display:block;box-sizing:border-box;width:100%;padding:14px;margin:12px 0 0;font-size:15px;line-height:1.5;white-space:normal;text-align:left;text-decoration:none}
.cv-official-vignettes{margin:12px 0 0;padding:14px;border:1px solid #667e43;border-radius:12px}.cv-official-vignettes summary{font-size:15px;line-height:1.4;font-weight:750;cursor:pointer}.cv-official-vignettes a{display:block;padding:12px;margin-top:10px;min-height:44px;box-sizing:border-box;border:1px solid #708c49;border-radius:9px;color:inherit;text-decoration:none;font-size:14px;line-height:1.5}.cv-official-vignettes p{font-size:12px;line-height:1.5}
body.cv-comfort #view .cv-doc-row-v18.scan,body.cv-comfort #view .cv-local-registration>.cv-doc-access{background:#f3f8e9!important;color:#203010!important}
body.cv-comfort .cv-constat-choice-dialog{background:#fff;color:#203010}
@media(max-width:360px){#view .cv-doc-panel-v18 .cv-doc-row-v18{display:grid!important;grid-template-columns:30px minmax(0,1fr) 12px!important;gap:7px!important;padding:10px!important}#view .cv-doc-row-v18>.cv-doc-photo-v18{width:30px!important;height:32px!important}#view .cv-doc-row-v18 strong{font-size:13px!important}#view .cv-document-add-label{padding:8px!important;gap:6px;font-size:11.5px!important}html body #view .cv-via-composer #cs{min-width:64px!important;padding:0 10px!important}}

#view .cv-doc-row-v18.scan>span:has(>strong){display:contents!important}#view .cv-doc-row-v18.scan strong{grid-column:2;grid-row:1}#view .cv-doc-row-v18.scan .cv-document-add-label{grid-column:1/-1;grid-row:2}#view .cv-doc-row-v18.scan>.cv-doc-photo-v18,#view .cv-doc-row-v18.scan>.cv-menu-arrow-v18{grid-row:1}

#view :is(.cv-sale-via-v83,.cv-sale-dealer-v77){height:var(--cv-sale-tile-height,auto)!important}
#view .cv-sale-via-v83{grid-template-columns:minmax(0,1fr) 36px 18px!important;align-items:center!important}
#view .cv-sale-via-copy-v83{grid-column:1!important;grid-row:1!important}
#view .cv-sale-via-icon-v83{grid-column:2!important;grid-row:1!important;align-self:center!important}
#view .cv-sale-via-arrow-v83{grid-column:3!important;grid-row:1!important}

/* Unified document access: title, green file state, camera action. */
html body #view .cv-document-form>span{grid-column:1/-1!important}html body #view .cv-document-form>.doc-print,html body #view .cv-document-form>.cv-constat-choice,html body #view .cv-document-form>a{grid-column:1/-1;width:100%;min-height:44px;padding:10px;box-sizing:border-box;white-space:normal}html body #view .cv-doc-row-v18.scan>span:has(>strong){display:contents!important}
html body #view .cv-doc-row-v18.scan strong{grid-column:1/-1!important;grid-row:1!important;font-size:15px!important}
html body #view .cv-doc-row-v18.scan>.cv-doc-photo-v18,html body #view .cv-doc-row-v18.scan>.cv-menu-arrow-v18{display:none!important}
html body #view .cv-doc-row-v18.scan .cv-document-state{grid-column:1/-1!important;grid-row:2!important;margin:0!important}
html body #view .cv-doc-row-v18.scan .cv-document-add-label{grid-column:1/-1!important;grid-row:3!important;margin-top:4px!important}
html body #view .cv-document-state{display:block!important;color:#b8ec57!important;font-size:12px!important;line-height:1.5!important}
html body #view .cv-local-registration>.cv-doc-access{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:5px!important;border-radius:12px!important;padding:12px!important;margin-bottom:0!important}
html body #view .cv-doc-access>span:has(>strong){display:contents!important}
html body #view .cv-doc-access>.cv-document-camera,html body #view .cv-doc-access>span:last-child{display:none!important}
html body #view .cv-doc-access strong{font-size:15px!important;line-height:1.4!important}
html body #view .cv-document-add-label{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:28px!important;padding:0!important;font-size:13px!important;gap:10px!important;white-space:normal!important}
html body #view .cv-registration-entry{padding:0!important;border:0!important}
html body #view .cv-doc-head-v18 small{display:none!important}
html body #view .cv-official-vignettes{padding:0!important;margin-top:12px!important;border-radius:14px!important}html body #view .cv-official-vignettes summary{list-style:none!important;display:grid!important}html body #view .cv-official-vignettes summary::-webkit-details-marker{display:none}html body #view .cv-official-vignettes>a,html body #view .cv-official-vignettes>p{margin:10px 12px!important}html body #view .cv-official-vignettes[open] .cv-doc-chevron-v18{transform:rotate(90deg)}
.cv-vignette-receipt-note{font-size:12px;line-height:1.5;margin:10px 0}
body.cv-comfort #view .cv-document-state{color:#3e6716!important}
.cv-managed-vehicles{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:16px 0}
#view .cv-managed-vehicle{box-sizing:border-box;width:100%;padding:18px!important;margin:0!important;border:1px solid #4d652c;border-radius:18px;background:#192113}
.cv-managed-vehicle h3{font-size:20px;margin:0 0 15px;line-height:1.3}
.cv-managed-vehicle .vehicle-list-visual{width:100%!important;height:160px!important;margin:0!important}.cv-managed-vehicle .vehicle-list-visual img{width:100%;height:100%;object-fit:contain}
.cv-managed-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}.cv-managed-actions button,.cv-managed-add{min-height:48px!important;padding:12px!important;font-size:13px!important;white-space:normal!important;line-height:1.4!important}.cv-managed-add{width:100%}
body.cv-comfort #view .cv-managed-vehicle{background:#fff!important;color:#243218!important}

/* The score caption is centred and legible at mobile sizes. */
html body #view .home-health-caption{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;width:100%!important;text-align:center!important;padding:12px 8px!important;box-sizing:border-box!important;gap:8px!important}
html body #view .home-health-caption>span:first-child{width:100%;text-align:center!important}
html body #view .home-health-caption b{display:block!important;font-size:19px!important;line-height:1.4!important;text-align:center!important}
html body #view .home-health-caption small{display:block!important;font-size:15px!important;line-height:1.5!important;text-align:center!important;margin-top:7px!important;white-space:normal!important}
/* Same 46px icon frame and 27px pictogram as Menu, avoiding clipped drawings. */
html body #view .cv-unified-entretien-direct-v67 :is(.home-summary-icon-v28,.via-avatar){box-sizing:border-box!important;width:46px!important;height:46px!important;min-width:46px!important;flex:0 0 46px!important;display:grid!important;place-items:center!important;padding:8px!important}
html body #view .cv-unified-entretien-direct-v67 .home-summary-icon-v28 svg:not(.cv-appointment-wrench-v75){width:27px!important;height:27px!important;min-width:27px!important;padding:0!important}
html body #view .cv-unified-entretien-direct-v67 .via-avatar{padding:0!important}html body #view .cv-unified-entretien-direct-v67 .via-avatar img{width:44px!important;height:44px!important;object-fit:contain!important}

/* Workshop: same centred pictogram and lower-right round badge as appointments. */
html body #view .cv-unified-entretien-direct-v67 .home-summary-icon-v28:has(.cv-workshop-wrench-v19){position:relative!important;overflow:visible!important}
html body #view .cv-unified-entretien-direct-v67 .home-summary-icon-v28 .cv-workshop-wrench-v19{position:absolute!important;right:-7px!important;bottom:-6px!important;width:25px!important;height:25px!important;min-width:0!important;padding:3px!important;border:2px solid #6e5429!important;border-radius:50%!important;background:#0b0f08!important;color:#ffcd88!important;box-sizing:border-box!important}
html body:is(.cv-comfort,.visual-comfort) #view .cv-unified-entretien-direct-v67 .home-summary-icon-v28 .cv-workshop-wrench-v19{background:#fff!important;color:#84500c!important;border-color:#d4a96f!important}

/* Document upload: original camera action, without a filled green sub-button. */
html body.cv-comfort #view .cv-doc-panel-v18 button.scan:not(.cv-doc-row-v18){background:#fff!important;color:#203010!important;border-color:#aeb9a5!important}

/* Sale heading: retain the title and use the supplied pictogram on the dealer action. */
#view .screen:has(.cv-sale-dealer-v77) div:has(>h2[data-cvv-icon="sale"])>.eyebrow{display:none!important}
#view .screen:has(.cv-sale-dealer-v77) h2[data-cvv-icon="sale"]>.cvv-heading-icon{display:none!important}
#view .screen:has(.cv-sale-dealer-v77) h2[data-cvv-icon="sale"]{display:block!important;padding-left:0!important}
html body #view .cv-sale-dealer-v77{grid-template-columns:46px minmax(0,1fr) 18px!important;column-gap:12px!important}
html body #view .cv-sale-dealer-v77 .cv-sale-dealer-icon{display:block!important;width:46px!important;height:46px!important;padding:0!important;border:0!important;border-radius:10px;overflow:hidden;background:#f2f4f3}
html body #view .cv-sale-dealer-icon img{display:block!important;width:46px!important;height:46px!important;object-fit:contain!important}
/* Full-height mobile navigation, including the real bottom safe area. */
@media(max-width:700px),(max-height:480px) and (pointer:coarse){
 html body #nav{min-height:72px!important;padding:4px 4px max(6px,env(safe-area-inset-bottom,0px))!important;align-items:center!important;flex-shrink:0!important;overflow:visible!important}
 html body #nav .navbtn{height:64px!important;min-height:64px!important;max-height:64px!important;flex-shrink:0!important;padding:4px 2px!important;gap:3px!important;justify-content:center!important;overflow:visible!important}
 html body #nav .navbtn:not(.navvia)>.ico,html body #nav .navbtn:not(.navvia)>.cvv-nav-icon,html body #nav .navbtn:not(.navvia)>.cvv-nav-icon svg{width:28px!important;height:28px!important;flex:0 0 28px!important}
 html body #nav .navbtn>span:last-child{font-size:11px!important;line-height:13px!important;min-height:13px!important;white-space:nowrap!important}
 html body #nav .navvia .via-bot-mark,html body #nav .navvia .via-bot-image{display:block!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important;flex:0 0 40px!important;object-fit:contain!important;object-position:center!important;transform:none!important;border-radius:0!important;clip-path:none!important}
 html body #nav .navvia>span:last-child{font-size:8px!important;line-height:10px!important;min-height:10px!important;letter-spacing:0!important;white-space:nowrap!important}
}
