/* KDO Étincelle — formulaire « Créer mon KDO » */
.lien-apercu { border: 1px solid var(--bord); background: var(--carte); color: var(--titre); border-radius: 999px; padding: 10px 16px; font: 700 .9rem var(--textes); cursor: pointer; box-shadow: var(--ombre); }
.bandeau { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 12px 16px; margin-bottom: 12px; border-radius: 16px; background: rgba(244, 184, 96, .2); font-size: .95rem; }
.bandeau a { font-weight: 700; }

.mise-en-page { position: relative; z-index: 1; display: grid; gap: 32px; padding-bottom: 40px; }
.formulaire { max-width: 560px; width: 100%; margin: 0 auto; }
.progression { height: 8px; border-radius: 99px; background: var(--bord); overflow: hidden; }
.barre { height: 100%; width: 14%; border-radius: 99px; background: linear-gradient(90deg, var(--or), var(--corail)); transition: width .45s ease; }
.etape-num { margin: 10px 0 18px; font-size: .85rem; font-weight: 700; color: var(--doux); letter-spacing: .04em; text-transform: uppercase; }
.etape h1 { font-size: clamp(1.7rem, 6.4vw, 2.3rem); }
.etape { animation: glisse .4s ease; }
@keyframes glisse { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.aide { color: var(--doux); margin: 0 0 18px; font-size: .97rem; }
.aide.centre { text-align: center; margin-top: 10px; }
.sous-titre { font-size: 1.2rem; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }

/* Champs */
.champ { display: block; margin-bottom: 16px; }
.champ > span { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--titre); }
.champ small { display: block; margin-top: 6px; color: var(--doux); font-size: .82rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--bord); background: var(--carte); color: var(--texte);
  font: 400 1rem/1.4 var(--textes); transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--corail); box-shadow: 0 0 0 4px rgba(255, 107, 91, .15); }
