:root {
  --fond: #F3F0FA;
  --surface: #FFFFFF;
  --encre: #221C3D;
  --texte-2: #6F6887;
  --accent: #D6337F;
  --accent-fonce: #B0245F;
  --ajoute: #1F7A55;
  --ecarte: #A8461F;
  --ligne: #DDD6EC;
  --ligne-forte: #BDB3D3;
  --seg-0: #D6337F;
  --seg-1: #221C3D;
  --seg-2: #8E5A9E;
  --seg-3: #E58BB4;
  --seg-4: #6F6887;
  --seg-5: #5A2346;
  --focus: #221C3D;
  --rayon: 12px;
  --police-titre: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  /* nom « lalalaia » : Fredoka, alternative libre et arrondie à Isidora Soft Alt (payante) */
  --police-marque: "Fredoka", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif;
  --police: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --niveau: 0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 1rem/1.5 var(--police);
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--police-titre); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent-fonce); }
code { font-size: .9em; background: var(--surface); padding: 0 .3em; border-radius: 4px; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.evitement { position: absolute; left: -999px; }
.evitement:focus { left: 16px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 50; }

/* ---------- En-tête ---------- */
.entete {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 12px 16px; max-width: 1200px; margin: 0 auto;
}
.marque {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--police-marque); font-weight: 700; font-size: 2.1rem; line-height: 1;
  letter-spacing: -.01em; margin: 0; text-transform: none; color: var(--encre);
}
.marque .logo { width: 44px; height: 44px; flex: none; }
.marque a { display: inline-flex; align-items: center; gap: inherit; color: inherit; text-decoration: none; border-radius: 12px; }
.marque span { padding-bottom: .08em; }  /* aligne optiquement les minuscules rondes sur le logo */
.nav { display: flex; gap: .25rem; }
.lien-nav {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  font: 700 1rem var(--police); color: var(--encre); background: none; border: 0;
  min-height: 44px; padding: 0 .75rem; border-radius: var(--rayon); cursor: pointer;
}
.lien-nav:hover, .lien-nav[aria-expanded="true"] { background: var(--surface); }
.icone-nav { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* téléphone : la marque respire, la navigation devient deux boutons ronds à icône */
@media (max-width: 559px) {
  .entete { padding: 14px 16px 6px; }
  .marque { font-size: 1.8rem; gap: .45rem; }
  .marque .logo { width: 40px; height: 40px; }
  .nav { gap: .5rem; }
  .lien-nav { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--ligne); }
  .lien-nav[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-fonce); }
  .lien-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .icone-nav { width: 22px; height: 22px; }
}

/* ---------- Boutons ---------- */
.btn-principal, .btn-secondaire {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; cursor: pointer;
  font: 700 1rem var(--police); text-decoration: none; border: 2px solid transparent;
}
.btn-principal { background: var(--accent); color: #fff; }
.btn-principal:hover { background: var(--accent-fonce); }
.btn-principal[aria-disabled="true"], .btn-principal:disabled { background: var(--ligne-forte); color: var(--encre); cursor: not-allowed; }
.btn-secondaire { background: var(--surface); color: var(--encre); border-color: var(--ligne-forte); }
.btn-secondaire:hover { border-color: var(--encre); }
.btn-secondaire:disabled { opacity: .55; cursor: not-allowed; }
.btn-large { width: 100%; min-height: 52px; font-size: 1.1rem; }
.btn-petit { min-height: 44px; padding: 0 .9rem; }
.btn-fermer {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: none;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--encre);
}
.btn-fermer:hover { background: var(--fond); }

/* ---------- Mise en page principale ---------- */
.principal, .config { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }
.colonne-prompt form { display: flex; flex-direction: column; gap: 1rem; }

textarea, input[type="text"], input[type="password"], input:not([type]), select {
  width: 100%; font: 400 1.05rem/1.4 var(--police); color: var(--encre);
  background: var(--surface); border: 2px solid var(--ligne); border-radius: var(--rayon);
  padding: .75rem .9rem; min-height: 44px;
}
textarea:focus, input:focus, select:focus { border-color: var(--encre); outline: none; }
textarea:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
#prompt { font-size: 1.2rem; min-height: 8.5rem; resize: vertical; }

/* ---------- Le micro ---------- */
.zone-micro { display: flex; justify-content: center; padding: .5rem 0; }
.micro {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font: 700 .85rem var(--police);
  transition: background .15s;
}
.micro:hover { background: var(--accent-fonce); }
.micro svg, .micro-texte { position: relative; z-index: 1; }
.micro-onde {
  position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  opacity: 0; transform: scale(1); pointer-events: none;
}
.micro[aria-pressed="true"] .micro-onde {
  opacity: .28;
  transform: scale(calc(1.08 + var(--niveau) * .55));
  transition: transform .08s linear;
}
.micro[aria-pressed="true"] { background: var(--accent-fonce); }
.micro-petit { width: 48px; height: 48px; flex: none; }
@media (prefers-reduced-motion: reduce) {
  .micro[aria-pressed="true"] .micro-onde { transform: scale(1.18); transition: none; opacity: calc(.15 + var(--niveau) * .6); }
  .micro { transition: none; }
}

