/*
 * Inscription MyCLIPSO (surcharges com_users/registration) : formulaire en trois étapes et confirmation.
 * Le cadre du site (textile, en-tête, menu, champs façon iOS, boutons) vient de user.css ;
 * ici, seulement ce qui est propre à cette page. La mise en page suit la largeur disponible (container queries).
 */

/* Page : menu « MyCLIPSO Compte » à gauche comme ailleurs, contenu directement sur le textile */

body.site.page-inscription main {
  padding: 0;
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

body.page-inscription #system-message-container {
  width: 100%;
  max-width: 812px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Titre de page */

.ci {
  container-type: inline-size;
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 0 0;
  font-size: 15px;
}

.ci-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.ci .ci-surtitre {
  margin: 0 0 4px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mc-encre);
  gap: 8px;
}

.ci .ci-titre {
  margin: 0;
  max-width: 860px;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.ci .ci-sous-titre {
  margin: 0;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.4;
  color: var(--mc-texte);
}

.ci .ci-delai {
  margin: 0;
  font-size: 15px;
  color: var(--mc-texte);
}

/* Carte du formulaire */

.ci-carte {
  box-sizing: border-box;
  max-width: 780px;
  margin: 40px auto 0;
  padding: 36px 40px 32px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 32px;
  background: var(--mc-carte);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow: var(--mc-ombre-carte);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Étapes : contrôle segmenté */

.ci-segments {
  align-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.12);
}

.ci .ci-segment {
  height: 40px;
  margin: 0;
  padding: 0 18px 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #48484a;
  cursor: pointer;
}

.ci .ci-segment[aria-current="step"] {
  background: #fff;
  color: var(--mc-encre);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ci-segment-num {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border: 1.5px solid #8e8e93;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.ci-segment[aria-current="step"] .ci-segment-num {
  border-color: var(--mc-rouge);
  background: var(--mc-rouge);
  color: #fff;
}

.ci-segment.ci-fait .ci-segment-num {
  border-color: var(--mc-encre);
  background: var(--mc-encre) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  color: transparent;
}

.ci-etape {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ci-carte.ci-js .ci-etape:not(.ci-etape--courante) {
  display: none;
}

/* Un legend n'est pas un élément flex : son espacement est une marge */
.ci .ci-etape-titre {
  float: none;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mc-encre);
}

.ci-grille {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ci-grille .control-group {
  margin: 0;
}

.ci-large {
  grid-column: 1 / -1;
}

/* Mot de passe : les exigences de Joomla restent pour les lecteurs d'écran, la liste les montre */

.ci .ci-champ--password1 [id$="-rules"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ci .password-group > meter,
.ci .password-group > .text-center {
  display: none;
}

.ci-force {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: -4px;
}

.ci-force span {
  height: 6px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.18);
  transition: background-color 0.2s;
}

.ci-force[data-niveau="faible"] span.on {
  background: var(--mc-rouge);
}

.ci-force[data-niveau="moyen"] span.on {
  background: #ff9f0a;
}

.ci-force[data-niveau="ok"] span.on {
  background: var(--mc-vert);
}

.ci-regles {
  list-style: none;
  margin: -6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ci-regles li {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mc-remplissage);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #48484a;
}

.ci-regles li.ok {
  background: rgba(52, 199, 89, 0.16);
  color: #1b6e33;
}

.ci-regles li.ok::before {
  content: "";
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231b6e33' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* « Vous êtes ? » : cartes avec icône */

.ci .ci-champ--type .control-label {
  width: auto;
  margin: 4px 0 10px 4px;
}

.ci .ci-champ--type .control-label label {
  font-size: 15px;
}

.ci-champ--type fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ci-champ--type fieldset > .radio {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ci-champ--type .form-check {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.ci-champ--type .form-check-input {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.ci .ci-champ--type .form-check-label {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  min-height: 92px;
  padding: 50px 14px 14px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: rgba(118, 118, 128, 0.08);
  display: flex;
  align-items: flex-end;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--mc-encre);
  cursor: pointer;
}

.ci-champ--type .form-check-label::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 26px;
  height: 26px;
  background-color: var(--mc-encre);
  -webkit-mask: var(--ci-icone) center / contain no-repeat;
  mask: var(--ci-icone) center / contain no-repeat;
}

.ci .ci-champ--type .form-check-label:hover {
  background: rgba(118, 118, 128, 0.14);
}

.ci .ci-champ--type .form-check-input:checked + .form-check-label {
  border-color: var(--mc-encre);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.ci-champ--type .form-check-input:checked + .form-check-label::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mc-rouge) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.ci-champ--type .form-check-input:focus-visible + .form-check-label {
  outline: 3px solid rgba(226, 27, 35, 0.4);
  outline-offset: 2px;
}

.ci .ci-champ--type fieldset.invalid .form-check-label {
  border-color: rgba(196, 22, 29, 0.5);
}

.ci-champ--type input[value="installateur"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.3 5.3L3.5 17.5l3 3 5.9-5.9a4 4 0 0 0 5.3-5.3l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="client"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21c.6-3.6 4-5.5 8-5.5s7.4 1.9 8 5.5'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="pro_batiment"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4.5A1.5 1.5 0 0 1 6.5 3h11A1.5 1.5 0 0 1 19 4.5V21M3 21h18M9 7h1.5M13.5 7H15M9 11h1.5M13.5 11H15M9 15h1.5M13.5 15H15M10.5 21v-3h3v3'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="architecte"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V4l16 16H4zM8 16v-3.5l3.5 3.5H8zM4 8h2M4 12h2'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="prescripteur"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6a1 1 0 0 1 1 1v1H8V5a1 1 0 0 1 1-1zM8 5H6.5A1.5 1.5 0 0 0 5 6.5v13A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5v-13A1.5 1.5 0 0 0 17.5 5H16M8.5 11h7M8.5 15h5'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="acousticien"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h1.5M7 8.5v7M11 5v14M15 8.5v7M19 10.5v3'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="imprimeur"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5M5 18H4a1 1 0 0 1-1-1v-7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v7a1 1 0 0 1-1 1h-1M7 14h10v7H7z'/%3E%3C/svg%3E");
}

.ci-champ--type input[value="autre"] + .form-check-label {
  --ci-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zM10.5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zM16.5 12a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E");
}

/* CGU : texte et lien du PDF à gauche, interrupteur iOS à droite */

.ci-cgu .control-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "texte case" "lien case";
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(118, 118, 128, 0.08);
}

.ci-cgu .controls {
  display: contents;
}

.ci-cgu .control-label {
  grid-area: texte;
  width: auto;
  margin: 0;
}

.ci .ci-cgu .control-label label {
  font-size: 15px;
  line-height: 1.35;
}

.ci-cgu .form-check {
  grid-area: case;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.ci-cgu [id$="-desc"] {
  grid-area: lien;
}

.ci .ci-cgu .form-text {
  margin: 0;
  font-size: 13px;
}

.ci .ci-cgu a {
  font-weight: 500;
}

.ci .ci-cgu .form-check-input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  float: none;
  width: 51px;
  height: 31px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.24) none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ci-cgu .form-check-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s;
}

.ci .ci-cgu .form-check-input:checked {
  background: var(--mc-vert) none;
}

.ci-cgu .form-check-input:checked::before {
  transform: translateX(20px);
}

.ci .ci-cgu .form-check-input.invalid {
  box-shadow: 0 0 0 2px var(--mc-rouge-texte);
}

.ci-captcha .control-group {
  margin: 0;
}

/* Boutons */

.ci-pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--mc-trait);
}

/* Plus précis que « body.site .btn » de user.css */
body.site .ci .ci-btn {
  min-height: 50px;
  padding: 0 28px;
  font-size: 16px;
  text-decoration: none;
}

body.site .ci .ci-btn--sec {
  margin-right: auto;
}

.ci .ci-connexion {
  margin: 24px 0 0;
  text-align: center;
  font-size: 15px;
}

/* Lien vers la connexion en capsule de verre, sur le textile */
.ci .ci-connexion a {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: var(--mc-verre);
  -webkit-backdrop-filter: var(--mc-flou);
  backdrop-filter: var(--mc-flou);
  box-shadow: var(--mc-ombre-verre);
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--mc-encre);
  text-decoration: none;
}