.invalide { border-color: var(--corail-fonce) !important; }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deux.tel { grid-template-columns: .9fr 1.1fr; }
.case { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 4px; font-size: .95rem; cursor: pointer; }
.case input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--corail); flex: none; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Occasions */
.occasions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.choix {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 96px; padding: 14px 8px; border-radius: 18px; cursor: pointer; text-align: center;
  background: var(--carte); border: 2px solid var(--bord); color: var(--titre); font: 700 .98rem var(--textes);
  transition: border-color .2s, transform .15s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.choix:hover { transform: translateY(-2px); }
.choix[aria-checked="true"] { border-color: var(--corail); box-shadow: 0 0 0 4px rgba(255, 107, 91, .14), var(--ombre); }
.choix .emoji { font-size: 1.9rem; line-height: 1; }
.choix small { font-weight: 400; color: var(--doux); font-size: .8rem; }

/* Messages */
.ligne-message { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.ligne-message .num { flex: none; width: 28px; height: 28px; margin-top: 12px; border-radius: 50%; display: grid; place-items: center; background: rgba(244, 184, 96, .25); font: 700 .85rem var(--textes); color: var(--titre); }
.ligne-message textarea { min-height: 56px; }
.ligne-message .retirer { flex: none; width: 40px; height: 40px; margin-top: 7px; border: 0; border-radius: 50%; background: transparent; color: var(--doux); font-size: 1.1rem; cursor: pointer; }
.ligne-message .retirer:hover { background: var(--bord); }
.bouton-doux.petit, .bouton.petit { min-height: 44px; font-size: .92rem; padding: 0 1.1em; }
.idees { margin-top: 18px; }
.idees summary { cursor: pointer; font-weight: 700; color: var(--titre); padding: 8px 0; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.puce { border: 1.5px dashed var(--or); background: transparent; color: var(--texte); border-radius: 14px; padding: 9px 12px; font: 400 .9rem/1.35 var(--textes); text-align: left; cursor: pointer; }
.puce:hover { background: rgba(244, 184, 96, .14); }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.photo { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--bord); box-shadow: var(--ombre); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .retirer { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(26, 18, 41, .7); color: #fff; font-size: .95rem; cursor: pointer; }
.photo .ordre { position: absolute; bottom: 6px; left: 6px; display: flex; gap: 4px; }
.photo .ordre button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: #3D2C5E; cursor: pointer; font-weight: 700; }
.photo.charge::after { content: ""; position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); border-top-color: var(--corail); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.ajout-photo { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border-radius: 18px; border: 2px dashed var(--or); background: rgba(244, 184, 96, .08); cursor: pointer; text-align: center; }
.ajout-photo span { font-weight: 700; color: var(--titre); font-size: 1.05rem; }
.ajout-photo small { color: var(--doux); }
.ajout-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ajout-photo.plein { display: none; }

/* Musiques */
.musiques { display: grid; gap: 8px; }
.musique { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--bord); background: var(--carte); cursor: pointer; }
.musique[aria-checked="true"] { border-color: var(--corail); }
.musique .titre { flex: 1; font-weight: 700; color: var(--titre); }
.musique .titre small { display: block; font-weight: 400; color: var(--doux); }
.musique .ecouter { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(244, 184, 96, .25); color: var(--titre); cursor: pointer; font-size: 1rem; }

/* Formules */
.formules { display: grid; gap: 12px; }
.formule { position: relative; padding: 18px; border-radius: 20px; border: 2px solid var(--bord); background: var(--carte); cursor: pointer; text-align: left; color: var(--texte); font: inherit; }
.formule[aria-checked="true"] { border-color: var(--corail); box-shadow: 0 0 0 4px rgba(255, 107, 91, .14), var(--ombre); }
.formule .tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.formule .nom-f { font: 700 1.3rem var(--titres); color: var(--titre); }
.formule .prix { font: 700 1.3rem var(--titres); color: var(--corail); white-space: nowrap; }
.formule ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: .93rem; color: var(--doux); }
.formule li { padding: 3px 0 3px 22px; position: relative; }
.formule li::before { content: "✦"; position: absolute; left: 0; color: var(--or); }
.formule li.non { opacity: .55; }
.formule li.non::before { content: "–"; color: var(--doux); }
.formule .badge { position: absolute; top: -10px; right: 16px; }

.message-erreur { color: var(--corail-fonce); font-weight: 700; font-size: .95rem; min-height: 1.2em; margin: 10px 0 0; }
@media (prefers-color-scheme: dark) { .message-erreur { color: #FF8C7F; } }
.navigation { display: flex; gap: 12px; justify-content: space-between; margin-top: 18px; position: sticky; bottom: 0; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fond) 30%); }
.navigation .bouton { flex: 1; }
.sauvegarde { text-align: center; color: var(--doux); font-size: .82rem; }
.lien { background: none; border: 0; padding: 0; color: var(--corail); font: inherit; text-decoration: underline; cursor: pointer; }

/* Aperçu */
.apercu-cote { display: none; }
.telephone { position: relative; width: 300px; aspect-ratio: 9 / 18.5; margin: 0 auto; border-radius: 42px; padding: 12px; background: #2A1E42; box-shadow: 0 30px 60px rgba(61, 44, 94, .28); }
.telephone iframe { width: 100%; height: 100%; border: 0; border-radius: 32px; background: var(--fond); }
.apercu-plein { position: fixed; inset: 0; z-index: 50; background: var(--fond); }
.apercu-plein iframe { width: 100%; height: 100%; border: 0; }
.apercu-plein .fermer { position: fixed; z-index: 51; top: max(12px, env(safe-area-inset-top)); left: 12px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--bord); background: var(--carte); color: var(--titre); font: 700 .9rem var(--textes); box-shadow: var(--ombre); cursor: pointer; }

.attente { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(255, 248, 241, .92); text-align: center; padding: 20px; font-weight: 700; color: var(--titre); }
@media (prefers-color-scheme: dark) { .attente { background: rgba(26, 18, 41, .92); } }
.attente .pastille { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--bord); border-top-color: var(--corail); animation: tourne 1s linear infinite; }

@media (min-width: 1000px) {
  .mise-en-page { grid-template-columns: 1fr 340px; align-items: start; }
  .apercu-cote { display: block; position: sticky; top: 20px; }
  .lien-apercu { display: none; }
  .occasions { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) { .deux { grid-template-columns: 1fr; } .deux.tel { grid-template-columns: 1fr; } }
