/* ===========================================
    SÉLECTION SERVICES - CHECKBOXES STYLISÉES
    =========================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}
/* ── REGROUPEMENT PAR METIER ──────────────────────────────────────────
   Treize cases a cocher de deux metiers melanges ne se lisent pas. Un
   intitule de metier ouvre donc chaque serie, sur toute la largeur de la
   grille.

   MONO-METIER : le conteneur passe en `display: contents`, les cases
   redeviennent enfants directs de la grille, et le formulaire est celui
   d'avant — c'est la condition pour deployer sur le parc.

   LA COULEUR : rampe entre les deux couleurs de marque, posee en ligne par le
   PHP (`--m-melange`). Aucune couleur en dur, aucune variable ajoutee. */
.services-grid__metier-bloc {
  --m-couleur: color-mix(in oklab, var(--primary), var(--secondary) var(--m-melange, 0%));
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.services-grid__metier {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--m-couleur);
}
/* Le filet prolonge l'intitule jusqu'au bord : la coupure se voit sans
   qu'aucun cadre n'alourdisse le formulaire. */
.services-grid__metier::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--m-couleur) 30%, transparent);
}
/* Apres la regle de base : meme specificite, c'est l'ordre qui tranche. */
.services-grid__metier-bloc--nu {
  display: contents;
}

.service-checkbox {
  position: relative;
}
.service-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.service-checkbox label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white-transparent);
  border: 2px solid var(--gray-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}
.service-checkbox label:hover {
  border-color: color-mix(in srgb, var(--secondary) 45%, transparent);
  background: color-mix(in srgb, var(--gray-light) 55%, var(--white));
}
.service-checkbox input:checked + label {
  border-color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 10%, transparent);
}
.service-checkbox input:focus-visible + label {
  outline: 3px solid color-mix(in srgb, var(--secondary) 60%, transparent);
  outline-offset: 2px;
}
.service-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.service-checkbox input:checked + label .service-icon {
  background: var(--primary);
  border-color: var(--primary);
}
.service-icon svg {
  width: 20px;
  height: 20px;
  color: var(--gray-dark);
  transition: color 0.3s ease;
}
.service-checkbox input:checked + label .service-icon svg {
  color: var(--white);
}
.service-info {
  flex: 1;
}
.service-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-dark);
  display: block;
}
.service-check {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 2px solid var(--gray-light);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.service-checkbox input:checked + label .service-check {
  background: var(--primary);
  border-color: var(--primary);
}
.service-check svg {
  width: 14px;
  height: 14px;
  color: var(--white);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}
.service-checkbox input:checked + label .service-check svg {
  opacity: 1;
  transform: scale(1);
}

[data-contact] .contact-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--black);
  mix-blend-mode: normal;
  opacity: 0.8;
}
[data-contact] .bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 640px) {
  .services-grid,
  .services-grid__metier-bloc {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* ============================================
   OPTION DE FORMULAIRE (hors catalogue de services)
   ============================================ */

/* Se coche comme un service, mais se distingue visuellement : ce n'est pas une
   prestation du catalogue, c'est une offre proposée dans le formulaire. */
.service-checkbox--option label {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}

.service-checkbox--option label:hover {
  border-color: var(--primary);
}

.service-checkbox--option input:checked + label {
  border-style: solid;
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

.service-checkbox--option input:checked + label .service-check {
  background: var(--primary);
  color: var(--on-primary);
}
