/* Proposition 2 du 27.11.2026 pour les sites du générateur (feuille posée après site.css et après le visuel du 25.11).
   Haut de page clair avec les photos à droite, sans voile, bandes de la couleur de la société, boutons en couleur d’accent.
   Vert pour Entreprise du Bâtiment MS SA (body.eb), bleu marine et or pour MS Contractor SA (body.msc). */
:root{--p2-main:#2d4a14;--p2-main-line:#4a6b2a;--p2-gold:#95c11f;--p2-gold-ink:#4d6b0f;--p2-ink:#0f172a;--p2-muted:#475569;--p2-line:#e2e8f0;--p2-grey:#f1f5f9}
body.msc{--p2-main:#1c2f5c;--p2-main-line:#3d5287;--p2-gold:#d4af37;--p2-gold-ink:#8a6d12}
/* Le visuel du 25.11 reste chargé mais ne s’applique plus. */
html.msv-gen{--msv-actif:non}

body{color:var(--p2-ink);background:#fff}
a{color:var(--p2-main)}
h1,h2{color:var(--p2-main)}
h2{font-weight:800;letter-spacing:-.01em}

/* Barre du haut et en-tête */
.topbar{background:var(--p2-main);color:#fff}
.haut{background:#fff;border-bottom:1px solid var(--p2-line)}
.menu a:hover{color:var(--p2-main)}
.burger{border-radius:0;border-color:var(--p2-line)}

/* Boutons */
.btn{background:var(--p2-gold);color:#020617!important;border-radius:0;min-height:48px;display:inline-flex;align-items:center;justify-content:center;text-align:center}
.btn:hover{filter:brightness(1.06)}
.btn.petit{background:var(--p2-main);color:#fff!important;min-height:40px}
.btn.clair{background:#fff;color:var(--p2-main)!important;border:1px solid var(--p2-main)}

/* Haut de page */
.hero{background:#fff;border-bottom:0;padding:56px 0 48px}
.hero.petit{padding:36px 0 40px}
.slogan{color:var(--p2-gold-ink);font-weight:700;margin-bottom:10px}
.hero h1{color:var(--p2-main);font-weight:800;font-size:clamp(30px,4.2vw,50px);line-height:1.08;letter-spacing:-.02em}
.hero.petit h1{font-size:clamp(28px,3.4vw,42px)}
.intro{color:#334155}
.p2-grille{display:grid;grid-template-columns:minmax(0,46fr) minmax(0,54fr);gap:40px 48px;align-items:center}
.p2-txt .intro{max-width:none}
.p2-ph{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,240px);gap:12px;margin:0}
.p2-ph img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;background:var(--p2-grey)}
.p2-ph img:first-child{grid-row:span 2}
.p2-ph.p2-n1{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
.p2-ph.p2-n1 img{grid-row:auto;height:auto;aspect-ratio:4/3}
.p2-ph.p2-n2 img{grid-row:span 2}

/* Textes */
.bloc h2{color:var(--p2-main)}
.liste li::marker{color:var(--p2-gold-ink)}
.fil ol{color:var(--p2-muted)}
.fil a{color:var(--p2-main)}

/* Métiers : cartes carrées, photo au-dessus quand une photo du métier existe */
.metiers{background:var(--p2-grey);padding:48px 0}
.metiers h2{color:var(--p2-main)}
.cartes{gap:20px}
.cartes a{border-radius:0;border:1px solid var(--p2-line);border-top:4px solid var(--p2-main);overflow:hidden}
.cartes a:hover{border-color:var(--p2-main)}
.cartes .p2-ph-carte a{border-top-width:1px;border-top-color:var(--p2-line)}
.cartes .p2-ph-carte a:hover{border-color:var(--p2-main)}
.cartes a img{display:block;width:calc(100% + 32px);max-width:none;height:auto;aspect-ratio:3/2;object-fit:cover;margin:-16px -16px 14px}
.cartes .n{color:var(--p2-main);font-size:18px}
.liens a{border-radius:0;border-color:var(--p2-line);color:var(--p2-main);font-weight:600}
.liens a:hover{border-color:var(--p2-main)}

/* Questions fréquentes */
.faq details{border-radius:0;border-color:var(--p2-line)}
.faq summary{color:var(--p2-ink)}

/* Demande de devis */
.devis{background:var(--p2-main)}
.devis h2{color:#fff}
.devis p{color:#e2e8f0}
.devis .btn{background:var(--p2-gold);color:#020617!important}
.champ input,.champ select,.champ textarea{border-radius:0}
.champ label{color:#fff}

/* Pied de page */
.pied{background:var(--p2-main);color:#e2e8f0;border-top:3px solid var(--p2-gold)}
.pied .nom{color:#fff}
.pied a{color:#fff}
.ms-departements{border-top-color:var(--p2-main-line)}
.ms-departements p{color:#fff}
.ms-departements .ms-soeur{color:#e2e8f0}

/* Tablette et téléphone : les photos d’abord, le texte ensuite */
@media (max-width:900px){
  .p2-grille{grid-template-columns:minmax(0,1fr);gap:20px}
  .p2-ph{order:-1;grid-template-rows:repeat(2,150px);gap:8px}
  .p2-ph.p2-n1{grid-template-rows:auto}
  .hero{padding:20px 0 32px}
  .hero.petit{padding:16px 0 28px}
}
@media (max-width:560px){
  .hero .actions .btn{width:100%}
}

/* Équilibre du 27.11.2026 (avis Fable) : titres plus mesurés que le logo, le menu et les photos, photos calées en haut. */
main h1{font-size:clamp(1.625rem,1.2rem + 1.6vw,2.375rem);line-height:1.15;letter-spacing:-.015em;text-wrap:balance;overflow-wrap:break-word}
.hero h1{font-size:clamp(1.75rem,1.2rem + 2.2vw,2.75rem);line-height:1.12;font-weight:700;letter-spacing:-.015em;text-wrap:balance;overflow-wrap:break-word}
.hero.petit h1{font-size:clamp(1.625rem,1.2rem + 1.6vw,2.375rem);line-height:1.15}
main h2{font-size:clamp(1.375rem,1.15rem + .9vw,1.875rem);line-height:1.2;text-wrap:balance}
.p2-grille{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);align-items:start;gap:32px clamp(32px,4vw,64px)}
@media (max-width:1023px){
  .p2-grille{grid-template-columns:minmax(0,1fr);gap:20px}
  .p2-ph{order:-1;grid-template-rows:repeat(2,210px);gap:10px}
  .p2-ph.p2-n1{grid-template-rows:auto}
}
@media (max-width:600px){.p2-ph{grid-template-rows:repeat(2,150px);gap:8px}}
/* Contrôle du 27.11.2026 : logo jamais écrasé, menu repliable jusqu’à 1023 px pour garder un en-tête sur une ligne. */
.marque,.marque img{flex-shrink:0}
.marque img{width:auto;max-width:none}
.menu{min-width:0}
@media (max-width:1023px){
  .burger{display:block}
  .menu{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid var(--p2-line);flex-direction:column;align-items:flex-start;padding:12px 20px 18px;z-index:6}
  .menu.ouvert{display:flex}
  .haut .w{position:relative}
}
/* 27.11.2026 : deux photos en haut de page, cote a cote, format d origine sans recadrage. */
.p2-ph.p2-n2{display:flex;gap:12px;align-items:flex-start}
.p2-ph.p2-n2 img{flex-basis:0;flex-shrink:1;min-width:0;width:auto;height:auto;grid-row:auto}
@media (max-width:600px){.p2-ph.p2-n2{gap:8px}}
/* V2027.4 P1 28.11.2026 premier ecran mobile, titre et boutons avant la mosaique */ @media (max-width:767px){main .hero.p2h .p2-grille>.p2-txt:not(#p2z):not(#p2y){display:contents!important}main .hero.p2h .p2-grille>.p2-txt>*:not(#p2z):not(#p2y){grid-column:1!important;order:5!important;min-width:0!important;margin:0!important}main .hero.p2h .p2-grille>.p2-txt>.slogan:not(#p2z):not(#p2y){order:1!important}main .hero.p2h .p2-grille>.p2-txt>h1:not(#p2z):not(#p2y){order:2!important}main .hero.p2h .p2-grille>.p2-txt>.actions:not(#p2z):not(#p2y){order:3!important}main .hero.p2h .p2-grille>.p2-ph:not(#p2z):not(#p2y){grid-column:1!important;grid-row:auto!important;order:4!important}}

/* Téléphone, 28.11.2026. Couleurs exactes de la charte, puis mise en page des petits écrans.
   Vert Entreprise du Bâtiment MS SA (body.eb), bleu marine et or MS Contractor SA (body.msc). Les photos ne sont jamais recadrées dans leur fichier. */
:root{--p2-main:#2C4913;--p2-gold:#94C01E}
body.msc{--p2-main:#1B2E5B;--p2-gold:#D3AE36}

@media (max-width:600px){
  /* Bandeau du haut sur une ou deux lignes, téléphone toujours visible à droite */
  .topbar .w{flex-wrap:nowrap;align-items:center;gap:12px;padding-top:6px;padding-bottom:6px}
  .topbar .w > span{font-size:12px;line-height:1.3;opacity:.92}
  .topbar a{flex:none;white-space:nowrap;font-size:14px;padding:6px 0}

  /* Bouton Menu lisible avec son icône */
  .burger{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:10px 14px;border:1px solid var(--p2-main);color:var(--p2-main);background:#fff;font-weight:700;font-size:16px}
  .burger::before{content:"";width:18px;height:12px;flex:none;border-top:2px solid currentColor;border-bottom:2px solid currentColor;background:linear-gradient(currentColor,currentColor) center/100% 2px no-repeat}
  .menu a{display:block;width:100%;padding:12px 0;font-size:17px;border-bottom:1px solid var(--p2-line)}
  .menu .btn.petit{margin-top:14px;width:100%;border-bottom:0;min-height:50px}

  /* Haut de page : titre, puis les deux boutons, puis le texte d'introduction */
  .p2-txt{display:flex;flex-direction:column}
  .p2-txt .slogan{order:0}
  .p2-txt h1{order:1}
  .p2-txt .actions{order:2;margin:4px 0 18px;gap:10px}
  .p2-txt .intro{order:3}
  .hero .actions .btn{width:100%;min-height:52px}

  /* Accueil : les métiers juste après le haut de page, le texte détaillé ensuite */
  main:has(> .hero:not(.petit)){display:flex;flex-direction:column}
  main:has(> .hero:not(.petit)) > *{order:3}
  main:has(> .hero:not(.petit)) > .fil{order:0}
  main:has(> .hero:not(.petit)) > .hero{order:1}
  main:has(> .hero:not(.petit)) > .metiers{order:2;margin-top:0}
  main:has(> .hero:not(.petit)) > .devis{order:9}
  main:has(> .hero:not(.petit)) > .w{width:100%}

  /* Tuiles des métiers sur deux colonnes, celles avec photo d'abord */
  .metiers{padding:32px 0}
  .cartes{grid-template-columns:1fr 1fr;gap:12px;align-items:stretch}
  .cartes li:has(img){order:1}
  .cartes li:not(:has(img)){order:2}
  .cartes a{padding:0;display:flex;flex-direction:column}
  .cartes a img{width:100%;margin:0;aspect-ratio:4/3}
  .cartes .n{padding:10px 12px 12px;margin:0;font-size:16px;line-height:1.25}
  .cartes .d{display:none}
  .cartes li:not(:has(img)) a{justify-content:center;min-height:64px}

  /* Texte détaillé, rythme plus net */
  .bloc{margin:0;padding:26px 0;border-top:1px solid var(--p2-line)}
  .texte > .bloc:first-child{border-top:0}
  .bloc h2{margin-bottom:12px}
  .liste li{margin:8px 0}

  /* Questions fréquentes, signe plus ou moins à droite */
  .faq summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:48px}
  .faq summary::-webkit-details-marker{display:none}
  .faq summary::after{content:"+";flex:none;font-size:24px;line-height:1;color:var(--p2-main)}
  .faq details[open] summary::after{content:"\2212"}

  /* Demande de devis : les champs utiles d'abord, envoi en pleine largeur */
  .devis{padding:36px 0}
  .grille{display:flex;flex-direction:column;gap:14px}
  .champ:has(#f-name){order:1}
  .champ:has(#f-phone){order:2}
  .champ:has(#f-commune){order:3}
  .champ:has(#f-message){order:4}
  .champ:has(#f-email){order:5}
  .champ:has(#f-service){order:6}
  .champ:has(#f-attachments){order:7}
  .champ:has(#f-adresse),.champ:has(#f-npa),.champ:has(#f-bien),.champ:has(#f-periode),.champ:has(#f-photos){display:none}
  .champ input,.champ select,.champ textarea{min-height:50px}
  .champ textarea{min-height:130px}
  .champ input[type=file]{min-height:0;padding:10px;background:#fff}
  .champ input[type=file]::file-selector-button{margin-right:12px;padding:9px 14px;border:1px solid var(--p2-main);background:#fff;color:var(--p2-main);font:inherit;font-weight:700}
  .devis .btn{display:flex;width:100%;min-height:54px}

  /* Pied de page, liens espacés pour le doigt */
  .pied{padding-top:28px}
  .pied li{margin:0}
  .pied li a,.ms-departements a{display:inline-block;padding:8px 0;text-decoration:none}
  .pied .nom{margin-top:18px;font-size:16px}
  .ms-departements ul{display:block}
}

/* Téléphone, 28.11.2026 soir : photos du haut d'abord, sur une ligne, toutes à la même hauteur, format d'origine sans recadrage (--f posé par le générateur). */
@media (max-width:600px){
  main .hero.p2h .p2-grille > .p2-ph:not(#p2z):not(#p2y):not(#t28){order:0 !important;display:flex !important;gap:6px !important;height:auto !important;grid-template-rows:none !important;align-items:flex-start !important;margin:0 0 4px !important}
  main .hero.p2h .p2-grille > .p2-ph:not(#p2z):not(#p2y):not(#t28) img{flex:var(--f,1) 1 0 !important;width:0 !important;min-width:0 !important;height:auto !important;max-width:none !important;aspect-ratio:var(--f,auto) !important;object-fit:fill !important;grid-row:auto !important}
}

/* 28.11.2026 style telephone sur le modele ms-contractor.ch (Fable, controle Opus) */
@media (max-width:600px){
  html body:not(#f1):not(#f2):not(#f3):not(#f4), html body:not(#f1):not(#f2):not(#f3):not(#f4) *{font-family:"Inter","MSV Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) h1{font-size:28px!important;line-height:1.12!important;font-weight:700!important;letter-spacing:-.015em!important;text-transform:none!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) h2{font-size:22px!important;line-height:1.2!important;font-weight:800!important;letter-spacing:-.01em!important;text-transform:none!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) h3{font-size:18px!important;line-height:1.3!important;font-weight:700!important;letter-spacing:normal!important;text-transform:none!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .btn,
  html body:not(#f1):not(#f2):not(#f3):not(#f4) a[class*="btn"],
  html body:not(#f1):not(#f2):not(#f3):not(#f4) button.burger,
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form button,
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form input[type="submit"]{border-radius:0!important;min-height:50px!important;font-size:15px!important;font-weight:700!important;line-height:1.3!important;letter-spacing:normal!important;text-transform:none!important;box-shadow:none!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) button.burger{min-height:44px!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .hero .slogan{font-size:15px!important;line-height:1.4!important;font-weight:700!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .hero .intro{font-size:16px!important;line-height:1.6!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) main p{line-height:1.65!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .cartes .n{font-size:15px!important;line-height:1.3!important;font-weight:700!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="file"]),
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form select,
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form textarea{border-radius:0!important;font-size:16px!important;min-height:50px!important;box-shadow:none!important;font-weight:400!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) form label{font-size:14px!important;font-weight:600!important;letter-spacing:normal!important;text-transform:none!important}
}
@media (max-width:600px) and (max-height:700px){
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .hero .p2-ph.p2-n1{height:auto!important;min-height:0!important}
  html body:not(#f1):not(#f2):not(#f3):not(#f4) .hero .p2-ph.p2-n1 img{height:200px!important;width:auto!important;max-width:100%!important;flex:0 0 auto!important}
}

/* 28.11.2026 suite recette 039 : police Inter servie par le site, bouton de secours du formulaire cache tant qu'il porte hidden */
@font-face{font-family:"MSV Inter";src:url(/assets/msv/polices/inter-400-latin.woff2) format("woff2");font-weight:300 500;font-style:normal;font-display:swap}
@font-face{font-family:"MSV Inter";src:url(/assets/msv/polices/inter-700-latin.woff2) format("woff2");font-weight:600 700;font-style:normal;font-display:swap}
@font-face{font-family:"MSV Inter";src:url(/assets/msv/polices/inter-900-latin.woff2) format("woff2");font-weight:800 900;font-style:normal;font-display:swap}
form [hidden]{display:none!important}
