/* Mon Seul Artisan — site grand public. Charte v1.0 : bleu nuit #0B1F3B, orange #FF7A00, Montserrat + Inter */
:root {
  --brand: #FF7A00; --brand-600: #E96F00; --brand-700: #B85700; --brand-50: #FFF4EA;
  --ink: #0B1F3B; --ink-2: #33415a; --muted: #6B7280; --bg: #F4F6F9; --line: #e4e8ee; --sand: #FBF8F4;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titres: "Montserrat", var(--font);
  --r: 14px;
}
* { box-sizing: border-box; }
body { background: #fff; color: var(--ink); font-family: var(--font); font-size: 16.5px; line-height: 1.65; margin: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .btn, .logo-msa { font-family: var(--titres); }
h1, h2, h3 { color: var(--ink); line-height: 1.18; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin: 0 0 18px; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 1.1rem; margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 14px; }
a { color: var(--brand-700); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.kicker { display: block; font-family: var(--titres); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-700); margin-bottom: 12px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 14px 24px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-line { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-line:hover { border-color: var(--ink); }
.btn .ic { width: 18px; height: 18px; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo-msa { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.12rem; white-space: nowrap; }
.logo-msa img { border-radius: 9px; }
.logo-msa em { font-style: italic; color: #fff; background: var(--brand); padding: 0 7px; border-radius: 5px; display: inline-block; transform: skewX(-6deg); }
.top nav { display: flex; align-items: center; gap: 28px; }
.top nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; }
.top nav a:not(.btn):hover { color: var(--brand-700); }
.top nav .btn { padding: 11px 18px; font-size: .92rem; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.menu { display: none; }
@media (max-width: 900px) {
  .top nav a:not(.btn) { display: none; }
  .burger { display: block; }
  .menu.on { display: grid; padding: 6px 20px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 72px; z-index: 29; }
  .menu a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 440px) { .top nav .btn { display: none; } }

/* Ouverture de l'accueil : texte + recherche à gauche, photo à droite */
.intro { background: var(--sand); padding: 64px 0 72px; overflow: hidden; }
.intro .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.intro .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 540px; margin-bottom: 28px; }
.intro-photo { position: relative; }
.intro-photo img { width: 100%; height: 520px; object-fit: cover; border-radius: 22px; }
.intro-photo .note { position: absolute; left: 22px; bottom: 22px; background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 14px 40px rgba(11,31,59,.14); max-width: 270px; font-size: .92rem; color: var(--ink-2); }
.intro-photo .note b { display: block; color: var(--ink); font-family: var(--titres); margin-bottom: 2px; }
@media (max-width: 920px) {
  .intro { padding: 40px 0 48px; }
  .intro .wrap { grid-template-columns: 1fr; gap: 32px; }
  .intro-photo img { height: 300px; }
  .intro-photo .note { left: 14px; bottom: 14px; }
}

/* Recherche : travaux + code postal */
.finder { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; box-shadow: 0 10px 30px rgba(11,31,59,.07); max-width: 600px; }
.finder label { display: block; padding: 6px 12px; border-radius: 10px; }
.finder label + label { border-left: 1px solid var(--line); }
.finder small { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.finder select, .finder input { width: 100%; border: 0; outline: 0; font: inherit; font-weight: 600; color: var(--ink); background: transparent; padding: 2px 0; -webkit-appearance: none; appearance: none; }
.finder select { cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230B1F3B' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") right 2px center no-repeat; padding-right: 18px; }
.finder .btn { height: 100%; }
@media (max-width: 600px) { .finder { grid-template-columns: 1fr; } .finder label + label { border-left: 0; border-top: 1px solid var(--line); } .finder .btn { padding: 15px; } }
.reass { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: .93rem; color: var(--ink-2); }
.reass span { display: inline-flex; align-items: center; gap: 7px; }
.reass .ic { color: var(--brand); width: 18px; height: 18px; }

/* Sections */
.sec { padding: 84px 0; }
.sec.sand { background: var(--sand); }
.sec.grey { background: var(--bg); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.sec-head p { max-width: 560px; color: var(--muted); margin: 0; }
@media (max-width: 760px) { .sec { padding: 56px 0; } }

/* Travaux en photos */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; text-decoration: none; color: #fff; display: block; background: var(--ink); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover img { transform: scale(1.04); }
.tile span { position: absolute; inset: auto 0 0 0; padding: 60px 18px 16px; background: linear-gradient(transparent, rgba(11,31,59,.85)); font-family: var(--titres); font-weight: 700; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; }
.tile span .ic { width: 18px; height: 18px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.autres { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.autres b { margin-right: 6px; font-size: .95rem; }
.autres a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; font-size: .93rem; }
.autres a:hover { border-color: var(--ink); }

/* Déroulé en 3 temps, avec photo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img.ph { width: 100%; height: 540px; object-fit: cover; border-radius: 22px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } .split img.ph { height: 300px; } }
.timeline { list-style: none; padding: 0; margin: 26px 0 30px; }
.timeline li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-bottom: 24px; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px; width: 2px; background: var(--line); }
.timeline .n { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand-700); display: grid; place-items: center; font-family: var(--titres); font-weight: 800; background: #fff; }
.timeline p { margin: 0; color: var(--muted); }

/* Comparatif */
.compare { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.compare table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { font-family: var(--titres); font-size: .9rem; background: var(--bg); }
.compare th.nous, .compare td.nous { background: var(--brand-50); }
.compare th.nous { color: var(--brand-700); }
.compare td:first-child { color: var(--muted); width: 34%; }
.compare td.nous { font-weight: 600; }

/* Bandeau aides */
.band { background: var(--ink); color: #c9d1dc; border-radius: 24px; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; }
.band .txt { padding: 52px; }
.band h2 { color: #fff; }
.band img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.band .chiffre { font-family: var(--titres); color: var(--brand); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; margin: 6px 0 10px; }
@media (max-width: 900px) { .band { grid-template-columns: 1fr; } .band .txt { padding: 32px 24px; } .band img { min-height: 220px; } }

/* Guides */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post { text-decoration: none; color: inherit; }
.post img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); margin-bottom: 14px; }
.post h3 { font-size: 1.12rem; }
.post:hover h3 { color: var(--brand-700); }
.post p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr; } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 20px; } }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.04rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-700); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0; padding: 0 0 20px; color: var(--ink-2); }

/* Dernier appel à l'action, sur photo */
.final { position: relative; color: #fff; border-radius: 24px; overflow: hidden; padding: 72px 52px; }
.final img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,31,59,.92) 0, rgba(11,31,59,.72) 55%, rgba(11,31,59,.35)); z-index: 1; }
.final > div { position: relative; z-index: 2; max-width: 620px; }
.final h2 { color: #fff; }
.final p { color: #dbe2ea; }
@media (max-width: 760px) { .final { padding: 44px 22px; } }

/* Pages métier, ville, guide */
.page-top { background: var(--sand); padding: 44px 0 56px; }
.page-top .wrap.has-ph { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.page-top .ph img { width: 100%; height: 380px; object-fit: cover; border-radius: 20px; }
@media (max-width: 900px) { .page-top .wrap.has-ph { grid-template-columns: 1fr; gap: 26px; } .page-top .ph img { height: 240px; } }
.page-top h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.page-top .lead { font-size: 1.1rem; color: var(--ink-2); margin-bottom: 24px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span::before { content: "/"; margin: 0 8px; color: #b8c0cc; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; gap: 28px; } }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.list li .ic { color: var(--brand); margin-top: 3px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .facts { grid-template-columns: 1fr; } }
.fact { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #fff; }
.fact small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.fact b { display: block; font-family: var(--titres); font-size: 1.45rem; margin-bottom: 8px; }
.fact p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.cta-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 28px; margin-top: 8px; }
.cta-line p { margin: 0; font-family: var(--titres); font-weight: 700; font-size: 1.15rem; }
.article { padding: 48px 0 70px; }
.article .cover { width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 18px; margin-bottom: 30px; }
.article h2 { margin-top: 36px; font-size: 1.45rem; }
.article p, .article li { color: var(--ink-2); font-size: 1.06rem; }
.article ul { padding-left: 20px; }
.meta { color: var(--muted); font-size: .92rem; }
.legal-txt h2 { margin-top: 32px; font-size: 1.3rem; }
.legal-txt h3 { margin-top: 18px; }
.todo { background: #fdf3e0; color: #7a4a00; padding: 1px 6px; border-radius: 4px; }

/* Pied de page */
.foot { background: var(--ink); color: #aeb9c7; padding: 64px 0 26px; font-size: .94rem; margin-top: 84px; }
.foot .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.foot b { color: #fff; display: block; margin-bottom: 12px; font-family: var(--titres); font-size: .95rem; }
.foot a { color: #aeb9c7; text-decoration: none; display: block; padding: 4px 0; }
.foot a:hover { color: #fff; }
.foot .logo-msa { color: #fff; display: inline-flex; padding: 0; }
.foot .bas { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .86rem; }
.foot .bas a { display: inline; }
@media (max-width: 900px) { .foot .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot .cols { grid-template-columns: 1fr; } }

/* Repères locaux : 2 à 4 cartes */
.facts.f3 { grid-template-columns: repeat(3, 1fr); }
.facts.f4 { grid-template-columns: repeat(4, 1fr); }
.facts.f3 .fact b, .facts.f4 .fact b { font-size: 1.2rem; }
@media (max-width: 1000px) { .facts.f4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .facts.f3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .facts.f4 { grid-template-columns: 1fr; } }
.faint { color: var(--muted); font-size: .88rem; }

/* Villes et départements */
.villes-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.villes-grid a { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.villes-grid a:hover { border-color: var(--ink); }
.villes-grid b { display: block; font-family: var(--titres); font-size: .98rem; }
.villes-grid small { color: var(--muted); font-size: .82rem; }
@media (max-width: 1000px) { .villes-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .villes-grid { grid-template-columns: 1fr 1fr; } }
.depts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 24px; margin-top: 14px; }
.depts a { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .96rem; }
.depts a:hover { color: var(--brand-700); }
.depts a span { font-family: var(--titres); font-weight: 700; color: var(--muted); font-size: .82rem; min-width: 22px; }
@media (max-width: 1000px) { .depts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .depts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { .depts { grid-template-columns: 1fr; } }
.region + .region { margin-top: 48px; }
.region h2 { font-size: 1.35rem; }
.cherche { position: relative; max-width: 560px; margin-top: 8px; }
.cherche input { width: 100%; font: inherit; font-size: 1.05rem; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(11,31,59,.07); outline: 0; }
.cherche input:focus { border-color: var(--ink); }
.res { background: #fff; border-radius: 14px; margin-top: 8px; overflow: hidden; }
.res:not(:empty) { border: 1px solid var(--line); }
.res a { display: flex; justify-content: space-between; padding: 12px 18px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 600; }
.res a:last-child { border-bottom: 0; }
.res a:hover { background: var(--sand); }
.res small { color: var(--muted); font-weight: 400; }
.res p { margin: 0; padding: 14px 18px; color: var(--muted); }
.metiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metiers a { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; background: #fff; }
.metiers a:hover { border-color: var(--ink); }
.metiers .ic { color: var(--brand); }
@media (max-width: 900px) { .metiers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .metiers { grid-template-columns: 1fr; } }
.villes-foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.villes-foot b { color: #fff; margin: 0; display: inline; font-size: .88rem; }
.villes-foot a { display: inline; padding: 0; }

/* Blog */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.cats a { padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; }
.cats a:hover { border-color: var(--ink); }
.cats a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.post .cat, .feature .cat { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); margin-bottom: 6px; }
.posts { row-gap: 40px; }
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; align-items: center; text-decoration: none; color: inherit; }
.feature img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.feature h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.feature:hover h2 { color: var(--brand-700); }
.feature p { color: var(--muted); }
.feature .lire { display: inline-flex; align-items: center; gap: 8px; font-family: var(--titres); font-weight: 700; color: var(--brand-700); }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 20px; } }
.toc { background: var(--sand); border-radius: 16px; padding: 22px 26px; margin-bottom: 10px; }
.toc b { font-family: var(--titres); display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { padding: 3px 0; font-size: .98rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--brand-700); }
.article h2 { scroll-margin-top: 90px; }
.article h3 { margin-top: 24px; }
.encart { background: var(--ink); color: #c9d1dc; border-radius: 20px; padding: 32px; margin-top: 48px; }
.encart b { display: block; color: #fff; font-family: var(--titres); font-size: 1.3rem; margin-bottom: 6px; }
.encart p { color: #c9d1dc !important; }
.encart .finder { margin-top: 16px; }
.table { overflow-x: auto; margin: 16px 0 20px; border: 1px solid var(--line); border-radius: 14px; }
.table table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--bg); font-family: var(--titres); font-size: .86rem; }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 520px) { .table table { font-size: .84rem; } .table th, .table td { padding: 10px 8px; } }
