/* =================================================================
   armoire-negative.fr (Frimarex) — palette et typographies posées par le rendu (Spectra Nova / "Cantarell")
   ================================================================= */

:root {
    --primary:       #7C3AED;
    --primary-dark:  #001952;
    --primary-soft:  rgba(124, 58, 237, .08);
    --primary-soft2: rgba(124, 58, 237, .15);
    --cta:           #996600;
    --cta-dark:      #774F00;
    --text:          #0E0E11;
    --text-soft:     #353535;
    --text-muted:    #707070;
    --bg-base:       #FFFFFF;
    --bg-alt:        #F7F7F8;
    --bg-dark:       #0B0B0C;
    --arete:          #E5E6EB;
    --arete-clair:    #F7F7F8;
    --repere:          #996600;
    --success:       #A65A1F;
    --error:         #D1343C;

    --max-w:         1200px;
    --max-w-narrow:  760px;
    --gutter:        clamp(16px, 4vw, 32px);
    --radius:        12px;
    --radius-lg:     16px;
    --shadow-sm:     0 2px 8px rgba(0,0,0,.06);
    --shadow-md:     0 8px 24px rgba(0,0,0,.08);
    --shadow-lg:     0 24px 48px rgba(124,58,237,.12);

    --font-display:    "Spectra Nova", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-sans:     "Cantarell", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

    --header-h:      72px;
}

/* ===== Reset minimal ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, picture, video { max-width: 100%; display: block; height: auto; }
a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s; }
a:hover { color: var(--cta); }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { padding: 0; }

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text);
    margin: 0 0 .6em;
    line-height: 1.2;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin-top: 0; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p  { margin: 0 0 1em; color: var(--text-soft); }
strong { color: var(--text); font-weight: 700; }

/* ===== Layout ===== */
.ms-cont { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.ms-cont--narrow { max-width: var(--max-w-narrow); }
.ms-ct { text-align: center; }

/* ===== SEO-first DOM order : longform & form en haut du DOM, repositionnés visuellement via order ===== */
main { display: flex; flex-direction: column; }
main > *                                { order: 100; }
main > .ms-hr                         { order: 1; }
main > .ms-fm                         { order: 2; }
main > .ms-tr                        { order: 3; }
main > .ms-contentx__section              { order: 10; }
/* Pages ville : longform monté en DOM position 3, visuellement repositionné en 7 (après Métiers) */
main > .ms-contentx__section--gamme         { order: 10; }
main > .ms-contentx__section--solutions     { order: 11; }
main > .ms-contentx__section--realisations   { order: 12; }
main > .ms-contentx__section--zone          { order: 13; }
main > .ms-contentx__section--metiers       { order: 14; }
main > .ms-contentx__section--longform      { order: 20; }
main > #avis-clients                    { order: 30; }
main > .ms-contentx__section--faq           { order: 31; }
main > .ms-cb                     { order: 32; }
main > .ms-contentx__section--voisines      { order: 33; }
main > .ms-contentx__section--top-dept      { order: 34; }
main > .ms-contentx__section--top-france    { order: 35; }

/* ===== Header ===== */
.ms-hd {
    position: sticky; top: 0; z-index: 1000;
    background: #fff;
    transition: box-shadow .2s;
}
.ms-hd--scrolled { box-shadow: var(--shadow-sm); }
.ms-hd__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    min-height: var(--header-h);
}
.ms-hd__brand {
    display: inline-flex; align-items: center;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
    line-height: 0;
}
.ms-hd__brand img {
    display: block;
    height: 40px;
    width: auto;
    max-height: 40px;
}
@media (max-width: 600px) {
    .ms-hd__brand img { height: 32px; max-height: 32px; }
}

/* Nav */
.ms-nv__list {
    display: flex; align-items: center; gap: 6px;
}
.ms-nv__list > li > a {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-soft);
    text-decoration: none;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.ms-nv__list > li > a:hover { background: var(--primary-soft); color: var(--primary); }
