/**
 * Pages publiques marketing (territoires, recrutement, espace pro, landings)
 * — alignées homepage / maquette.
 */

/* —— Boutons (partagés home / landings) —— */
.ms-public .btn,
.ms-landing-page .btn,
.ms-btn-row .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.ms-public .btn-accent,
.ms-landing-page .btn-accent,
.ms-btn-row .btn-accent {
  background: var(--action, #FF4D2E);
  color: #fff;
  border-color: var(--action, #FF4D2E);
}
.ms-public .btn-accent:hover,
.ms-landing-page .btn-accent:hover {
  background: var(--action-hover, #E03D20);
  color: #fff;
}
.ms-public .btn-ghost,
.ms-landing-page .btn-ghost,
.ms-btn-row .btn-ghost {
  background: transparent;
  border-color: var(--border, #D0E4E2);
  color: var(--night, #0A3D4A);
}
.ms-public .btn-ghost:hover,
.ms-landing-page .btn-ghost:hover {
  border-color: var(--brand, #0E9A96);
  color: var(--brand, #0E9A96);
}
.ms-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* —— Typo / sections (même langage que home) —— */
.ms-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #0E9A96);
  margin: 0 0 0.5rem;
}
.ms-lead {
  font-size: 1.1rem;
  max-width: 48ch;
  color: var(--muted, #5C6B76);
  margin: 0 0 1rem;
}
.ms-landing-page h1,
.ms-public-page-intro h1 {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.75rem, 3.5vw, 2.45rem);
  letter-spacing: -0.02em;
  color: var(--night, #0A3D4A);
  margin: 0 0 0.65rem;
  max-width: 18ch;
}
.ms-section { padding: 3.5rem 0; }
.ms-section-warm { background: var(--bg-warm, #FFF8EE); }
.ms-section-soft { background: rgba(14, 154, 150, 0.06); }
.ms-section-header { text-align: center; max-width: 40rem; margin: 0 auto 2rem; }
.ms-section-header h2 {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0.35rem 0 0.5rem;
  color: var(--night, #0A3D4A);
}
.ms-section-header .ms-lead { margin-inline: auto; }
.ms-alert-info {
  max-width: 720px;
  margin: 1rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: rgba(14, 154, 150, 0.1);
  border: 1px solid rgba(14, 154, 150, 0.28);
  color: var(--night, #0A3D4A);
  font-size: 0.95rem;
}
.ms-alert-info strong { display: block; margin-bottom: 0.25rem; }
.ms-breadcrumb { font-size: 0.9rem; margin: 0 0 1rem; }
.ms-breadcrumb a { color: var(--brand, #0E9A96); font-weight: 650; text-decoration: none; }

/* —— Intro pages listing —— */
.ms-public-page-intro {
  padding: 2.5rem 0 1rem;
}
.ms-public-page-intro .ms-container,
.ms-landing-page .ms-container {
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}

/* —— Grille territoires (maquette) —— */
.ms-territory-listing {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 2rem;
  max-width: 900px;
}
@media (min-width: 560px) {
  .ms-territory-listing { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .ms-territory-listing { grid-template-columns: repeat(3, 1fr); }
}
a.ms-territory-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--border, #D0E4E2);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
a.ms-territory-tile:hover {
  border-color: var(--brand, #0E9A96);
  box-shadow: 0 12px 40px rgba(10, 61, 74, 0.1);
  color: inherit;
}
.ms-territory-tile-thumb {
  aspect-ratio: 16 / 9;
  background: var(--night, #0A3D4A);
  overflow: hidden;
}
.ms-territory-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-territory-tile-body {
  padding: 0.85rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.ms-territory-tile-body strong { font-size: 0.95rem; color: var(--night, #0A3D4A); }
.ms-territory-tile-body span { font-size: 12px; color: var(--muted, #5C6B76); }
.ms-territory-tile.is-soon { opacity: 0.72; }

/* —— Fiche territoire (maquette territory-hero + blocks) —— */
.ms-territory-hero {
  position: relative;
  padding: 2.5rem 0 2rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(245, 197, 24, 0.2), transparent 50%),
    linear-gradient(160deg, var(--night, #0A3D4A) 0%, var(--night-soft, #125A66) 55%, #0E9A96 120%);
}
.ms-territory-hero.has-media {
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  background: var(--night, #0A3D4A);
  padding-top: 4.5rem;
  padding-bottom: 2.25rem;
}
.ms-territory-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.ms-territory-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-territory-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(10, 61, 74, 0.82) 0%, rgba(14, 154, 150, 0.4) 60%, rgba(10, 61, 74, 0.3) 100%);
  pointer-events: none;
}
.ms-territory-hero .ms-container {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100% - 40px));
  margin-inline: auto;
}
.ms-territory-hero .ms-eyebrow,
.ms-territory-hero .ms-territory-status {
  color: var(--action, #FF4D2E);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 700;
}
.ms-territory-hero h1 {
  color: #fff;
  max-width: 16ch;
  margin: 0.5rem 0;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}
.ms-territory-hero .ms-lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 42ch;
  margin: 0;
}
.ms-territory-hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}
.ms-territory-hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}
.ms-territory-blocks {
  display: grid;
  gap: 1rem;
  max-width: 900px;
}
@media (min-width: 768px) {
  .ms-territory-blocks { grid-template-columns: 1fr 1fr; }
}
.ms-territory-blocks .ms-surface {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #D0E4E2);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 1px 2px rgba(10, 61, 74, 0.05);
}
.ms-territory-blocks .ms-surface.is-wide {
  grid-column: 1 / -1;
}
.ms-territory-blocks h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--night, #0A3D4A);
}
.ms-territory-blocks p {
  margin: 0;
  font-size: 14px;
  color: var(--muted, #5C6B76);
  line-height: 1.45;
}

/* —— Recrutement offres (maquette D-055) —— */
.ms-job-offers {
  display: grid;
  gap: 1rem;
  max-width: 720px;
}
.ms-job-offer {
  padding: 1.35rem 1.4rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #D0E4E2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.ms-job-offer h3 {
  margin: 0 0 0.35rem;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--night, #0A3D4A);
}
.ms-job-offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin: 0 0 0.75rem;
  font-size: 13px;
  color: var(--muted, #5C6B76);
}
.ms-job-badge {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(14, 154, 150, 0.12);
  color: var(--brand, #0E9A96);
}
.ms-job-offer p {
  margin: 0 0 1rem;
  font-size: 14px;
  color: var(--muted, #5C6B76);
  line-height: 1.45;
}
.ms-job-offer .btn { width: auto; }
.ms-job-empty {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #D0E4E2);
  border-radius: 16px;
}
.ms-job-empty h3 {
  margin: 0 0 0.5rem;
  font-family: inherit;
  font-size: 1.1rem;
  color: var(--night, #0A3D4A);
}
.ms-job-empty p {
  margin: 0 0 1.15rem;
  font-size: 14px;
  color: var(--muted, #5C6B76);
}
.ms-public .btn-secondary,
.ms-landing-page .btn-secondary {
  background: #fff;
  border: 1.5px solid var(--border, #D0E4E2);
  color: var(--night, #0A3D4A);
}
.ms-public .btn-secondary:hover,
.ms-landing-page .btn-secondary:hover {
  border-color: var(--brand, #0E9A96);
  color: var(--brand, #0E9A96);
}
.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  width: auto;
}

/* —— Landing hero (espace pro) —— */
.ms-landing-hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  color: #fff;
  background: var(--night, #0A3D4A);
  overflow: hidden;
  isolation: isolate;
}
.ms-landing-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.ms-landing-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-landing-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10, 61, 74, 0.82) 0%, rgba(10, 61, 74, 0.45) 48%, rgba(10, 61, 74, 0.55) 100%);
  pointer-events: none;
}
.ms-landing-hero .ms-container { position: relative; z-index: 1; }
.ms-landing-hero .ms-eyebrow { color: var(--sun, #F5C518); }
.ms-landing-hero h1 {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  max-width: 16ch;
  margin: 0 0 0.75rem;
  color: #fff;
}
.ms-landing-hero .ms-lead { color: rgba(255, 255, 255, 0.88); }
.ms-landing-hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}
.ms-landing-hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* —— Benefits / dual join —— */
.ms-benefit-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 800px) {
  .ms-benefit-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.ms-benefit-card {
  background: #fff;
  border: 1px solid var(--border, #D0E4E2);
  border-radius: 16px;
  padding: 1.25rem;
}
.ms-benefit-ico {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  background: linear-gradient(145deg, #14B8B2, var(--brand, #0E9A96));
}
.ms-benefit-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.ms-benefit-card p { margin: 0; font-size: 14px; color: var(--muted, #5C6B76); }

.ms-feature-split {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
@media (min-width: 860px) {
  .ms-feature-split { grid-template-columns: 1.05fr 1fr; }
  .ms-feature-split.is-flip { grid-template-columns: 1fr 1.05fr; }
  .ms-feature-split.is-flip .ms-feature-media { order: 2; }
}
.ms-feature-media {
  border-radius: 20px;
  overflow: hidden;
  background: var(--night, #0A3D4A);
  aspect-ratio: 4 / 3;
}
.ms-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-feature-copy h2 {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin: 0.35rem 0 0.75rem;
  color: var(--night, #0A3D4A);
}
.ms-platform-list {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--muted, #5C6B76);
}
.ms-platform-list li { margin: 0.35rem 0; }

.ms-pro-dual {
  display: grid;
  gap: 1.15rem;
}
@media (min-width: 800px) {
  .ms-pro-dual { grid-template-columns: 1fr 1fr; }
}
a.ms-pro-join {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1.5px solid var(--border, #D0E4E2);
  border-radius: 20px;
  padding: 1.35rem 1.4rem 1.5rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
a.ms-pro-join:hover {
  border-color: var(--brand, #0E9A96);
  box-shadow: 0 12px 40px rgba(10, 61, 74, 0.1);
  color: inherit;
}
.ms-pro-join .ms-gate-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #0E9A96);
  margin-bottom: 0.45rem;
}
.ms-pro-join h3 { margin: 0 0 0.45rem; font-size: 1.2rem; color: var(--night, #0A3D4A); }
.ms-pro-join p { margin: 0 0 0.85rem; font-size: 14px; color: var(--muted, #5C6B76); }
.ms-pro-join .ms-gate-cta { font-weight: 650; color: var(--action, #FF4D2E); font-size: 14px; }

.ms-reg-grid {
  display: grid;
  gap: 1rem;
  max-width: 860px;
  margin-inline: auto;
}
@media (min-width: 700px) {
  .ms-reg-grid { grid-template-columns: 1fr 1fr; }
}
.ms-reg-item {
  background: #fff;
  border: 1px solid var(--border, #D0E4E2);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
.ms-reg-item h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.ms-reg-item p { margin: 0; font-size: 14px; color: var(--muted, #5C6B76); }

.ms-cta-warm {
  padding: 3.5rem 0;
  background: var(--bg-warm, #FFF8EE);
  text-align: center;
}
.ms-cta-warm h2 {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0.5rem auto 0.65rem;
  max-width: 22ch;
  color: var(--night, #0A3D4A);
}
.ms-cta-warm > .ms-container > p {
  color: var(--muted, #5C6B76);
  max-width: 40ch;
  margin: 0 auto 1.35rem;
}
.ms-pro-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #0E9A96);
}

.ms-abo-whisper {
  margin-top: 1.75rem;
  max-width: 52ch;
  margin-inline: auto;
  text-align: center;
  font-size: 14px;
  color: var(--muted, #5C6B76);
}
.ms-abo-whisper a { color: var(--brand, #0E9A96); font-weight: 650; }

/* —— Header overlay (home + landing hero) —— */
body.ms-public-bleed .ms-main { padding: 0; }
.ms-site-header.is-on-hero {
  background: rgba(10, 61, 74, 0.42);
  backdrop-filter: blur(16px);
  border-bottom-color: transparent;
}
.ms-site-header.is-on-hero .ms-nav-public a,
.ms-site-header.is-on-hero .ms-nav-links a,
.ms-site-header.is-on-hero .ms-brand { color: #fff; }
.ms-site-header.is-on-hero .ms-nav-public a,
.ms-site-header.is-on-hero .ms-nav-links a { opacity: 0.85; }
.ms-site-header.is-on-hero .ms-nav-public a:hover,
.ms-site-header.is-on-hero .ms-nav-public a.is-active,
.ms-site-header.is-on-hero .ms-nav-links a:hover,
.ms-site-header.is-on-hero .ms-nav-links a.is-active {
  opacity: 1;
  color: #fff;
}
/* En mobile, le panneau ouvert a son propre fond : ne pas forcer le blanc hors media query
   (les règles @media du template.css gèrent is-on-hero .ms-nav-public) */
.ms-site-header.is-on-hero .ms-btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}
.ms-site-header.is-on-hero .ms-chip-territoire {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.ms-site-header.is-on-hero .ms-chip-territoire-kicker { color: rgba(255, 255, 255, 0.7); }
.ms-site-header.is-on-hero .ms-chip-territoire-icon { color: #fff; }
/* Logo : blanc sur hero sombre, couleur sur header solide (scroll) */
.ms-site-header .ms-logo-on-dark { display: none; }
.ms-site-header .ms-logo-on-light { display: block; }
.ms-site-header.is-on-hero .ms-logo-on-light { display: none; }
.ms-site-header.is-on-hero .ms-logo-on-dark { display: block; }

.ms-nav-public a.is-active,
.ms-nav-links a.is-active {
  opacity: 1;
  color: var(--brand, #0E9A96);
}
.ms-site-header.is-on-hero .ms-nav-public a.is-active,
.ms-site-header.is-on-hero .ms-nav-links a.is-active { color: #fff; }

@media (max-width: 720px) {
  .ms-public-page-intro { padding-top: 1.5rem; }
  .ms-landing-hero { padding: 2.5rem 0 2rem; }
  .ms-landing-hero h1 { max-width: none; }
}
