:root {
  --noir: #111; --rouge: #C40000; --rouge-fonce: #9A0000; --gris: #5A5A5A;
  --fond: #F5F5F5; --carte: #fff; --bord: #DCDCDC; --rayon: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--noir); font: 400 17px/1.6 'Work Sans', system-ui, sans-serif; }
#app, .seul { max-width: 680px; margin: 0 auto; padding: 20px 16px 60px; }
.seul { padding-top: 60px; }
.tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.marque { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.marque::after { content: '.'; color: var(--rouge); }
.compteur { margin: 0; color: var(--gris); font-size: 14px; font-variant-numeric: tabular-nums; }
.barre { height: 4px; background: var(--bord); border-radius: 4px; overflow: hidden; margin-bottom: 22px; }
.barre span { display: block; height: 100%; background: var(--rouge); transition: width .35s ease; }
.carte { background: var(--carte); border-radius: var(--rayon); padding: 30px 26px; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.05); }
h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.chapo { color: var(--gris); margin: 0 0 22px; }
.note, .aide { color: var(--gris); font-size: 15px; }
.aide { margin: -4px 0 10px; }
.liste-intro { padding: 0; list-style: none; margin: 0 0 18px; }
.liste-intro li { padding: 10px 0 10px 30px; border-bottom: 1px solid #eee; position: relative; }
.liste-intro li::before { content: ''; position: absolute; left: 4px; top: 19px; width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); }
.cache { display: none !important; }
input.cache { display: block !important; position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.depot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 2px dashed var(--bord); border-radius: var(--rayon); padding: 28px 16px; cursor: pointer; transition: border-color .2s, background .2s; }
.depot:hover, .depot.survol { border-color: var(--rouge); background: #fff6f6; }
.depot-icone { color: var(--rouge); }
.depot-aide { color: var(--gris); font-size: 14px; }
.bloc-depot { margin-bottom: 14px; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.vignette { position: relative; background: var(--fond); border-radius: 12px; overflow: hidden; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vignette .ext { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--gris); }
.v-nom { position: relative; font-size: 11px; line-height: 1.3; padding: 4px 6px; background: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vignette.en-cours { opacity: .55; }
.vignette.erreur .v-nom { color: var(--rouge); font-weight: 600; white-space: normal; }
.v-retirer { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.ligne-site .v-retirer, .pastille .v-retirer { position: static; background: #eee; color: var(--noir); flex: none; }

.case, .option { display: flex; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; }
.case input, .option input { width: 22px; height: 22px; accent-color: var(--rouge); flex: none; margin: 0; }
.options { border: 1px solid var(--bord); border-radius: 14px; padding: 2px 16px; margin-bottom: 16px; }
.option + .option { border-top: 1px solid #eee; }
.sous-bloc { margin-bottom: 18px; }
.pastilles { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pastille { display: flex; align-items: center; gap: 8px; }
.p-rond { width: 52px; height: 52px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--bord); position: relative; overflow: hidden; cursor: pointer; }
.p-rond input { position: absolute; inset: -10px; width: 80px; height: 80px; opacity: 0; cursor: pointer; }
.p-code { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--gris); }
.p-ajout { background: none; border: 1px dashed var(--bord); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 15px; cursor: pointer; color: var(--noir); }
.p-ajout:hover { border-color: var(--rouge); color: var(--rouge); }

.champ { display: block; margin-bottom: 16px; }
.champ > span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
textarea, input[type=url], input[type=text] { width: 100%; font: inherit; font-size: 16px; color: inherit; border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; background: #fff; }
textarea { resize: vertical; min-height: 64px; }
textarea:focus, input:focus { outline: 2px solid var(--rouge); outline-offset: 1px; border-color: transparent; }
.lignes { display: flex; flex-direction: column; gap: 12px; }
.ligne-site { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; align-items: center; }
.ligne-site:only-child, .ligne-site:has(+ .p-ajout):first-child { grid-template-columns: 1fr 1.3fr; }
.lignes .p-ajout { align-self: flex-start; }

.resume { list-style: none; padding: 0; margin: 0 0 18px; }
.resume li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.resume b { font-weight: 600; text-align: right; }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.bouton { background: var(--rouge); color: #fff; border: 0; border-radius: 999px; padding: 15px 30px; font: 600 15px 'Work Sans', sans-serif; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; transition: background .2s; }
.bouton:hover { background: var(--rouge-fonce); }
.bouton:disabled { opacity: .6; cursor: wait; }
.lien { background: none; border: 0; font: inherit; color: var(--gris); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px 0; }
a { color: var(--rouge); }

@media (max-width: 560px) {
  .carte { padding: 24px 18px; border-radius: 16px; }
  h1 { font-size: 26px; }
  .ligne-site, .ligne-site:only-child { grid-template-columns: 1fr auto; }
  .ligne-site input[type=text] { grid-column: 1 / 2; }
  .bouton { padding: 15px 24px; }
}