.ms-nv__list > li.ms-nv__cta > a,
.ms-nv__list > li.ms-nv__cta > a:hover,
.ms-nv__list > li.ms-nv__cta > a:visited,
.ms-nv__list > li.ms-nv__cta > a:focus {
    padding: 10px 18px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    background: var(--cta) !important;
}
.ms-nv__list > li.ms-nv__cta > a:hover {
    background: var(--cta-dark) !important;
}
.ms-nv__burger {
    display: none;
    width: 40px; height: 40px;
    padding: 0; border: 0; background: transparent;
    flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.ms-nv__burger span {
    width: 22px; height: 2px; background: var(--text); border-radius: 1px;
    transition: transform .2s, opacity .2s;
}

/* ===== Buttons ===== */
.ms-btnx {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    text-decoration: none;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    white-space: nowrap;
}
.ms-btnx--cta {
    background: var(--cta);
    color: #fff;
    box-shadow: 0 4px 12px rgba(153, 102, 0, .25);
}
.ms-btnx--cta:hover { background: var(--cta-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(153, 102, 0, .35); }
.ms-btnx--ghost {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.ms-btnx--ghost:hover { background: var(--primary); color: #fff; }
.ms-btnx--lg { padding: 16px 32px; font-size: 16px; }

/* ===== Hero ===== */
.ms-hr {
    background: linear-gradient(180deg, #A4C0FF 0%, #B3CDFF 55%, #FFF 100%);
    padding: clamp(40px, 7vw, 80px) 0;
}
.ms-hr__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.ms-hr__copy { font-family: var(--font-sans); }
.ms-hr__eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
}
.ms-hr__h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
    line-height: 1.18;
    margin: 0 0 16px;
    text-wrap: balance;
}
.ms-hr__city { color: var(--primary); display: block; font-style: italic; text-wrap: balance; }
.ms-hr__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--text-soft);
    margin: 16px 0 24px;
    max-width: 56ch;
}
.ms-hr__chips {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin: 0 0 28px;
}
.ms-chipx {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
}
.ms-chipx__check { color: var(--success); font-weight: 700; }
.ms-hr__actions { margin: 0; }
.ms-hr__visual {
    position: relative;
}
.ms-hr__visual img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 3 / 2;
    object-fit: contain;
    width: 100%;
}

/* ===== Hero floating card (style SaaS blanc compact, bottom-right) ===== */
.ms-hr__price-card {
    position: absolute;
    bottom: 16px; right: -16px;
    background: #ffffff;
    color: var(--text);
    border-radius: 14px;
    padding: 10px 18px 10px 10px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 28px rgba(14, 14, 17, .12), 0 2px 6px rgba(14, 14, 17, .06);
    z-index: 5;
    text-decoration: none;
    max-width: 270px;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: card-fade-in .7s ease both;
}
.ms-hr__price-card:hover {
    transform: translateY(-2px);
    color: var(--text);
    box-shadow: 0 18px 36px rgba(14, 14, 17, .16), 0 4px 10px rgba(14, 14, 17, .08);
}
.ms-hr__price-card__icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 26px;
    line-height: 1;
    color: #000000;
    flex-shrink: 0;
    background: #A4C0FF;
}
.ms-hr__price-card__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ms-hr__price-card__sub {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-soft);
    line-height: 1.2;
    white-space: nowrap;
}
.ms-hr__price-card__title {
    font-family: var(--font-sans);
    font-weight: 800;
    color: var(--text);
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
}
.ms-hr__price-card__line3 {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    margin-top: 1px;
}

