/* =====================================================================
   MAISON SÉQUANE · ESPACE PROS
   ---------------------------------------------------------------------
   Haut de page Maison (crème) et deux portes : collectivités (brun),
   revendeurs (noir FRELOCK). La campagne communale en univers FRELOCK,
   avec la carte des 50 pièges : le moment fort de la page. Les points
   apparaissent du bourg vers les limites quand la carte arrive à l'écran
   (transitions CSS lancées par pros.js ; tout est visible sans JavaScript,
   à l'impression ou quand les animations sont réduites). Le kit sur crème,
   son formulaire sur une carte brune ; les revendeurs en FRELOCK clair.
   Les valeurs viennent de tokens.css.
   ===================================================================== */

.pros { padding-top: 96px; }                  /* hauteur de l'en-tête fixe */

/* ── Haut de page ───────────────────────────────────────────────────── */
.pros-haut { padding-block: var(--espace-3) var(--espace-section); }
.pros-haut h1 { color: var(--titre); }
.pros-haut__chapo { max-width: 60ch; margin-top: var(--espace-2); font-size: 1.125rem; line-height: 1.6; color: var(--texte-doux); }

/* Deux portes, une par public : toute la tuile est cliquable (lien étiré). */
.pros-portes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--espace-2); margin-top: var(--espace-4); }
.pros-porte { min-height: 288px; isolation: isolate; }
.pros-porte__texte { display: grid; gap: var(--espace-1); max-width: 32ch; }
.pros-porte__texte p { color: var(--texte-doux); line-height: 1.55; }
.pros-porte__titre { font-size: var(--taille-titre-2); line-height: 1.05; color: var(--titre); }
.pros-porte--communes .pros-porte__titre { font-family: var(--police-serif); font-weight: 600; letter-spacing: -0.01em; }
.pros-porte--revendeurs .pros-porte__titre { font-family: var(--police-display); font-weight: 900; letter-spacing: -0.02em; }
.pros-porte__lien { color: inherit; text-decoration: none; }
.pros-porte__lien::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }   /* toute la tuile est le lien */
.pros-porte__lien:focus-visible { outline: none; }
.pros-porte:has(.pros-porte__lien:focus-visible) { outline: 2px solid var(--ms-brun); outline-offset: 3px; }
.pros-porte__suite { font-weight: 600; color: var(--accent); }
.pros-porte__suite svg { display: inline-block; width: 18px; height: 18px; margin-left: 8px; vertical-align: -0.22em; transition: transform var(--duree-micro-longue) var(--courbe-signature); }   /* la flèche suit le dernier mot */
.pros-porte:hover .pros-porte__suite svg,
.pros-porte:has(.pros-porte__lien:focus-visible) .pros-porte__suite svg { transform: translateX(4px); }
.pros-porte__motif { position: absolute; z-index: -1; right: 32px; bottom: 32px; width: 132px; height: auto; fill: var(--ms-or-clair); }
.pros-porte__photo { position: absolute; z-index: -1; right: -2%; bottom: -16%; width: 44%; max-width: 280px; height: auto; pointer-events: none; }
.pros-porte--revendeurs .pros-porte__texte { max-width: min(32ch, 56%); }

/* ── Collectivités : la campagne communale ──────────────────────────── */
.pros-communes__grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--espace-4); align-items: center; }
.pros-communes__texte { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--espace-2); }
.pros-communes__texte > p { max-width: 58ch; font-size: 1.0625rem; line-height: 1.65; color: var(--texte-doux); }
.pros-communes__offre {
  margin-top: var(--espace-1);
  font-family: var(--police-display);
  font-weight: 700;
  font-size: var(--taille-fl-accroche);
  letter-spacing: var(--approche-fl);
  text-transform: uppercase;
  color: var(--accent);
}

/* Listes à coches : pastille jaune, coche noire (les deux univers FRELOCK). */
.pros-liste { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pros-liste li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; line-height: 1.55; }
.pros-liste svg { width: 22px; height: 22px; margin-top: 1px; padding: 3px; border-radius: 50%; background: var(--fl-jaune); color: var(--fl-noir); }
.pros-liste a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.pros-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2) var(--espace-3); margin-top: var(--espace-1); }

