/* KUBYX Core — composants fonctionnels (indépendants du thème).
   Les couleurs utilisent les variables du thème KUBYX si elles existent, sinon des valeurs de repli. */
.kubyx-demo-bandeau, .kubyx-perso, .kubyx-form-wrap, .kubyx-infos, .kubyx-livraison, .kubyx-couches, .kubyx-encadre {
	--kc-noir: var(--wp--preset--color--noir, #0e0e10);
	--kc-texte: var(--wp--preset--color--encre, #18181b);
	--kc-gris: var(--wp--preset--color--gris-fonce, #56565c);
	--kc-ligne: var(--wp--preset--color--ligne, #e4e2de);
	--kc-bordure: var(--wp--preset--color--gris, #b9b8b4);
	--kc-surface: var(--wp--preset--color--surface, #f4f3f0);
	--kc-bleu: var(--wp--preset--color--bleu, #0a5cf0);
	--kc-bleu-pale: var(--wp--preset--color--bleu-pale, #e9f0fe);
	--kc-alerte: var(--wp--preset--color--alerte, #b42318);
	--kc-succes: var(--wp--preset--color--succes, #16794a);
	--kc-r: var(--wp--custom--rayon--m, 10px);
	--kc-ctrl: var(--wp--custom--hauteur-controle, 48px);
}

/* Bandeau démonstration */
.kubyx-demo-bandeau { background: #fff4d6; color: #4d3800; font-size: .8125rem; line-height: 1.4; text-align: center; padding: .45rem 1rem; border-bottom: 1px solid #f0dca0; }

/* Champs communs */
.kubyx-champ { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
.kubyx-champ > label, .kubyx-label { font-weight: 600; font-size: .9375rem; color: var(--kc-texte); }
.kubyx-champ input[type="text"], .kubyx-champ input[type="email"], .kubyx-champ input[type="tel"], .kubyx-champ input[type="number"], .kubyx-champ input[type="date"], .kubyx-champ select, .kubyx-champ textarea {
	width: 100%; min-height: var(--kc-ctrl); border: 1px solid var(--kc-bordure); border-radius: var(--kc-r); padding: .6rem .85rem; font: inherit; font-size: 1rem; background: #fff; color: var(--kc-texte); box-sizing: border-box;
}
.kubyx-champ textarea { min-height: 7rem; resize: vertical; }
.kubyx-champ :is(input, select, textarea):focus { outline: 2px solid var(--kc-bleu); outline-offset: 1px; border-color: var(--kc-bleu); }
.kubyx-champ [aria-invalid="true"] { border-color: var(--kc-alerte); background: #fff8f7; }
.kubyx-champ input[type="file"] { padding: .6rem; border: 1px dashed var(--kc-bordure); border-radius: var(--kc-r); background: var(--kc-surface); font-size: .9375rem; width: 100%; box-sizing: border-box; }
.kubyx-aide { font-size: .8125rem; color: var(--kc-gris); line-height: 1.45; }
.kubyx-facultatif { font-weight: 400; color: var(--kc-gris); font-size: .8125rem; }
.kubyx-requis { font-weight: 400; color: var(--kc-gris); font-size: .8125rem; }
.kubyx-sup { font-weight: 600; color: var(--kc-bleu); font-size: .8125rem; }
.kubyx-choix { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.kubyx-choix label, .kubyx-case { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 400; cursor: pointer; }
.kubyx-choix input, .kubyx-case input { width: 20px; height: 20px; accent-color: var(--kc-bleu); flex: 0 0 auto; }

/* Personnalisation (fiche produit) */
.kubyx-perso { flex: 1 1 100%; width: 100%; border: 1px solid var(--kc-ligne); border-radius: 16px; padding: 1.25rem; margin: 0 0 1rem; background: #fff; box-sizing: border-box; min-width: 0; }
.kubyx-perso__titre { font-family: var(--wp--preset--font-family--titre, inherit); font-weight: 600; font-size: 1.0625rem; padding: 0 .35rem; }
.kubyx-pastilles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: .5rem; }
.kubyx-pastille { position: relative; display: block; cursor: pointer; }
.kubyx-pastille input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kubyx-pastille span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: .4rem .75rem; border: 1.5px solid var(--kc-ligne); border-radius: var(--kc-r); font-size: 1.05rem; text-align: center; transition: border-color .15s, background-color .15s; }
.kubyx-pastille input:checked + span { border-color: var(--kc-noir); background: var(--kc-surface); box-shadow: inset 0 0 0 1px var(--kc-noir); }
.kubyx-pastille input:focus-visible + span { outline: 2px solid var(--kc-bleu); outline-offset: 2px; }
.kubyx-apercu { display: flex; flex-direction: column; gap: .25rem; background: var(--kc-surface); border-radius: var(--kc-r); padding: .85rem 1rem; margin-bottom: .25rem; overflow: hidden; }
.kubyx-apercu__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--kc-gris); }
.kubyx-apercu__texte { font-size: 1.6rem; line-height: 1.25; overflow-wrap: anywhere; color: var(--kc-noir); }
.kubyx-apercu__note { margin: 0 0 1rem; }
.kubyx-recap { border-top: 1px solid var(--kc-ligne); padding-top: .85rem; margin-top: .25rem; }
.kubyx-recap__titre { font-weight: 600; font-size: .875rem; margin: 0 0 .35rem; }
.kubyx-recap ul { margin: 0 0 .35rem; padding-left: 1.1rem; font-size: .875rem; }
.kubyx-recap li { margin: .1rem 0; overflow-wrap: anywhere; }

/* Informations clés de la fiche produit */
.kubyx-infos { list-style: none; margin: 1rem 0 1.25rem; padding: 0; border-top: 1px solid var(--kc-ligne); }
.kubyx-infos li { display: grid; grid-template-columns: 22px 110px 1fr; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--kc-ligne); font-size: .9375rem; }
.kubyx-infos__ico svg { width: 18px; height: 18px; color: var(--kc-bleu); display: block; }
.kubyx-infos__label { color: var(--kc-gris); }
.kubyx-infos__val { font-weight: 600; color: var(--kc-texte); }
.kubyx-infos__note { font-weight: 400; color: var(--kc-gris); font-size: .8125rem; }
@media (max-width: 420px) { .kubyx-infos li { grid-template-columns: 20px 1fr; } .kubyx-infos__val { grid-column: 2; } }
.kubyx-livraison { background: var(--kc-surface); border-radius: 16px; padding: 1rem 1.15rem; margin: 1rem 0; font-size: .9375rem; }
.kubyx-livraison p { margin: .25rem 0; }
.kubyx-livraison__titre { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.kubyx-livraison__titre svg { width: 20px; height: 20px; color: var(--kc-bleu); }
.kubyx-livraison__lien a { font-size: .875rem; }
.kubyx-couches { display: flex; gap: .6rem; align-items: flex-start; font-size: .8125rem; color: var(--kc-gris); line-height: 1.5; }
.kubyx-couches svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: .15rem; }
.kubyx-tva { display: block; font-size: .75rem; font-weight: 400; color: var(--kc-gris, #56565c); }

/* Formulaire devis / contact */
.kubyx-form-wrap { max-width: 820px; }
.kubyx-form__groupe { border: 1px solid var(--kc-ligne); border-radius: 16px; padding: 1.25rem 1.25rem .5rem; margin: 0 0 1.25rem; min-width: 0; }
.kubyx-form__groupe legend { font-family: var(--wp--preset--font-family--titre, inherit); font-weight: 600; font-size: 1.125rem; padding: 0 .4rem; }
.kubyx-form__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 1.25rem; }
.kubyx-form__legende { font-size: .875rem; color: var(--kc-gris); }
.kubyx-form__erreur { color: var(--kc-alerte); font-size: .875rem; font-weight: 600; margin: .1rem 0 0; }
.kubyx-form__erreur::before { content: "⚠ "; }
.kubyx-form__alerte, .kubyx-form__succes { border-radius: var(--kc-r); padding: 1rem 1.15rem; margin: 0 0 1.25rem; line-height: 1.5; }
.kubyx-form__alerte { background: #fdecea; color: #7a1a12; border: 1px solid #f5c2bc; }
.kubyx-form__succes { background: #e8f5ee; color: #0e4d2f; border: 1px solid #b7e0c8; }
.kubyx-form__piege { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.kubyx-form__envoi { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.kubyx-form .kubyx-btn, .kubyx-form button[type="submit"] { min-height: var(--kc-ctrl); padding: .8rem 1.75rem; border: 0; border-radius: 999px; background: var(--kc-noir); color: #fff; font-weight: 600; font-size: 1rem; cursor: pointer; }
.kubyx-form button[type="submit"]:hover { background: var(--kc-bleu); }
.kubyx-form button[type="submit"][disabled] { opacity: .6; cursor: progress; }
.kubyx-champ--rgpd { background: var(--kc-surface); border-radius: var(--kc-r); padding: .75rem 1rem; }
.kubyx-encadre { background: var(--kc-surface); border-left: 3px solid var(--kc-bleu); border-radius: 0 var(--kc-r) var(--kc-r) 0; padding: 1rem 1.25rem; }
.kubyx-encadre p:last-child { margin-bottom: 0; }

/* Suivi et retrait (commande) */
.kubyx-suivi, .kubyx-retrait { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid #e4e2de; border-radius: 12px; }
.kubyx-suivi h2, .kubyx-retrait h2 { font-size: 1.125rem; margin: 0 0 .5rem; }

.kubyx-a-completer { background: #fff4d6; color: #5c4200; border-radius: 4px; padding: 0 .3em; font-weight: 600; }
.screen-reader-text { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