@keyframes card-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1024px) {
    .ms-hr__price-card { right: -10px; bottom: 12px; max-width: 250px; }
}
@media (max-width: 768px) {
    .ms-hr__price-card { right: 10px; bottom: 10px; max-width: 240px; }
}
@media (max-width: 480px) {
    .ms-hr__price-card { padding: 8px 14px 8px 8px; gap: 10px; border-radius: 12px; right: 6px; bottom: 6px; }
    .ms-hr__price-card__icon { width: 36px; height: 36px; font-size: 22px; border-radius: 9px; }
    .ms-hr__price-card__title { font-size: 15px; }
    .ms-hr__price-card__sub { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .ms-hr__price-card { animation: none; }
}

/* ===== Trust bar — bandeau réassurance sous le hero ===== */
.ms-tr {
    background: #ffffff;
    border-top: 1px solid var(--arete);
    border-bottom: 1px solid var(--arete);
    padding: 16px 0;
}
.ms-tr__list {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 12px 36px;
    margin: 0; padding: 0;
}
.ms-tr__item {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.ms-tr__icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.ms-tr__text { line-height: 1.2; }
@media (max-width: 768px) {
    .ms-tr { padding: 14px 0; }
    .ms-tr__list { gap: 10px 20px; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding: 0 var(--gutter); margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
    .ms-tr__list::-webkit-scrollbar { display: none; }
    .ms-tr__item { font-size: 13px; white-space: nowrap; flex-shrink: 0; }
    .ms-tr__icon { font-size: 18px; }
}

/* ===== Bloc "rappel technicien" ===== */
.ms-cb__grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
}
.ms-cb__visual img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.10);
}
.ms-cb__title {
    font-family: var(--font-display);
    color: var(--primary-dark);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    margin: 0 0 16px;
    text-wrap: balance;
    line-height: 1.25;
}
.ms-cb__lead {
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.55;
    margin: 0 0 24px;
    max-width: 50ch;
}
.ms-cb__actions { margin: 0; }

@media (max-width: 768px) {
    .ms-cb__grid { grid-template-columns: 1fr; gap: 24px; }
    .ms-cb__visual img { max-height: 280px; }
}

/* ===== Sticky CTA mobile ===== */
.ms-stc {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 900;
    display: none;
    justify-content: center;
    pointer-events: none;
    transform: translateY(100px);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}