/* Le plan de la commune : contour, rivière, routes, bourg, puis les 50 pièges. */
.plan-commune { display: grid; gap: var(--espace-2); margin: 0; }
.plan-commune__svg { display: block; width: 100%; height: auto; }
.plan-commune__territoire { fill: color-mix(in srgb, var(--fl-blanc) 6%, var(--fl-noir)); }
.plan-commune__riviere { fill: none; stroke: color-mix(in srgb, var(--fl-blanc) 15%, var(--fl-noir)); stroke-width: 9; stroke-linecap: round; }
.plan-commune__routes path { fill: none; stroke: color-mix(in srgb, var(--fl-blanc) 22%, transparent); stroke-width: 1.5; }
.plan-commune__bourg rect { fill: color-mix(in srgb, var(--fl-blanc) 34%, transparent); }
.plan-commune__limite { fill: none; stroke: color-mix(in srgb, var(--fl-blanc) 55%, transparent); stroke-width: 1.4; stroke-dasharray: 5 5; }
.plan-commune__piege { fill: var(--fl-jaune); transform-box: fill-box; transform-origin: center; }
.plan-commune__echelle path { fill: none; stroke: color-mix(in srgb, var(--fl-blanc) 60%, transparent); stroke-width: 1.4; }
.plan-commune__echelle text { fill: color-mix(in srgb, var(--fl-blanc) 72%, transparent); font-family: var(--police-texte); font-weight: 600; font-size: 13px; }
/* pros.js pose .plan-commune--prete (points en attente), puis .plan-commune--active quand la carte est à l'écran. */
.plan-commune--prete .plan-commune__piege { opacity: 0; transform: scale(0.2); }
.plan-commune--active .plan-commune__piege {
  opacity: 1;
  transform: scale(1);
  transition: opacity 360ms var(--courbe-signature), transform 520ms var(--courbe-signature);
  transition-delay: calc(var(--i) * 28ms);
}
html[data-mouvement="reduit"] .plan-commune__piege { opacity: 1 !important; transform: none !important; transition: none !important; }
@media print { .plan-commune__piege { opacity: 1 !important; transform: none !important; } }
.plan-commune__legende { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; align-items: baseline; max-width: 64ch; font-size: var(--taille-petit); line-height: 1.55; color: var(--texte-doux); }
.plan-commune__legende strong { color: var(--texte); font-variant-numeric: tabular-nums; }
.plan-commune__puce { width: 12px; height: 12px; border-radius: 50%; background: var(--fl-jaune); transform: translateY(1px); }