.ci .ci-connexion a:hover {
  background: rgba(255, 255, 255, 0.85);
}

/* Confirmation */

.ci .ci-fin {
  align-items: center;
  gap: 14px;
  padding: 44px 40px;
  text-align: center;
}

.ci-fin-icone {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--mc-vert);
  box-shadow: 0 12px 30px rgba(52, 199, 89, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ci .ci-fin-titre {
  max-width: 520px;
  margin: 8px 0 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ci .ci-fin-texte {
  max-width: 520px;
  margin: 0;
  line-height: 1.5;
  color: var(--mc-texte);
}

body.site .ci .ci-fin .ci-btn {
  margin-top: 12px;
}

/* Téléphone : une colonne, étape courante seule nommée, boutons dans une barre flottante */

@container (max-width: 720px) {
  .ci .ci-titre {
    font-size: 36px;
  }

  .ci .ci-sous-titre {
    font-size: 17px;
  }

  .ci-carte {
    margin-top: 28px;
    padding: 22px 16px;
    border-radius: 26px;
  }

  .ci-grille {
    grid-template-columns: minmax(0, 1fr);
  }

  .ci-champ--type fieldset > .radio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ci .ci-segment:not([aria-current="step"]) {
    padding: 0 8px;
  }

  .ci .ci-segment:not([aria-current="step"]) .ci-segment-lib {
    display: none;
  }

  .ci .ci-etape-titre {
    font-size: 24px;
  }

  .ci-pied {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    margin: 0 -8px;
    padding: 8px;
    border-top: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: var(--mc-flou);
    backdrop-filter: var(--mc-flou);
    box-shadow: var(--mc-ombre-verre);
  }

  body.site .ci .ci-pied .ci-btn {
    flex: 1 1 auto;
    padding: 0 18px;
  }

  body.site .ci .ci-pied .ci-btn--sec {
    flex: 0 1 auto;
    margin-right: 0;
  }

  .ci .ci-fin {
    padding: 32px 20px;
  }
}