.ms-stc--visible {
    transform: translateY(0);
    opacity: 1;
}
.ms-stc__btn {
    pointer-events: auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--cta);
    color: #fff !important;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(153, 102, 0, .4), 0 0 0 3px rgba(255, 255, 255, .9);
    min-width: 260px;
    transition: background .15s, transform .15s, box-shadow .15s;
}
.ms-stc__btn:hover { background: var(--cta-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(153, 102, 0, .50), 0 0 0 3px rgba(255, 255, 255, .9); }
@media (max-width: 768px) {
    .ms-stc { display: flex; }
}

/* ===== Image expertise (insérée après H2#3 sur pages service+ville) ===== */
.ms-eximg {
    margin: 24px 0 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 3 / 2;
}
.ms-eximg img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ===== Rating widget ===== */
.ms-rate {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
    margin: 8px 0 20px;
    font-size: 15px;
    color: var(--text-soft);
}
a.ms-rate--link {
    text-decoration: none;
    transition: opacity .15s, transform .15s;
    cursor: pointer;
}
a.ms-rate--link:hover { opacity: 0.85; transform: translateY(-1px); }
a.ms-rate--link .ms-rate__count strong { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.ms-rate__stars {
    color: var(--repere);
    font-size: 1.3rem;
    letter-spacing: 2px;
    line-height: 1;
}
.ms-rate__value strong { color: var(--text); font-size: 1.15rem; font-weight: 700; }
.ms-rate__count a { color: var(--text-soft); text-decoration: underline; text-decoration-style: dotted; }
.ms-rate__count a:hover { color: var(--primary); }

/* ===== Sections ===== */
.ms-contentx__section {
    padding: clamp(36px, 5vw, 64px) 0;
}
.ms-contentx__section--alt { background: var(--bg-alt); }
.ms-contentx__section--longform { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(48px, 6vw, 80px); }
.ms-sec__h2 { text-align: center; margin: 0 0 12px; }
.ms-sec__lead { text-align: center; max-width: 60ch; margin: 0 auto 40px; color: var(--text-soft); }

/* ===== Cards ===== */
.ms-crds { display: grid; gap: 24px; margin: 32px 0 0; }
.ms-crds--2 { grid-template-columns: repeat(2, 1fr); }
.ms-crds--3 { grid-template-columns: repeat(3, 1fr); }
.ms-crds--4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }

.ms-crd {
    background: #fff;
    border: 1px solid var(--arete);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color .15s, box-shadow .2s, transform .1s;
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
}
a.ms-crd:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.ms-crd__icon { font-size: 32px; line-height: 1; margin-bottom: 12px; display: inline-block; }
.ms-crd__title { font-family: var(--font-display); margin: 0 0 8px; font-size: 1.25rem; }
.ms-crd__desc { color: var(--text-soft); font-size: 15px; margin: 0 0 12px; }
.ms-crd__price { font-size: 14px; color: var(--text-muted); margin: auto 0 12px; }
.ms-crd__price strong { color: var(--text); font-size: 1rem; }
.ms-crd__link { color: var(--primary); font-weight: 700; font-size: 14px; margin-top: auto; }


/* Product cards H2#2 */
.ms-crd--product { padding: 0; overflow: hidden; }
.ms-crd--product img { aspect-ratio: 4/3; object-fit: contain; }
.ms-crd--product h3, .ms-crd--product p { padding: 0 20px; }
.ms-crd--product h3 { padding-top: 16px; }
.ms-crd--product p:last-child { padding-bottom: 20px; }

/* Feature cards */
.ms-crds--feat .ms-crd { text-align: center; align-items: center; }
.ms-crds--feat .ms-crd__icon { font-size: 40px; }

/* Testimonial cards */
.ms-crds--testimonials .ms-crd { background: var(--bg-alt); border: 0; }
.ms-test__stars { color: var(--repere); font-size: 1.2rem; letter-spacing: 2px; margin: 0 0 12px; line-height: 1; }
.ms-test__text { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; line-height: 1.55; margin: 0 0 16px; color: var(--text); border-left: 3px solid var(--primary); padding: 0 0 0 16px; }
.ms-test__author { font-size: 14px; color: var(--text-soft); margin: 0; }
.ms-test__author strong { color: var(--text); }

/* ===== Chips list (maillage villes) ===== */
.ms-chips--cities {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin: 24px 0 0;
}
.ms-chips--cities li { margin: 0; }
.ms-chips--cities a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.ms-chips--cities a:hover { background: var(--primary); color: #fff; }

/* ===== Dept cards grid ===== */
.ms-dgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin: 32px 0 0;
}
.ms-dept {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 18px 14px;
    background: #fff;
    border: 1px solid var(--arete);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color .15s, transform .1s;
    text-align: center;
}
.ms-dept:hover { border-color: var(--primary); transform: translateY(-2px); }
.ms-dept__code {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 4px;
}
.ms-dept__name { font-weight: 700; color: var(--text); font-size: 14px; }
.ms-dept__count { color: var(--text-muted); font-size: 12px; }

/* ===== City grid (page département) ===== */
.ms-cgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 24px 0 0;
}
.ms-city {
    display: flex; flex-direction: column;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--arete);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, background .15s;
}
.ms-city:hover { border-color: var(--primary); background: var(--primary-soft); }
.ms-city__name { font-size: 15px; }
.ms-city__cp { color: var(--text-muted); font-size: 13px; }
.ms-city__pop { color: var(--text-muted); font-size: 12px; }

/* ===== Longform content (H2#6) ===== */
.ms-contentx__section--longform p {
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 1.4em;
    color: var(--text-soft);
}
.ms-contentx__section--longform strong { color: var(--text); }
.ms-contentx__section--longform a { color: var(--primary); font-weight: 500; }