/* ── Le kit ─────────────────────────────────────────────────────────── */
.pros-kit__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: var(--espace-4) clamp(32px, 5vw, 96px); align-items: start; }
.pros-kit__texte h2 { color: var(--titre); }
.pros-kit__chapo { max-width: 52ch; margin-top: var(--espace-2); font-size: 1.125rem; line-height: 1.6; color: var(--texte-doux); }
.pros-kit__documents { display: grid; gap: var(--espace-3); margin: var(--espace-4) 0 0; padding: 0; list-style: none; }
.pros-kit__documents li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--espace-2); align-items: start; }
.pros-kit__picto { width: 44px; height: 56px; fill: var(--ms-creme-clair); stroke: var(--ms-brun); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.pros-kit__documents h3 { font-family: var(--police-serif); font-weight: 600; font-size: 1.25rem; line-height: 1.25; color: var(--titre); }
.pros-kit__documents p { max-width: 52ch; margin-top: 4px; line-height: 1.55; color: var(--texte-doux); }

.pros-kit__formulaire { display: grid; gap: var(--espace-2); padding: var(--espace-3); border-radius: var(--angle-carte); }
.pros-kit__titre-formulaire { font-family: var(--police-serif); font-weight: 600; font-size: var(--taille-titre-3); line-height: 1.2; color: var(--titre); }
.pros-kit__formulaire .formulaire { gap: var(--espace-2); }
.pros-kit__formulaire .champ__libelle { font-size: 1rem; }
.pros-kit__envoyer { justify-self: stretch; }
.pros-kit__sansjs { line-height: 1.55; }
.pros-kit__sansjs a { color: var(--ms-creme); text-underline-offset: 3px; }
.js .pros-kit__sansjs { display: none; }
html:not(.js) .pros-kit__formulaire .formulaire { display: none; }
.pros-kit__note { font-size: var(--taille-petit); line-height: 1.5; color: var(--texte-doux); }
.pros-kit__note a { color: var(--ms-creme); text-underline-offset: 3px; }
/* Case et messages sur brun : mêmes réglages que la carte du devis (devis.css). */
.pros-kit__formulaire .case { color: var(--texte); }
.pros-kit__formulaire .case input { background: transparent; border-color: color-mix(in srgb, var(--ms-creme) 72%, var(--ms-brun)); }
.pros-kit__formulaire .case input:checked { background: var(--ms-or-clair); border-color: var(--ms-or-clair); }
.pros-kit__formulaire .case input::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4 5.6 10.3 11.5 3.8' fill='none' stroke='%2335251C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.pros-kit__formulaire .case input:focus-visible { outline: 2px solid var(--ms-or-clair); outline-offset: 2px; }
.pros-kit__formulaire .champ.est-en-erreur .case input { border-color: #FFB4A6; box-shadow: 0 0 0 1px #FFB4A6; }   /* 7:1 sur brun */
.pros-kit__formulaire .turnstile { max-width: none; }
.pros-kit__formulaire .formulaire__echec { margin: 0; font-size: var(--taille-petit); font-weight: 600; line-height: 1.5; color: #FFB4A6; }
/* Confirmation : la pastille se pose, la coche se trace (sans bibliothèque). */
.pros-kit__formulaire .confirmation { padding-block: var(--espace-1); }
.pros-kit__formulaire .confirmation__cercle { transform-box: fill-box; transform-origin: center; }
.pros-kit__formulaire .confirmation__coche { stroke-dasharray: 32; }
html:not([data-mouvement="reduit"]) .pros-kit__formulaire .confirmation.est-visible .confirmation__cercle { animation: pros-cercle 520ms var(--courbe-signature) both; }
html:not([data-mouvement="reduit"]) .pros-kit__formulaire .confirmation.est-visible .confirmation__coche { animation: pros-coche 420ms var(--courbe-signature) 320ms both; }
@keyframes pros-cercle { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pros-coche { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }

/* ── Revendeurs ─────────────────────────────────────────────────────── */
.pros-revendeurs__grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--espace-4); align-items: center; }
.pros-revendeurs__visuel {
  display: grid;
  place-items: center;
  padding: var(--espace-4) var(--espace-3);
  border-radius: var(--angle-carte);
  background: color-mix(in srgb, var(--fl-noir) 5%, var(--fl-blanc));
}
.pros-revendeurs__visuel img { display: block; width: min(100%, 340px); height: auto; }
.pros-revendeurs__texte { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--espace-2); }
.pros-revendeurs__chapo { max-width: 58ch; font-size: 1.0625rem; line-height: 1.65; color: var(--texte-doux); }
.bouton--noir {   /* sur fond blanc FRELOCK */
  --bouton-fond: var(--fl-noir);
  --bouton-texte: var(--fl-blanc);
  --bouton-bord: var(--fl-noir);
  --bouton-remplissage: var(--fl-jaune);
  --bouton-texte-survol: var(--fl-noir);
}

/* ── Tablette et téléphone ──────────────────────────────────────────── */
@media (max-width: 1099px) {
  /* Tuiles plus étroites : les décors chevaucheraient le texte. La tuile se règle sur son contenu. */
  .pros-porte__motif, .pros-porte__photo { display: none; }
  .pros-porte { min-height: 0; }
  .pros-porte--revendeurs .pros-porte__texte { max-width: 32ch; }
  .pros-communes__grille, .pros-revendeurs__grille { grid-template-columns: minmax(0, 1fr); }
  .plan-commune { max-width: 720px; }
  .pros-revendeurs__texte { order: -1; }
  .pros-revendeurs__visuel { max-width: 720px; }
}
@media (max-width: 899px) {
  .pros-kit__grille { grid-template-columns: minmax(0, 1fr); }
  .pros-kit__formulaire { max-width: 560px; }
}
@media (max-width: 699px) {
  .pros-portes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .pros-porte--revendeurs .pros-porte__texte { max-width: none; }
  .pros-actions .bouton { white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; }
  .pros-actions .bouton__texte { text-wrap: balance; }
  .pros-kit__formulaire { padding: var(--espace-3) var(--espace-2); }
  .pros-revendeurs__visuel { padding: var(--espace-3) var(--espace-2); }
}