/* ---------- Longueur et ordre ---------- */
.longueur { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.bascule { display: inline-flex; background: var(--surface); border: 2px solid var(--ligne); border-radius: 999px; padding: 2px; }
.bascule label { position: relative; }
.bascule input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bascule span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border-radius: 999px;
  font-weight: 700; color: var(--texte-2);
}
.bascule input:checked + span { background: var(--encre); color: #fff; }
.bascule input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.curseur { flex: 1 1 200px; display: flex; align-items: center; gap: .75rem; }
.curseur input[type="range"] { flex: 1; accent-color: var(--accent); min-height: 44px; }
.curseur output { min-width: 5.5rem; font-weight: 700; text-align: right; }
.ordre { display: flex; align-items: center; gap: .5rem 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.ordre .aide { flex-basis: 100%; margin: 0; }
.choix-longueur {
  display: grid; gap: 1rem; margin: 0 0 1.5rem; padding: 1rem; background: var(--surface);
  border-radius: var(--rayon); border: 2px solid var(--accent);
}
.choix-longueur .question { font-size: 1.4rem; margin: 0; }
.choix-longueur .question:focus { outline: none; }
.choix-longueur .aide { margin: -.5rem 0 0; }
.etiquette-champ { font-weight: 700; }

.message-formulaire { color: var(--ecarte); font-weight: 700; margin: 0; min-height: 1.5em; }
.message-formulaire.neutre { color: var(--encre); font-weight: 400; }
.message-dictee { margin: 0; color: var(--ecarte); font-weight: 700; text-align: center; }
.ligne-dictee + .message-dictee { text-align: left; margin-top: .5rem; }
.message-action { min-height: 1.5em; margin: .5rem 0 0; }
.aide { color: var(--texte-2); font-size: .95rem; }

/* ---------- Résultats ---------- */
.colonne-resultats { margin-top: 2rem; }
.vide { padding-top: .5rem; }
.vide-titre { font-family: var(--police-titre); font-weight: 700; font-size: 1.4rem; color: var(--encre); }

/* ---------- Bouton qui se remplit pendant la préparation ---------- */
#btn-creer.en-cours, #btn-creer.en-cours:disabled {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--accent-fonce); color: #fff; cursor: progress;
}
#btn-creer.en-cours::before {
  content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1;
  width: var(--avancement, 0%); background: var(--accent); transition: width .6s ease;
}
#btn-creer .texte-bouton { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btn-creer .texte-bouton.apparait { animation: apparait .45s ease; }
#btn-creer .points span { display: inline-block; animation: point 1.2s ease-in-out infinite; }
#btn-creer .points span:nth-child(2) { animation-delay: .2s; }
#btn-creer .points span:nth-child(3) { animation-delay: .4s; }
@keyframes apparait { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes point { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.estimation { margin: -.25rem 0 0; text-align: center; min-height: 1.4em; }
.estimation.repos { font-style: italic; }
@media (prefers-reduced-motion: reduce) {
  #btn-creer.en-cours::before { transition: none; }
  #btn-creer .texte-bouton.apparait, #btn-creer .points span { animation: none; }
}

/* ---------- Spectacle pendant la préparation ---------- */
.spectacle {
  margin: 0; background: transparent; text-align: center;
  transition: opacity .45s ease, transform .45s ease;
}
.spectacle.sortie { opacity: 0; transform: scale(.96) translateY(-6px); }
.scenes { width: 100%; max-width: 320px; height: auto; max-height: 24vh; display: block; margin: 0 auto; overflow: visible; }
.scene { opacity: 0; transition: opacity .5s ease; }
.scene.active { opacity: 1; }
.scenes .trait path, .scenes .portee path, .scenes .manche, .scenes .baguette, .scenes .pied-micro {
  fill: none; stroke: var(--encre); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round;
}
.scenes .portee path { stroke: var(--ligne-forte); stroke-width: 2.5; }
.scenes .manche { stroke: var(--accent); stroke-width: 6; }
.scenes .baguette { stroke-width: 4; }
.scenes .pied-micro { stroke-width: 4; }
.scenes .plein { fill: var(--encre); stroke: none; }
.scenes .accent { fill: var(--accent); stroke: none; }
.scenes .fond { fill: var(--fond); }
.scenes .sol { fill: var(--ligne); }
.scenes .arc, .scenes .support { fill: none; stroke: var(--encre); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.scenes .support { stroke-width: 6; }
.scenes .ondes path { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.scenes .cordes path { stroke: var(--ligne); stroke-width: 1.4; }
.scenes .blanche { fill: #FFFFFF; stroke: var(--encre); stroke-width: 3; }
.scenes .anneau { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0; }
.scenes .grille { stroke: #5A4F86; stroke-width: 2.5; stroke-linecap: round; }
.scenes .cercle-clair { fill: var(--fond); }
.scenes .oeil { fill: #FFFFFF; }
.scenes .rayon-lumiere { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 3 11; opacity: .75; }
.scenes .facettes { fill: none; stroke: #5A4F86; stroke-width: 2; }
.scenes .casque-dj { fill: none; stroke: var(--accent); stroke-width: 6; }
.scenes .paroles { fill: #5A4F86; }
.scenes .rayons-impact { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.scenes .tube { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.scenes .rayon { stroke: var(--encre); stroke-width: 3; stroke-linecap: round; }
.scenes .onde { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.scenes .onde.o2 { stroke: var(--encre); stroke-width: 4; }
.scenes .sillon { fill: none; stroke: #3A3160; stroke-width: 2; }
.scenes .reflet { fill: none; stroke: #5A4F86; stroke-width: 4; stroke-linecap: round; }
.scenes use { fill: var(--accent); }
.scenes .etincelles path { fill: var(--accent); }

/* mouvements (seulement si l'on n'a pas demandé moins d'animations) */
@media (prefers-reduced-motion: no-preference) {
  .scene.active .danseur { transform-box: fill-box; transform-origin: 50% 100%; animation: balance 0.9s ease-in-out infinite alternate; }
  .scene.active .bras-gauche { transform-box: fill-box; transform-origin: 100% 100%; animation: bras 0.45s ease-in-out infinite alternate; }
  .scene.active .bras-droit { transform-box: fill-box; transform-origin: 0% 100%; animation: bras 0.45s ease-in-out infinite alternate-reverse; }
  .scene.active .etincelles path { transform-box: fill-box; transform-origin: center; animation: scintille 1.2s ease-in-out infinite; }
  .scene.active .etincelles path:nth-child(2) { animation-delay: .4s; }
  .scene.active .etincelles path:nth-child(3) { animation-delay: .8s; }
  .scene.active .note-vol { animation: envol 1.8s ease-out infinite; }
  .scene.active .n2 { animation-delay: .6s; }
  .scene.active .n3 { animation-delay: 1.2s; }
  .scene.active .chanteuse { transform-box: fill-box; transform-origin: 50% 100%; animation: balance 1.2s ease-in-out infinite alternate; }
  .scene.active .membre { animation: hoche .5s ease-in-out infinite alternate; }
  .scene.active .m2 { animation-delay: .17s; }
  .scene.active .m3 { animation-delay: .34s; }
  .scene.active .note-saut { animation: saut .9s cubic-bezier(.3, 0, .4, 1) infinite; }
  .scene.active .s2 { animation-delay: .15s; }
  .scene.active .s3 { animation-delay: .3s; }
  .scene.active .s4 { animation-delay: .45s; }
  .scene.active .s5 { animation-delay: .6s; }
  .scene.active .vinyle { transform-box: fill-box; transform-origin: center; animation: tourne 1.8s linear infinite; }
  .scene.active .ondes { animation: pulse-ondes 1s ease-in-out infinite; }
  .scene.active .ondes-d { animation-delay: .5s; }
  .scene.active .guitare { transform-box: fill-box; transform-origin: 50% 80%; animation: balance 1.1s ease-in-out infinite alternate; }
  .scene.active .cordes { animation: vibre .06s linear infinite alternate; }
  .scene.active .piano .blanche { animation: touche 1.4s ease-in-out infinite; }
  .scene.active .piano .t2 { animation-delay: .2s; } .scene.active .piano .t3 { animation-delay: .4s; }
  .scene.active .piano .t4 { animation-delay: .6s; } .scene.active .piano .t5 { animation-delay: .8s; }
  .scene.active .piano .t6 { animation-delay: 1s; } .scene.active .piano .t7 { animation-delay: 1.2s; }
  .scene.active .anneau { transform-box: fill-box; transform-origin: center; animation: anneau 1.6s ease-out infinite; }
  .scene.active .anneau.a2 { animation-delay: .8s; }
  .scene.active .cymbale { transform-box: fill-box; transform-origin: center; animation: cymbale .5s ease-in-out infinite alternate; }
  .scene.active .baguette-g { transform-box: fill-box; transform-origin: 0% 0%; animation: frappe .5s ease-in-out infinite alternate; }
  .scene.active .baguette-d { transform-box: fill-box; transform-origin: 0% 100%; animation: frappe .5s ease-in-out infinite alternate-reverse; }
  .scene.active .membrane { transform-box: fill-box; transform-origin: center; animation: membrane .35s ease-in-out infinite alternate; }
  .scene.active .membrane-petite { transform-box: fill-box; transform-origin: center; animation: membrane .2s ease-in-out infinite alternate; }
  .scene.active .bobine { transform-box: fill-box; transform-origin: center; animation: tourne 1.4s linear infinite; }
  .scene.active .onde.o1 { animation: defile 1.2s linear infinite; }
  .scene.active .onde.o2 { animation: defile 1.9s linear infinite; }
  .scene.active .danseur-a { transform-box: fill-box; transform-origin: 50% 100%; animation: balance .8s ease-in-out infinite alternate; }
  .scene.active .danseur-b { transform-box: fill-box; transform-origin: 50% 100%; animation: balance .8s ease-in-out infinite alternate-reverse; }
  .scene.active .bouche { transform-box: fill-box; transform-origin: center; animation: chante .6s ease-in-out infinite alternate; }
  .scene.active .c2 .bouche { animation-delay: .2s; } .scene.active .c3 .bouche { animation-delay: .4s; }
  .scene.active .choriste { animation: hoche .6s ease-in-out infinite alternate; }
  .scene.active .c2 { animation-delay: .2s; } .scene.active .c3 { animation-delay: .4s; }
  .scene.active .rayon-lumiere { transform-box: view-box; transform-origin: 120px 82px; animation: tourne 7s linear infinite, lumiere .8s linear infinite; }
  .scene.active .boule { transform-box: view-box; transform-origin: 120px 6px; animation: pendule 1.6s ease-in-out infinite alternate; }
  .scene.active .dj { animation: hoche .4s ease-in-out infinite alternate; }
  .scene.active .platine { transform-box: fill-box; transform-origin: center; animation: tourne 1.3s linear infinite; }
  .scene.active .platine.p2 { animation-duration: 1.7s; }
  .scene.active .paroles { animation: karaoke 2.4s steps(1) infinite; }
  .scene.active .paroles.l2 { animation-delay: .8s; } .scene.active .paroles.l3 { animation-delay: 1.6s; }
  .scene.active .micro-k { transform-box: fill-box; transform-origin: 50% 100%; animation: balance .9s ease-in-out infinite alternate; }
  .scene.active .maraca { transform-box: fill-box; transform-origin: 50% 100%; animation: secoue .22s ease-in-out infinite alternate; }
  .scene.active .maraca.m-d { animation-direction: alternate-reverse; }
  .scene.active .secousse { animation: pulse-ondes .44s ease-in-out infinite; }
  .scene.active .trompette { transform-box: fill-box; transform-origin: 10% 50%; animation: souffle 1s ease-in-out infinite alternate; }
  .scene.active .main.mg { animation: clap-g .38s ease-in infinite alternate; }
  .scene.active .main.md { animation: clap-d .38s ease-in infinite alternate; }
  .scene.active .impact { animation: impact .76s ease-out infinite; }
  .scene.active .egaliseur rect { transform-box: fill-box; transform-origin: 50% 100%; animation: niveau .7s ease-in-out infinite alternate; }
  .scene.active .egaliseur .b2 { animation-delay: .1s; } .scene.active .egaliseur .b3 { animation-delay: .35s; }
  .scene.active .egaliseur .b4 { animation-delay: .2s; } .scene.active .egaliseur .b5 { animation-delay: .5s; }
  .scene.active .egaliseur .b6 { animation-delay: .05s; } .scene.active .egaliseur .b7 { animation-delay: .4s; }
  .scene.active .egaliseur .b8 { animation-delay: .25s; } .scene.active .egaliseur .b9 { animation-delay: .6s; }
}
@keyframes balance { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes bras { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }
@keyframes scintille { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes envol { from { transform: translate(0, 0); opacity: 1; } to { transform: translate(26px, -46px); opacity: 0; } }
@keyframes hoche { from { transform: translateY(0); } to { transform: translateY(5px); } }
@keyframes saut { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px); } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes niveau { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
@keyframes pulse-ondes { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes vibre { from { transform: translateX(-.6px); } to { transform: translateX(.6px); } }
@keyframes touche { 0%, 30%, 100% { fill: #FFFFFF; transform: translateY(0); } 10% { fill: var(--accent); transform: translateY(3px); } }
@keyframes anneau { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.15); opacity: 0; } }
@keyframes cymbale { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes frappe { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
@keyframes membrane { from { transform: scale(.9); } to { transform: scale(1.06); } }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(80px); } }
@keyframes lumiere { to { stroke-dashoffset: -28; } }
@keyframes pendule { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes karaoke { 0% { fill: var(--accent); } 33% { fill: #5A4F86; } }
@keyframes secoue { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
@keyframes souffle { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(3deg) scale(1.03); } }
@keyframes clap-g { from { transform: translateX(0); } to { transform: translateX(12px); } }
@keyframes clap-d { from { transform: translateX(0); } to { transform: translateX(-12px); } }
@keyframes impact { 0%, 45% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
@keyframes chante { from { transform: scaleY(.4); } to { transform: scaleY(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .spectacle, .scene { transition: none; }
}

.progression { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .4rem; }
.spectacle:not([hidden]) + .progression { font-size: .92rem; }
.progression li { display: flex; gap: .6rem; align-items: baseline; color: var(--texte-2); }
.progression li::before { content: "○"; color: var(--ligne-forte); font-weight: 700; width: 1em; }
.progression li.en-cours { color: var(--encre); font-weight: 700; }
.progression li.en-cours::before { content: "●"; color: var(--accent); }
.progression li.fait { color: var(--encre); }
.progression li.fait::before { content: "✓"; color: var(--ajoute); }
.progression li.erreur::before { content: "!"; color: var(--ecarte); }

.tete-resultat { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.pochette { width: 96px; height: 96px; border-radius: 8px; flex: none; background: var(--ligne); object-fit: cover; }
.nom-zone { flex: 1; min-width: 0; }
.form-nom { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.nom-playlist {
  flex: 1 1 12rem; min-width: 0; font: 800 1.6rem/1.2 var(--police-titre) !important;
  border-color: transparent !important; background: transparent !important; padding: .25rem .4rem !important;
}
.nom-playlist:hover { border-color: var(--ligne) !important; }
.nom-playlist:focus { border-color: var(--encre) !important; background: var(--surface) !important; }
.infos { color: var(--texte-2); margin: .25rem 0 0 .4rem; }

.avertissements { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .4rem; }
.bloc-alertes { margin: 0 0 1rem; }
.actions-alertes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.comprises { background: var(--surface); border-radius: 16px; padding: .25rem 1rem; margin: 0 0 1rem; }
.comprises summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.liste-comprises { list-style: none; padding: 0; margin: 0 0 .75rem; display: grid; gap: .4rem; }
.liste-comprises li { display: flex; align-items: baseline; gap: .5rem; }
.liste-comprises .pastille { width: 10px; height: 10px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.liste-comprises .correction { color: var(--texte-2); font-style: italic; }
.form-proportions { display: grid; gap: .6rem; padding-bottom: 1rem; }
.ligne-curseur { display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; align-items: center; }
.ligne-curseur label { grid-column: 1 / -1; font-size: .95rem; }
.ligne-curseur input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.ligne-curseur output { font-weight: 700; min-width: 3.5em; text-align: right; }
.avertissements li { border-left: 4px solid var(--ecarte); padding: .35rem .75rem; background: var(--surface); border-radius: 0 8px 8px 0; }

.proportions { margin: 0 0 1.25rem; }
.barre { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: var(--ligne); gap: 2px; }
.barre span { display: block; height: 100%; min-width: 4px; }
.legende { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; }
.legende li { display: flex; align-items: center; gap: .4rem; }
.pastille { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.legende .voulu { color: var(--texte-2); }

.liens-ouvrir { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.publication {
  display: grid; gap: .75rem; padding: 1rem; background: var(--surface);
  border-radius: var(--rayon); border: 2px dashed var(--ligne-forte);
}
.publication .aide { margin: 0; }
.publication .bascule { justify-self: start; }
.ligne-visibilite { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .25rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

.segment-titres { margin-top: 1.5rem; }
.segment-titres h3 { display: flex; align-items: center; gap: .5rem; margin-top: 0; }
.liste-titres { list-style: none; margin: 0; padding: 0; }
.liste-titres li {
  display: grid; grid-template-columns: 1fr auto; gap: .1rem .75rem; padding: .6rem 0;
  border-bottom: 1px solid var(--ligne);
}
.liste-titres .t-titre { font-weight: 700; }
.liste-titres .t-artiste { color: var(--texte-2); grid-column: 1; }
.liste-titres .t-duree { grid-row: 1; grid-column: 2; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.liste-titres .t-marques { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; }
.marque-titre { font-size: .85rem; border: 1px solid var(--ligne-forte); border-radius: 999px; padding: 0 .5rem; color: var(--texte-2); }
.energie { display: inline-flex; align-items: center; gap: 3px; padding: 0 .25rem; }
.energie span { width: 6px; height: 12px; border-radius: 3px; background: var(--ligne); }
.energie span.plein { background: var(--accent); }
.rappel-ordre { margin: 0; font-size: .9rem; }
.aide-export { margin: .5rem 0 0; font-size: .9rem; }
.marque-titre.nouveau { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.marque-titre.demande { border-color: var(--ajoute); color: var(--ajoute); }
.marque-titre.alerte { border-color: var(--ecarte); color: var(--ecarte); }
.t-ajoute::before { content: "+ "; color: var(--ajoute); font-weight: 700; }

.ecartes { margin-top: 1.5rem; border-top: 2px solid var(--ligne); padding-top: .75rem; }
.ecartes summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; color: var(--ecarte); }
.ecartes ul { list-style: none; padding: 0; margin: 0; }
.ecartes li { padding: .45rem 0; border-bottom: 1px solid var(--ligne); }
.ecartes .raison { display: block; color: var(--ecarte); font-size: .95rem; }

.bloc { margin-top: 2rem; }
.ligne-dictee { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.ligne-dictee textarea { flex: 1 1 14rem; resize: vertical; }
.ligne-vivante { display: flex; gap: .5rem; flex-wrap: wrap; }
.ligne-vivante select { flex: 1 1 10rem; width: auto; }
.versions { padding-left: 1.2rem; margin: 0; }
.versions li { padding: .4rem 0; }
.versions .v-meta { color: var(--texte-2); }
.versions button { margin-left: .5rem; }

/* ---------- Résultat : la carte playlist ---------- */
.icones { position: absolute; width: 0; height: 0; overflow: hidden; }
.carte-playlist {
  display: grid; grid-template-columns: 112px 1fr; gap: .75rem 1rem;
  background: var(--surface); border-radius: 20px; padding: 1rem; margin-bottom: 1rem;
  animation: arrivee .5s ease both;
}
.pochette-zone { position: relative; align-self: start; }
.pochette-zone .pochette { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; display: block; }
.pochette-changer {
  display: grid; place-items: center; width: 44px; height: 44px; margin: .35rem auto 0; border-radius: 50%;
  border: 1px solid var(--ligne); background: var(--surface); color: var(--encre); cursor: pointer;
}
.pochette-changer:hover { background: var(--accent); color: #fff; }
/* sur téléphone : pochette + titre côte à côte, barre et action sur toute la largeur */
.carte-infos { display: contents; }
.carte-infos > * { grid-column: 2; min-width: 0; }
.carte-infos > .proportions, .carte-infos > .carte-action, .carte-infos > .form-nom { grid-column: 1 / -1; }
.pochette-zone { grid-row: 1 / span 2; }
.carte-infos > .surtitre { grid-row: 1; align-self: end; }
.carte-infos > .infos { grid-row: 2; align-self: start; }
.carte-infos > .form-nom { grid-row: 3; }

.surtitre { display: flex; align-items: center; gap: .6rem; margin: 0; }
.statut {
  font-size: .8rem; font-weight: 700; padding: .15rem .65rem; border-radius: 999px;
  background: var(--fond); color: var(--texte-2);
}
.statut.publiee { background: #E3F2EA; color: var(--ajoute); }
.mini-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.mini-eq span { width: 3px; height: 40%; border-radius: 2px; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .mini-eq span { animation: mini-eq .8s ease-in-out infinite alternate; }
  .mini-eq span:nth-child(2) { animation-delay: .2s; }
  .mini-eq span:nth-child(3) { animation-delay: .45s; }
  .mini-eq span:nth-child(4) { animation-delay: .1s; }
}
@keyframes mini-eq { from { height: 25%; } to { height: 100%; } }
@keyframes arrivee { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .carte-playlist { animation: none; } }

.carte-playlist .form-nom { display: flex; align-items: center; gap: .25rem; flex-wrap: nowrap; }
.carte-playlist .nom-playlist { font-size: 1.45rem !important; }
.btn-icone {
  display: none; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; cursor: pointer; place-items: center;
}
.form-nom.modifie .btn-icone { display: grid; }
.carte-playlist .infos { margin: 0 0 0 .4rem; }
.carte-playlist .proportions { margin: .25rem 0 0; }
.carte-playlist .legende { font-size: .9rem; gap: .25rem 1rem; }
.carte-playlist .legende strong { font-weight: 700; }
.carte-action { display: grid; gap: .4rem; margin-top: .25rem; }
.carte-action .btn-principal { gap: .5rem; }
.note { margin: 0; color: var(--texte-2); font-size: .9rem; }
.note a { color: var(--accent-fonce); font-weight: 700; }

@media (min-width: 560px) {
  .carte-playlist { grid-template-columns: 188px 1fr; padding: 1.25rem; gap: 1.25rem; }
  .pochette-zone { grid-row: auto; }
  .carte-infos > .form-nom, .carte-infos > .surtitre, .carte-infos > .infos { grid-column: auto; grid-row: auto; align-self: auto; }
  .carte-infos { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
  .carte-infos > * { grid-column: auto; }
  .carte-playlist .nom-playlist { font-size: 1.8rem !important; }
  .carte-action { margin-top: auto; padding-top: .25rem; }
}

/* ---------- Résultat : outils ---------- */
.outils { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .5rem; }
.bascule-ordre span { min-height: 40px; padding: 0 .8rem; font-size: .95rem; }
.outils-boutons { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 559px) {
  .outils { justify-content: flex-start; }
  .btn-outil { padding: 0 .75rem; font-size: .9rem; }
  .carte-playlist .infos { margin-left: 0; }
}
.btn-outil {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem;
  border-radius: 999px; border: 2px solid var(--ligne); background: transparent; color: var(--encre);
  font: 700 .95rem var(--police); cursor: pointer; text-decoration: none;
}
.btn-outil:hover { border-color: var(--encre); background: var(--surface); }
.btn-outil:disabled { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .btn-outil svg { transition: transform .25s ease; }
  .btn-outil:hover svg { transform: rotate(-14deg) scale(1.1); }
}
.message-action:empty { display: none; }

/* ---------- Résultat : la tracklist ---------- */
.tracklist { background: var(--surface); border-radius: 20px; padding: 1rem 0 .5rem; margin-top: .5rem; }
.tracklist-tete { padding: 0 1rem .6rem; }
.tracklist-tete h3 { margin: 0; }
.tracklist-tete p { margin: .2rem 0 0; color: var(--texte-2); font-size: .95rem; }
.pistes { list-style: none; margin: 0; padding: 0; }
.piste {
  display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; align-items: center; gap: .15rem .75rem;
  padding: .55rem 1rem .55rem .75rem; border-left: 4px solid var(--seg, var(--ligne));
}
.piste:hover { background: var(--fond); }
.piste .num { grid-column: 1; grid-row: 1 / span 2; color: var(--texte-2); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.piste .t-texte { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
.piste .t-titre { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piste .t-artiste { color: var(--texte-2); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piste .t-badges { grid-column: 2; grid-row: 2; display: flex; gap: .3rem; flex-wrap: wrap; }
.piste .energie { grid-column: 3; grid-row: 2; justify-self: end; }
.piste .t-duree { grid-column: 3; grid-row: 1; color: var(--texte-2); text-align: right; font-variant-numeric: tabular-nums; }
.badge { font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .05rem .55rem; }
.badge.nouveau { background: var(--accent); color: #fff; }
.badge.demande { background: #E3F2EA; color: var(--ajoute); }
.badge.alerte { background: #F7E4DC; color: var(--ecarte); width: 22px; height: 22px; padding: 0; display: inline-grid; place-items: center; cursor: help; }
@media (min-width: 560px) {
  .piste { grid-template-columns: 2rem minmax(0, 1fr) auto auto 3rem; }
  .piste .num { grid-row: 1; }
  .piste .t-badges { grid-column: 3; grid-row: 1; }
  .piste .energie { grid-column: 4; grid-row: 1; }
  .piste .t-duree { grid-column: 5; grid-row: 1; }
}
.ecartes summary { font-weight: 700; gap: .5rem; }
.ecartes summary::before { content: "▸"; display: inline-block; transition: transform .2s ease; }
.ecartes[open] summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .ecartes summary::before { transition: none; } }

/* ---------- Résultat : et ensuite ? ---------- */
.suite { display: grid; gap: 1rem; margin-top: 1rem; }
.carte-suite { background: var(--surface); border-radius: 20px; padding: 1rem; display: grid; gap: .6rem; align-content: start; }
.carte-suite h3 { margin: 0; }
@media (min-width: 760px) { .suite { grid-template-columns: 1fr 1fr; } .suite.une-carte { grid-template-columns: 1fr; } }
.bloc-versions { margin-top: 1rem; }
.bloc-versions h3 { margin: 0 0 .5rem; }
.versions { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.versions li {
  display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .5rem; padding: .25rem .9rem;
  background: var(--surface); border-radius: 999px; font-size: .9rem; min-height: 44px;
}
.versions li.actuelle { outline: 2px solid var(--accent); outline-offset: -2px; }
.versions .v-type { font-weight: 700; }
.versions .v-consigne { font-style: italic; }
.btn-lien {
  background: none; border: 0; padding: 0 .25rem; min-height: 44px; cursor: pointer;
  color: var(--accent-fonce); font: 700 .9rem var(--police); text-decoration: underline;
}

/* ---------- Accueil ---------- */
.accroche {
  font-family: var(--police-titre); font-weight: 800; font-size: 1.85rem; line-height: 1.1;
  letter-spacing: -.02em; margin: .25rem 0 1rem;
}
@media (max-width: 559px) { .accroche { font-size: 1.6rem; margin: .75rem 0 1.25rem; } }
.accroche span { color: var(--accent); }
.carte-prompt { background: var(--surface); border-radius: 20px; padding: 1rem; }
.carte-prompt .message-formulaire:empty { display: none; }
.carte-prompt #prompt { border-color: var(--ligne); background: var(--fond); }
.carte-prompt #prompt:focus { background: var(--surface); }
.idees { margin-top: 1.25rem; }
.idees-titre { font-weight: 700; margin: 0 0 .5rem; }
.puces-idees { display: flex; flex-wrap: wrap; gap: .5rem; }
.puce-idee {
  min-height: 44px; padding: .45rem .95rem; border-radius: 999px; cursor: pointer; text-align: left;
  border: 2px solid var(--ligne); background: transparent; color: var(--encre); font: 400 .95rem/1.3 var(--police);
}
.puce-idee:hover { border-color: var(--accent); background: var(--surface); }
.puce-idee { display: inline-flex; align-items: center; gap: .45rem; }
.etiquette-nouveau, .etiquette-sponso { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; flex: none; }
.etiquette-nouveau { background: var(--accent); color: #fff; }
.puce-idee.sponsorise { border-style: dashed; border-color: var(--ligne-forte); }
.etiquette-sponso { background: var(--ligne); color: var(--encre); }

.vide-titre { margin: 0 0 .75rem; }
.premiere { text-align: center; padding: 2rem 1rem; color: var(--texte-2); }
.premiere .vide-titre { color: var(--encre); }
.premiere-logo { width: 120px; height: 120px; margin: 0 auto 1rem; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .premiere-logo { animation: flotte 3.2s ease-in-out infinite alternate; }
}
@keyframes flotte { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-8px) rotate(4deg); } }
#voir-historique { margin-top: .5rem; }

/* ---------- Pochettes (accueil et historique) ---------- */
.grille-pochettes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .9rem; }
.carte-pochette { min-width: 0; }
.cp-ouvrir {
  display: flex; flex-direction: column; gap: .2rem; width: 100%; padding: 0; border: 0; background: none;
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.cp-image { position: relative; display: block; margin-bottom: .35rem; }
.cp-image img { width: 100%; height: auto; aspect-ratio: 1; display: block; border-radius: 12px; background: var(--ligne); }
@media (prefers-reduced-motion: no-preference) {
  .cp-image img { transition: transform .2s ease; }
  .cp-ouvrir:hover .cp-image img, .cp-ouvrir:focus-visible .cp-image img { transform: translateY(-4px) rotate(-1deg); }
}
.cp-statut {
  font-size: .75rem; font-weight: 700; padding: .05rem .55rem;
  border-radius: 999px; background: var(--ligne); color: var(--encre);
}
.cp-ligne { display: flex; align-items: center; gap: .35rem; margin-top: .15rem; }
.cp-statut.publiee { background: #E3F2EA; color: var(--ajoute); }
.cp-vivante {
  width: 22px; height: 22px; border-radius: 50%; font-size: .85rem;
  display: grid; place-items: center; background: var(--surface); color: var(--accent); font-weight: 700;
}
.cp-nom {
  font-family: var(--police-titre); font-weight: 700; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cp-meta { color: var(--texte-2); font-size: .85rem; }
.cp-actions { display: flex; gap: .1rem; margin-top: .15rem; margin-left: -10px; }
.btn-icone-discret {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--texte-2);
  display: grid; place-items: center; cursor: pointer;
}
.btn-icone-discret:hover { background: var(--fond); color: var(--encre); }
.btn-icone-discret.danger:hover { color: var(--ecarte); }
.grille-historique { margin-top: .5rem; }

/* ---------- Mes goûts ---------- */
.gouts-intro { font-family: var(--police-titre); font-weight: 700; font-size: 1.15rem; margin: 0 0 1rem; }
.carte-panneau { background: var(--fond); border-radius: 16px; padding: 1rem; margin: 0 0 1rem; display: grid; gap: .6rem; }
.carte-panneau h3, .mes-regles h3 { margin: 0; }
.carte-panneau .message-formulaire:empty { display: none; }
.carte-panneau textarea { background: var(--surface); }
.puces-idees.petites { gap: .4rem; }
.puces-idees.petites .puce-idee { font-size: .85rem; padding: .3rem .8rem; background: var(--surface); }
.mes-regles { margin: .5rem 0 1.25rem; display: grid; gap: .6rem; }
#etiquettes.etiquettes { margin: 0; gap: .5rem; }
#etiquettes .regle {
  display: inline-flex; align-items: center; gap: .5rem; padding: 0 0 0 .9rem; border-radius: 999px; font-weight: 700;
  background: var(--ligne); color: var(--encre);
}
.regle-type { font-size: .72rem; font-weight: 700; opacity: .8; }
.regle-texte { font-size: .95rem; }
#etiquettes .regle.interdit { background: #F7E4DC; color: var(--ecarte); }
#etiquettes .regle.filtre { background: #E3F2EA; color: var(--ajoute); }
#etiquettes .regle.decouverte { background: #FBE3EF; color: var(--accent-fonce); }
.regle-suppr {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: inherit;
  font-size: 1.3rem; cursor: pointer; opacity: .7;
}
.regle-suppr:hover { opacity: 1; background: rgba(34, 28, 61, .08); }
#etiquettes .regles-vide { background: none; padding: 0; font-weight: 400; color: var(--texte-2); }
.etat-compte { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 700; }
.voyant { width: 10px; height: 10px; border-radius: 50%; background: var(--ecarte); flex: none; }
.etat-compte.connecte .voyant { background: var(--ajoute); }

/* ---------- Panneaux ---------- */
.panneau {
  position: fixed; inset: 0; z-index: 20; background: var(--surface); overflow-y: auto;
  padding: 12px 16px 32px;
}
.panneau-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.panneau-tete h2 { margin: 0; }
.voile { position: fixed; inset: 0; background: rgba(34, 28, 61, .35); z-index: 15; }

.historique { list-style: none; margin: 0; padding: 0; }
.historique li { border-bottom: 1px solid var(--ligne); padding: .75rem 0; }
.historique .h-ouvrir {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: .25rem 0;
  font: inherit; color: inherit; cursor: pointer; min-height: 44px;
}
.historique .h-nom { font-family: var(--police-titre); font-weight: 700; font-size: 1.1rem; display: block; }
.historique .h-prompt { display: block; }
.historique .h-meta { display: block; color: var(--texte-2); font-size: .9rem; }
.historique .h-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; }
.historique .h-actions a, .historique .h-actions button { min-height: 44px; }

.etiquettes { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.etiquettes li {
  display: inline-flex; align-items: center; gap: .25rem; background: var(--fond);
  border-radius: 999px; padding-left: .9rem; font-weight: 700;
}
.etiquettes button {
  width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; cursor: pointer;
  font-size: 1.3rem; color: var(--texte-2);
}
.etiquettes button:hover { color: var(--ecarte); }
.case { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; cursor: pointer; }
.case input { width: 22px; height: 22px; margin-top: .15rem; accent-color: var(--accent); flex: none; }

/* ---------- Configuration ---------- */
.titre-ecran { font-size: 1.8rem; }
.intro { color: var(--texte-2); max-width: 44rem; }
.etape-config { background: var(--surface); border-radius: var(--rayon); padding: 1rem; margin-top: 1rem; max-width: 44rem; }
.etape-config h3 { margin-top: 0; }
.ligne-cle { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.ligne-cle input { flex: 1 1 14rem; width: auto; }
.statut-cle { margin: .5rem 0 0; font-weight: 700; min-height: 1.5em; }
.statut-cle.ok { color: var(--ajoute); }
.statut-cle.ko { color: var(--ecarte); }
.choix-plateforme { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix-plateforme button[aria-checked="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }

.annonce {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30;
  background: var(--encre); color: #fff; padding: .7rem 1.1rem; border-radius: 999px;
  font-weight: 700; max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.annonce.visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .annonce { transition: none; } }

/* ---------- Ordinateur ---------- */
@media (min-width: 960px) {
  .entete { padding: 20px 32px; }
  .marque { font-size: 2.6rem; gap: .7rem; }
  .marque .logo { width: 56px; height: 56px; }
  .principal {
    display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; gap: 3rem; padding: 0 32px 64px;
    align-items: start;
  }
  .colonne-prompt { position: sticky; top: 16px; }
  .colonne-resultats { margin-top: 0; }
  .vide { padding: 3.6rem 0 0; }
  .accroche { font-size: 2.3rem; }
  .panneau { inset: 0 0 0 auto; width: min(440px, 100%); padding: 20px 24px 40px; border-left: 2px solid var(--ligne); }
  .config { padding: 0 32px 64px; }
}

/* ---------- accès famille ---------- */
.acces { max-width: 30rem; margin: 0 auto; padding: 1.5rem 16px 3rem; display: grid; justify-items: center; gap: 1rem; text-align: center; }
.acces .accroche { margin: 0; }
.carte-acces { width: 100%; display: grid; gap: .6rem; text-align: left; }
.carte-acces h3 { margin: 0; }
.carte-acces input { min-height: 44px; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: .5rem .75rem; font: inherit; background: var(--fond); }
.carte-acces input:focus { background: var(--surface); }
.carte-acces .message-formulaire:empty { display: none; }
#zone-code-installation { display: grid; gap: .4rem; }
#zone-code-installation[hidden] { display: none; }
.code-acces { margin: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: .04em; color: var(--accent-fonce); background: var(--fond); border: 2px dashed var(--ligne-forte); border-radius: var(--rayon); padding: .6rem .8rem; text-align: center; user-select: all; overflow-wrap: anywhere; }
.code-acces.petit { display: inline-block; font-size: 1.1rem; padding: .15rem .5rem; }
.famille { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.famille li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: 44px; border-bottom: 1px solid var(--ligne); }
.famille .membre-nom { flex: 1 1 10rem; font-weight: 700; }
.btn-lien.danger { color: var(--ecarte); }
.code-membre { display: grid; gap: .4rem; background: var(--surface); border-radius: var(--rayon); padding: .75rem; }
.code-membre[hidden] { display: none; }
#form-membre { display: flex; flex-wrap: wrap; gap: .5rem; }
#form-membre[hidden] { display: none; }
#form-membre input { flex: 1 1 10rem; min-height: 44px; border: 2px solid var(--ligne); border-radius: var(--rayon); padding: .5rem .75rem; font: inherit; }

/* ---------- pied de page et pages légales (édition publique) ---------- */
.pied { text-align: center; padding: 1.5rem 16px 2rem; font-size: .9rem; color: var(--texte-2); }
.pied a { color: inherit; }
.page-legale main { max-width: 42rem; margin: 0 auto; padding: 1.5rem 16px 3rem; line-height: 1.6; }
.page-legale h1 { font-family: var(--police-titre); }
.page-legale h2 { font-size: 1.15rem; margin-top: 1.75rem; }
.page-legale a { color: var(--accent-fonce); }
.btn-lien.danger { color: var(--ecarte); }

/* ---------- préparation : demande verrouillée, annulation ---------- */
#prompt[readonly] { background: var(--fond); color: var(--texte-2); cursor: not-allowed; }
.micro:disabled { opacity: .45; cursor: not-allowed; }
.btn-annuler { display: block; margin: .5rem auto 0; min-height: 44px; }
.btn-annuler[hidden] { display: none; }

/* ---------- retirer un titre ---------- */
.btn-retirer {
  grid-column: 4; grid-row: 1 / span 2; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: none; color: var(--texte-2); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.btn-retirer:hover, .btn-retirer:focus-visible { background: #F7E4DC; color: var(--ecarte); }
.piste { grid-template-columns: 1.8rem minmax(0, 1fr) auto 44px; }
@media (min-width: 560px) {
  .piste { grid-template-columns: 2rem minmax(0, 1fr) auto auto 3rem 44px; }
  .btn-retirer { grid-column: 6; grid-row: 1; }
}
.surtitre .btn-icone-discret { margin-left: auto; }