/* ===== FAQ ===== */
.ms-faqx { margin: 24px 0 0; border-top: 1px solid var(--arete); }
.ms-faqx__item { border-bottom: 1px solid var(--arete); padding: 0; }
.ms-faqx__q {
    padding: 18px 40px 18px 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    cursor: pointer;
    position: relative;
    list-style: none;
    transition: color .15s;
}
.ms-faqx__q::-webkit-details-marker { display: none; }
.ms-faqx__q::after {
    content: '+';
    position: absolute;
    right: 8px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 400;
    transition: transform .2s, background .15s;
}
.ms-faqx__item[open] .ms-faqx__q::after { transform: translateY(-50%) rotate(45deg); background: var(--primary); color: #fff; }
.ms-faqx__q:hover { color: var(--primary); }
.ms-faqx__a { padding: 0 0 18px; color: var(--text-soft); font-size: 16px; line-height: 1.7; }

/* ===== Form lead ===== */
.ms-fm {
    background: #0E0E11;
    background-image: radial-gradient(circle at 20% 20%, rgba(153, 102, 0, .08) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(153, 102, 0, .05) 0%, transparent 50%);
    padding: clamp(40px, 6vw, 64px) 0;
    position: relative;
}
.ms-fm::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--repere) 20%, var(--repere) 80%, transparent 100%);
    pointer-events: none;
}
.ms-fm .ms-cont { position: relative; }
.ms-fm .ms-lf { border-top-color: var(--repere); }
.ms-fm__inner { display: flex; justify-content: center; }
.ms-lf {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--primary);
}
.ms-lf__header { margin: 0 0 24px; }
.ms-lf__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    color: var(--primary);
    margin: 0 0 14px;
    text-align: center;
}
.ms-lf__progress {
    display: flex; align-items: center; gap: 12px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}
.ms-lf__progress-bar {
    flex: 1;
    height: 4px;
    background: var(--arete);
    border-radius: 2px;
    overflow: hidden;
}
.ms-lf__progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--cta));
    transition: width .3s;
}
.ms-lf__legend { display: block; font-weight: 700; color: var(--text); margin: 0 0 16px; font-size: 1.05rem; }
.ms-lf__step--hidden { display: none; }
.ms-lf__group { margin: 0 0 20px; }
.ms-lf__group--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms-lf__sublabel {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin: 0 0 10px;
}


/* Check cards */
.ms-lf__checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ms-chk {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: #fff;
    border: 1.5px solid var(--arete);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .15s, background .15s;
}
.ms-chk input { position: absolute; opacity: 0; pointer-events: none; }
.ms-chk:hover { border-color: var(--primary); background: var(--primary-soft); }
.ms-chk:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

/* Inputs */
.ms-lf__field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ms-lf__field--full { grid-column: 1 / -1; }
.ms-lf__field > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}
.ms-lf__field input,
.ms-lf__field textarea,
.ms-lf__field select,
.ms-lf__select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--arete);
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.ms-lf__field input:focus,
.ms-lf__field textarea:focus,
.ms-lf__field select:focus,
.ms-lf__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.ms-lf__field textarea { resize: vertical; min-height: 84px; }

/* Select customisé : remplace l'apparence native macOS/Windows par une flèche custom alignée Frimarex */
.ms-lf__select,
.ms-lf__field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
    cursor: pointer;
}
.ms-lf__select:invalid,
.ms-lf__field select:invalid { color: var(--text-muted); }

.ms-lf__legal {
    font-size: 12px;
    color: var(--text-muted);
    margin: 16px 0 0;
    line-height: 1.5;
}

.ms-lf__actions {
    display: flex; justify-content: space-between; gap: 12px; align-items: center;
    margin: 24px 0 0;
}
.ms-lf__actions .ms-btnx--ghost { background: transparent; border-width: 1.5px; }

/* Thanks */
.ms-lf__thanks { text-align: center; padding: 24px 0; }
.ms-lf__thanks h3 { font-family: var(--font-display); font-size: 1.6rem; color: var(--primary); margin: 0 0 12px; }
.ms-lf__thanks p { color: var(--text-soft); margin: 0; }

/* ===== Legal pages ===== */
.ms-legalx { padding: 64px 0; }
.ms-legalx__header { text-align: center; margin: 0 0 40px; }
.ms-legalx__updated { color: var(--text-muted); font-size: 14px; }
.ms-legalx section { margin: 0 0 32px; }
.ms-legalx h2 { margin: 0 0 12px; color: var(--primary); font-size: 1.4rem; }
.ms-smap { display: flex; flex-direction: column; gap: 4px; }
.ms-smap a { display: inline-block; padding: 4px 0; }
.ms-smap--cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 24px; }
.ms-smap small { color: var(--text-muted); font-size: 13px; }

