/* Configurateur des modules Kelki (Dov, 26/11/2026) : espace partenaire ET MyKelki. Règles de Dov : zéro ombre, rien de
   penché, boutons rectangle 12 px, jamais de rond coloré. Revue du 26/11 (UX, UI, DA, création, interactions) :
   - noir plein réservé à « Copier le code » ; choix sélectionnés = fond pierre + contour noir 2 px ;
   - une seule hauteur de contrôle (40 px à la souris, 44 px au doigt), espacements sur une échelle de 4/8 ;
   - groupes de choix soudés, couleurs en petits carrés (coche), survols seulement là où la souris existe.
   Tout est rangé sous .kxc ; « :not(#_) » passe devant les styles de page de l'espace pro (.zN:not(#_)). */
.kxc:not(#_) { container-type: inline-size; min-width: 0; color: #0A0A0B; --kxc-filet: rgba(10, 10, 11, .45);
  --kxc-pierre: #F4F4F1; --kxc-gris: #6B6B72; --kxc-h: 40px; }
@media (pointer: coarse) { .kxc:not(#_) { --kxc-h: 44px; } }
.kxc:not(#_) [hidden] { display: none !important; }
.kxc button:not(#_) { font: inherit; color: inherit; margin: 0; }
.kxc strong:not(#_), .kxc h3:not(#_), .kxc label:not(#_), .kxc p:not(#_) { color: inherit; }
.kxc .kxc-ui:not(#_) { display: flex; flex-direction: column; gap: 32px; }

/* titres d'étape : numéro dans un carré bordé */
.kxc .kxc-etape:not(#_) { display: flex; align-items: center; gap: 10px; margin: 0 0 -20px; font-size: 16px; font-weight: 600;
  letter-spacing: -.01em; }
.kxc .kxc-etape:not(#_) span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--kxc-filet); font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.kxc .kxc-code:not(#_) .kxc-etape { margin: 0; font-size: 15px; }

/* onglets des modules (compacts) */
.kxc .kxc-onglets:not(#_) { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.kxc .kxc-onglet:not(#_) { display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left;
  border: 1px solid var(--kxc-filet); border-radius: 12px; background: #FFFFFF; cursor: pointer; }
.kxc .kxc-onglet:not(#_) svg { flex: 0 0 auto; color: var(--kxc-gris); }
.kxc .kxc-onglet:not(#_) span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kxc .kxc-onglet:not(#_) strong { font-size: 14px; font-weight: 600; }
.kxc .kxc-onglet:not(#_) small { font-size: 12.5px; line-height: 1.35; color: var(--kxc-gris); }

/* deux colonnes : réglages + code | aperçu */
.kxc .kxc-grille:not(#_) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.kxc .kxc-droite:not(#_) { order: -1; }
@container (min-width: 820px) {
  .kxc .kxc-grille:not(#_) { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .kxc .kxc-droite:not(#_) { order: 0; position: sticky; top: 16px; }
}
.kxc .kxc-gauche:not(#_) { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.kxc .kxc-reglages:not(#_) { display: flex; flex-direction: column; border: 1px solid rgba(10, 10, 11, .12); border-radius: 12px;
  background: #FFFFFF; }
.kxc .kxc-groupe:not(#_) { margin: 0; padding: 16px; border-top: 1px solid rgba(10, 10, 11, .1); min-width: 0;
  display: flex; flex-direction: column; gap: 8px; }
.kxc .kxc-reglages > .kxc-groupe:not(#_):first-child { border-top: 0; }
.kxc .kxc-titre:not(#_) { display: block; margin: 0; font-size: 14px; font-weight: 600; color: #0A0A0B; }
.kxc .kxc-sous:not(#_) { margin: 4px 0 0; font-size: 13px; color: var(--kxc-gris); }
.kxc .kxc-aide:not(#_) { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--kxc-gris); }

/* champs et boutons */
.kxc .kxc-ligne:not(#_) { display: flex; gap: 8px; }
.kxc .kxc-champ:not(#_) { flex: 1 1 auto; min-width: 0; width: 100%; box-sizing: border-box; height: var(--kxc-h); padding: 0 12px;
  border: 1px solid var(--kxc-filet); border-radius: 12px; background: #FFFFFF; font: inherit; font-size: 15px; color: #0A0A0B; }
@media (pointer: coarse) { .kxc .kxc-champ:not(#_) { font-size: 16px; } }            /* iPhone : pas de zoom à la saisie */
.kxc .kxc-champ[aria-invalid="true"]:not(#_) { border-color: #B42318; }
.kxc .kxc-bouton:not(#_) { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-sizing: border-box;
  height: var(--kxc-h); padding: 0 14px; border: 1px solid var(--kxc-filet); border-radius: 12px; background: #FFFFFF;
  color: #0A0A0B; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.kxc .kxc-bouton--plein:not(#_) { border-color: #0A0A0B; background: #0A0A0B; color: #FFFFFF; font-weight: 600; padding: 0 18px; }
.kxc .kxc-bouton--petit:not(#_) { margin-left: auto; }

/* liste déroulante des métiers (Dov 26/11) : bouton = un champ, liste sous le bouton, recherche en haut,
   « Automatique » épinglé en bas ; zéro ombre : la liste se détache par un contour noir */
.kxc .kxc-liste:not(#_) { position: relative; }
.kxc .kxc-declencheur:not(#_) { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  height: var(--kxc-h); padding: 0 10px 0 12px; border: 1px solid var(--kxc-filet); border-radius: 12px; background: #FFFFFF;
  color: #0A0A0B; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.kxc .kxc-declencheur.kxc-auto:not(#_) { color: var(--kxc-gris); font-weight: 400; }
.kxc .kxc-declencheur-nom:not(#_) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kxc .kxc-declencheur:not(#_) svg { flex: 0 0 auto; color: #0A0A0B; transition: transform .15s; }
.kxc .kxc-declencheur[aria-expanded="true"]:not(#_) { border-color: #0A0A0B; }
.kxc .kxc-declencheur[aria-expanded="true"]:not(#_) svg { transform: rotate(180deg); }
.kxc .kxc-deroulant:not(#_) { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; display: flex;
  flex-direction: column; border: 1px solid #0A0A0B; border-radius: 12px; background: #FFFFFF; overflow: hidden; }
.kxc .kxc-cherche:not(#_) { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid rgba(10, 10, 11, .12);
  color: var(--kxc-gris); }
.kxc .kxc-cherche:not(#_) input { flex: 1 1 auto; min-width: 0; height: 44px; border: 0; padding: 0; background: transparent;
  font: inherit; font-size: 15px; color: #0A0A0B; outline: none; }
@media (pointer: coarse) { .kxc .kxc-cherche:not(#_) input { font-size: 16px; } }
.kxc .kxc-options:not(#_) { position: relative; margin: 0; padding: 4px 0 0; list-style: none; max-height: min(320px, 50vh); overflow-y: auto;
  overscroll-behavior: contain; }
.kxc .kxc-options:not(#_) li { margin: 0; }
.kxc .kxc-options:not(#_) [role="option"] { display: flex; align-items: center; min-height: 38px; padding: 6px 36px 6px 14px;
  font-size: 14px; cursor: pointer; position: relative; }
@media (pointer: coarse) { .kxc .kxc-options:not(#_) [role="option"] { min-height: 44px; } }
.kxc .kxc-options:not(#_) [role="option"] span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kxc .kxc-options:not(#_) [role="option"] small { font-size: 12.5px; color: var(--kxc-gris); }
.kxc .kxc-options:not(#_) .kxc-actif { background: var(--kxc-pierre); }
.kxc .kxc-options:not(#_) [aria-selected="true"] { font-weight: 600; }
.kxc .kxc-options:not(#_) [aria-selected="true"]::after { content: ""; position: absolute; right: 12px; top: 50%; width: 16px; height: 16px;
  margin-top: -8px; background: #0A0A0B;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E") center/contain no-repeat; }
.kxc .kxc-options:not(#_) .kxc-intertitre { padding: 10px 14px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--kxc-gris); }
.kxc .kxc-options:not(#_) .kxc-vide { padding: 12px 14px; font-size: 13.5px; color: var(--kxc-gris); }
/* « Automatique » : toujours visible en bas de la liste, séparé par un filet */
.kxc .kxc-options:not(#_) .kxc-option-auto { position: sticky; bottom: 0; z-index: 1; margin-top: 4px; min-height: 52px;
  border-top: 1px solid rgba(10, 10, 11, .12); background: #FFFFFF; }
.kxc .kxc-options:not(#_) .kxc-option-auto.kxc-actif { background: var(--kxc-pierre); }

/* puces (idées) */
.kxc .kxc-puces:not(#_) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--kxc-gris); }
.kxc .kxc-puces:not(#_) button { min-height: 32px; padding: 5px 10px; border: 1px solid var(--kxc-filet); border-radius: 10px;
  background: #FFFFFF; color: #0A0A0B; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
@media (pointer: coarse) { .kxc .kxc-puces:not(#_) button { min-height: 44px; } }
.kxc .kxc-perso:not(#_) { display: flex; flex-direction: column; gap: 8px; }

/* groupes de choix soudés (un seul contrôle) */
.kxc .kxc-seg:not(#_) { display: flex; flex-wrap: nowrap; }
.kxc .kxc-seg:not(#_) button { flex: 1 1 auto; min-width: 0; white-space: nowrap; min-height: var(--kxc-h); padding: 0 8px; border: 1px solid var(--kxc-filet);
  border-radius: 0; margin-left: -1px; background: #FFFFFF; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.kxc .kxc-seg:not(#_) button:first-child { margin-left: 0; border-radius: 12px 0 0 12px; }
.kxc .kxc-seg:not(#_) button:last-child { border-radius: 0 12px 12px 0; }
.kxc .kxc-seg--petit:not(#_) button { flex: 0 0 auto; min-height: 32px; padding: 0 12px; font-size: 13px; }
@media (pointer: coarse) { .kxc .kxc-seg--petit:not(#_) button { min-height: 44px; } }

/* état choisi (partout) : fond pierre + contour noir 2 px ; le noir plein reste à « Copier le code » */
.kxc [role="radio"][aria-checked="true"]:not(#_), .kxc .kxc-puces:not(#_) button[aria-pressed="true"] {
  position: relative; z-index: 1; background: var(--kxc-pierre); border-color: #0A0A0B; outline: 1px solid #0A0A0B; outline-offset: -2px;
  cursor: default; }
.kxc .kxc-onglet[aria-checked="true"]:not(#_) svg { color: #0A0A0B; }

/* couleurs : petits carrés, coche sur la teinte choisie */
.kxc .kxc-teintes:not(#_) { display: flex; flex-wrap: wrap; gap: 6px; }
.kxc .kxc-teinte:not(#_) { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--kxc-filet); border-radius: 8px; cursor: pointer; overflow: hidden; }
@media (pointer: coarse) { .kxc .kxc-teinte:not(#_) { width: 44px; height: 44px; } }
.kxc .kxc-teinte[aria-checked="true"]:not(#_) { outline: 2px solid #0A0A0B; outline-offset: 2px; }
.kxc .kxc-teinte[aria-checked="true"]:not(#_)::after { content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E") center/contain no-repeat; }
.kxc .kxc-teinte--autre:not(#_) { width: auto; padding: 0 10px; background: #FFFFFF; font-size: 13px; font-weight: 500; }
.kxc .kxc-teinte--autre.kxc-actif:not(#_) { outline: 2px solid #0A0A0B; outline-offset: 2px; }
.kxc .kxc-teinte--autre.kxc-sombre:not(#_) { color: #FFFFFF; }
.kxc .kxc-teinte--autre:not(#_) input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.kxc .kxc-teinte--autre:not(#_):has(input:focus-visible) { outline: 3px solid #0A0A0B; outline-offset: 2px; }

/* case à cocher */
.kxc .kxc-case:not(#_) { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.kxc .kxc-case:not(#_) input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #0A0A0B; flex: 0 0 auto; }
.kxc .kxc-case:not(#_) span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.kxc .kxc-case:not(#_) strong { font-weight: 500; }
.kxc .kxc-case:not(#_) small { font-size: 12.5px; color: var(--kxc-gris); }

/* icônes du bouton */
.kxc .kxc-icones:not(#_) { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.kxc .kxc-icone:not(#_) { display: grid; place-items: center; height: var(--kxc-h); padding: 0; border: 1px solid var(--kxc-filet);
  border-radius: 12px; background: #FFFFFF; color: #0A0A0B; cursor: pointer; }
.kxc .kxc-icone:not(#_) span { font-size: 12px; font-weight: 500; }

/* réglages rares, repliés */
.kxc .kxc-plus:not(#_) { border-top: 1px solid rgba(10, 10, 11, .1); }
.kxc .kxc-plus:not(#_) summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: 14px; font-weight: 500;
  cursor: pointer; list-style: none; }
.kxc .kxc-plus:not(#_) summary::-webkit-details-marker { display: none; }
.kxc .kxc-plus:not(#_) summary::after { content: "+"; margin-left: auto; font-size: 18px; color: var(--kxc-gris); }
.kxc .kxc-plus[open]:not(#_) summary::after { content: "–"; }
.kxc .kxc-plus-corps:not(#_) { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; }
.kxc .kxc-curseur:not(#_) { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
.kxc .kxc-curseur:not(#_) label { font-size: 14px; }
.kxc .kxc-curseur:not(#_) output { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.kxc .kxc-curseur:not(#_) input { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: #0A0A0B; }
@media (pointer: coarse) { .kxc .kxc-curseur:not(#_) input { height: 44px; } }

/* code */
.kxc .kxc-code:not(#_) { padding: 16px; border: 1px solid rgba(10, 10, 11, .12); border-radius: 12px; background: #FFFFFF;
  display: flex; flex-direction: column; gap: 12px; }
.kxc .kxc-code:not(#_) pre { margin: 0; padding: 12px 16px; max-height: 220px; overflow: auto; border-radius: 12px;
  background: var(--kxc-pierre); border: 1px solid rgba(10, 10, 11, .08); color: #0A0A0B;
  font: 12.5px/1.6 "Geist Mono", ui-monospace, Menlo, monospace; white-space: pre; }
.kxc .kxc-code:not(#_) pre.kxc-change { animation: kxc-flash .9s ease-out; }
@keyframes kxc-flash { 0% { background: #E4E4DD; } 100% { background: #F4F4F1; } }
@media (prefers-reduced-motion: reduce) { .kxc .kxc-code:not(#_) pre.kxc-change { animation: none; } }
.kxc .kxc-code-actions:not(#_) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* aperçu */
.kxc .kxc-droite:not(#_) { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kxc .kxc-apercu-tete:not(#_) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kxc .kxc-apercu-tete:not(#_) h3 { margin: 0; font-size: 15px; font-weight: 600; }
.kxc .kxc-ecran:not(#_) { margin: 0 auto; width: 100%; border: 1px solid rgba(10, 10, 11, .14); border-radius: 12px; overflow: hidden;
  background: #FFFFFF; }
.kxc .kxc-ecran[data-appareil="mobile"]:not(#_) { width: 390px; max-width: 100%; border-radius: 24px; border: 6px solid #0A0A0B; }
.kxc .kxc-barre:not(#_) { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-bottom: 1px solid rgba(10, 10, 11, .08); background: var(--kxc-pierre); }
.kxc .kxc-barre:not(#_) i { width: 8px; height: 8px; border-radius: 2px; background: #D6D6D0; }
.kxc .kxc-barre:not(#_) span { flex: 1 1 auto; margin-left: 8px; height: 22px; line-height: 22px; padding: 0 10px; border-radius: 6px;
  background: #FFFFFF; font-size: 12px; color: var(--kxc-gris); }
.kxc .kxc-ecran[data-appareil="mobile"]:not(#_) .kxc-barre { height: 28px; }
.kxc .kxc-ecran:not(#_) iframe { display: block; width: 100%; height: min(620px, calc(100vh - 180px)); min-height: 420px; border: 0;
  background: #FFFFFF; }
.kxc .kxc-ecran[data-appareil="mobile"]:not(#_) iframe { height: min(680px, calc(100vh - 180px)); }

/* survols : seulement à la souris (sur téléphone, un survol resterait « collé ») */
@media (hover: hover) {
  .kxc [role="radio"]:not(#_):not([aria-checked="true"]):hover, .kxc .kxc-puces:not(#_) button:hover,
  .kxc .kxc-bouton:not(#_):not(.kxc-bouton--plein):hover, .kxc .kxc-teinte:not(#_):hover { border-color: #0A0A0B; }
  .kxc .kxc-bouton:not(#_):not(.kxc-bouton--plein):hover { background: var(--kxc-pierre); }
  .kxc .kxc-bouton--plein:not(#_):hover { background: #2A2A2E; border-color: #2A2A2E; }
  .kxc .kxc-plus:not(#_) summary:hover { background: #FAFAF8; }
  .kxc .kxc-declencheur:not(#_):hover { border-color: #0A0A0B; }
}

/* focus clavier : même anneau partout */
.kxc button:not(#_):focus-visible, .kxc input:not(#_):focus-visible, .kxc a:not(#_):focus-visible, .kxc pre:not(#_):focus-visible,
.kxc summary:not(#_):focus-visible { outline: 3px solid #0A0A0B; outline-offset: 2px; }
.kxc .kxc-champ:not(#_):focus-visible { outline-offset: 1px; border-color: #0A0A0B; }
.kxc .kxc-cherche:not(#_) input:focus-visible { outline: none; }          /* la liste ouverte porte déjà le contour noir */

/* téléphone : onglets en une rangée, aperçu compact collant (décollé pendant la saisie) */
@container (max-width: 560px) {
  .kxc .kxc-onglets:not(#_) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .kxc .kxc-onglet:not(#_) { flex-direction: column; justify-content: center; gap: 4px; min-height: 48px; padding: 8px 6px; text-align: center; }
  .kxc .kxc-onglet:not(#_) svg { width: 26px; height: 21px; }
  .kxc .kxc-onglet:not(#_) small { display: none; }
  .kxc .kxc-onglet:not(#_) strong { font-size: 13px; line-height: 1.25; }
  .kxc .kxc-apercu-tete:not(#_) .kxc-seg { display: none; }
  .kxc .kxc-droite:not(#_) { position: sticky; top: 56px; z-index: 2; background: #FFFFFF; padding-bottom: 8px;
    border-bottom: 1px solid var(--kxc-filet); }
  .kxc.kxc-saisie .kxc-droite:not(#_), .kxc.kxc-liste-ouverte .kxc-droite:not(#_) { position: static; }
  .kxc .kxc-ecran[data-appareil]:not(#_) { width: 100%; border: 1px solid rgba(10, 10, 11, .14); border-radius: 12px; }
  .kxc .kxc-ecran[data-appareil]:not(#_) iframe { height: 30vh; min-height: 200px; max-height: 240px; }
  .kxc .kxc-barre:not(#_), .kxc .kxc-aide--apercu:not(#_) { display: none; }
  .kxc .kxc-seg--4:not(#_) button { font-size: 12.5px; padding: 0 4px; }
}