/* ===== Footer ===== */
.ms-ft {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, .85);
    padding: 64px 0 0;
}
.ms-ft__grid {
    display: grid;
    grid-template-columns: 1.2fr 2.4fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.ms-ft__brand { display: inline-flex; align-items: center; margin-bottom: 16px; line-height: 0; }
.ms-ft__brand img {
    display: block;
    height: 36px;
    width: auto;
    max-height: 36px;
}
.ms-ft__baseline { color: rgba(255,255,255,.85) !important; font-size: 14px; line-height: 1.5; margin: 0 0 16px; max-width: 32ch; }
.ms-ft__contact { color: rgba(255,255,255,.85); }
.ms-ft__contact a { color: rgba(255,255,255,.95) !important; text-decoration: underline; }
.ms-ft__contact a:hover { color: #fff !important; }
.ms-ft__title { color: #fff !important; font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 16px; font-weight: 700; }
.ms-ft__list { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.ms-ft__list a { color: rgba(255,255,255,.85) !important; text-decoration: none; font-size: 14px; transition: color .15s; }
.ms-ft__list a:hover { color: #fff !important; }
.ms-ft__list--cities { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.ms-ft__list--cities a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
    .ms-ft__list--cities { grid-template-columns: 1fr; gap: 8px 0; }
    .ms-ft__list--cities a { white-space: normal; }
}
.ms-ft__bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,.15);
    text-align: center;
    font-size: 13px;
}
.ms-ft__bottom p { color: #ffffff !important; margin: 0; }

/* ===== Exit popup ===== */
.ms-xp {
    position: fixed; inset: 0; z-index: 9999;
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
}
.ms-xp--visible { display: flex; }
.ms-xp__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
}
.ms-xp__content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0,0,0,.3);
    border-top: 4px solid var(--cta);
}
.ms-xp__close {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: 0; background: var(--arete);
    border-radius: 50%;
    font-size: 22px; line-height: 1;
    color: var(--text-soft);
}
.ms-xp__close:hover { background: var(--cta); color: #fff; }
.ms-xp__title { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); margin: 0 0 12px; }
.ms-xp__text { color: var(--text-soft); margin: 0 0 24px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .ms-ft__grid { grid-template-columns: 1fr 1fr; }
    .ms-crds--3 { grid-template-columns: repeat(2, 1fr); }
    .ms-crds--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --header-h: 60px; }
    .ms-hr__grid { grid-template-columns: 1fr; gap: 24px; }
    .ms-hr__visual { order: -1; max-width: 480px; margin: 0 auto; }
    .ms-crds--2, .ms-crds--3, .ms-crds--4 { grid-template-columns: 1fr; }
    .ms-lf__group--row { grid-template-columns: 1fr; }
    .ms-lf__checks { grid-template-columns: 1fr; }
    .ms-ft__grid { grid-template-columns: 1fr; gap: 32px; }

    .ms-nv__burger { display: flex; }
    .ms-nv__list {
        display: none;
        position: absolute;
        top: var(--header-h); left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        padding: 16px var(--gutter);
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--arete);
    }
    .ms-nv--open .ms-nv__list { display: flex; }
    .ms-nv__list > li > a { padding: 14px 0; border-radius: 0; }
    .ms-nv__cta { padding-top: 12px; }
    .ms-nv__cta a { width: 100%; }

    .ms-lf__actions { flex-wrap: wrap; }
    .ms-lf__actions .ms-btnx { flex: 1; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.4rem; }
    .ms-hr { padding: 32px 0; }
    .ms-chipx { font-size: 13px; padding: 6px 12px; }
}

/* Hero font lock — éviter le CLS si la fonte de titres charge lentement */
.ms-hr__h1, .ms-hr__eyebrow {
    font-family: var(--font-display);
}

/* Accessibility */
.ms-btnx:focus-visible,
a:focus-visible,
input:focus-visible,
button:focus-visible,
.ms-chk:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print */
@media print {
    .ms-hd, .ms-ft, .ms-xp, .ms-fm, .ms-nv { display: none !important; }
    body { color: #000; background: #fff; }
}
