/* Charte Buddy Concept Store (thème Blocksy du site) : bleu #1559ed, bleu nuit #012066, jaune #FFF572, Avenir. */
:root {
  --bleu: #1559ed; --nuit: #012066; --jaune: #fff572;
  --fond: #f2f6ff; --carte: #ffffff; --texte: #012066; --discret: #4a5a85; --bord: #d5e0fb;
  --accent: var(--bleu); --accent-texte: #ffffff; --rouge: #c62828; --vert: #1b7f3b; --orange: #b45309;
  --rayon: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte);
       font: 17px/1.45 "Avenir Next", Avenir, "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 18px 16px 48px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: .4em 0 .6em; font-weight: 800; }
h2 { font-size: 1.12rem; margin: 1.2em 0 .5em; font-weight: 700; }
.carte h2 { margin-top: 0; }
small { color: var(--discret); font-size: .85em; }
a { color: var(--bleu); }

header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
         justify-content: space-between; padding: 8px 12px; background: var(--bleu); }
header nav { display: flex; gap: 2px; align-items: center; }
header nav a, header nav .lien { padding: 8px 10px; border-radius: 10px; text-decoration: none; color: #fff; font-size: .95rem; font-weight: 600; }
header nav a[aria-current] { background: var(--jaune); color: var(--nuit); }
header form { margin: 0; }
.marque { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 800; letter-spacing: .02em; }
.marque img { display: block; height: 40px; width: auto; }

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; margin: 0 0 14px;
         box-shadow: 0 1px 2px rgba(1, 32, 102, .05); }
.etroite { max-width: 380px; margin: 8vh auto 0; }
.connexion { text-align: center; }
.connexion img { width: 170px; height: auto; margin: 4px auto 6px; display: block; }
.connexion h1 { margin-top: 0; }
.connexion label { text-align: left; }
label { display: block; margin: 0 0 12px; font-size: .95rem; color: var(--discret); }
input { display: block; width: 100%; margin-top: 4px; padding: 12px; font: inherit; color: var(--texte);
        background: #fff; border: 1.5px solid var(--bord); border-radius: 12px; min-height: 48px; }
input:focus { border-color: var(--bleu); outline: none; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; box-shadow: 0 0 0 5px var(--nuit); }
button { display: block; width: 100%; min-height: 50px; padding: 12px 16px; font: inherit; font-weight: 700; cursor: pointer;
         color: var(--accent-texte); background: var(--accent); border: 0; border-radius: 999px; text-align: center; }
button:active { background: var(--nuit); }
button.secondaire { background: #fff; color: var(--bleu); border: 2px solid var(--bleu); border-radius: 14px; text-align: left; }
button.lien { width: auto; min-height: 44px; background: none; color: var(--discret); font-weight: 400; text-decoration: underline; padding: 8px 0; }
header button.lien { padding: 8px 10px; text-decoration: none; color: #fff; font-weight: 600; }
.carte form + form, .choix { margin-top: 8px; }

.grand { font-size: 3.2rem; font-weight: 800; line-height: 1; margin: .2em 0 .3em; color: var(--bleu); }
.grand.rouge { color: var(--rouge); }
.grand small { font-size: 1rem; font-weight: 500; }
.discret { color: var(--discret); font-size: .92rem; }
.rouge { color: var(--rouge); }
.vert { color: var(--vert); }
.flash { background: var(--jaune); color: var(--nuit); font-weight: 600; padding: 12px 16px; border-radius: 12px; }
.alerte { color: var(--orange); font-weight: 700; margin: 0 0 10px; }
.essai { background: var(--jaune); color: var(--nuit); font-weight: 600; padding: 10px 14px; border-radius: 12px; margin: 0 0 14px; }
.retour { display: inline-block; padding: 8px 0; text-decoration: none; font-weight: 600; }

.actions { display: grid; gap: 14px; }
@media (min-width: 720px) { .actions { grid-template-columns: repeat(3, 1fr); } .actions .carte { margin: 0; } }

.tuiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.tuile { display: flex; flex-direction: column; gap: 2px; padding: 16px; min-height: 110px; text-decoration: none; color: var(--texte);
         background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); font-weight: 500; }
.tuile b { font-size: 2rem; line-height: 1.1; color: var(--bleu); font-weight: 800; }
.tuile.orange { background: var(--jaune); border-color: var(--jaune); }
.tuile.orange b { color: var(--nuit); }

.recherche { margin: 0 0 10px; }
.filtres { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.filtres a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--bord); background: #fff; text-decoration: none; color: var(--texte); font-size: .9rem; font-weight: 600; }
.filtres a.actif { background: var(--nuit); border-color: var(--nuit); color: var(--jaune); }

.liste { list-style: none; margin: 0; padding: 0; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.liste li + li { border-top: 1px solid var(--bord); }
.liste a { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 14px; min-height: 52px; color: var(--texte); text-decoration: none; }
.liste b { flex: none; min-width: 2.5ch; text-align: right; font-size: 1.1rem; color: var(--bleu); }
.liste b.rouge { color: var(--rouge); }

table { width: 100%; border-collapse: collapse; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); }
td { padding: 10px; border-top: 1px solid var(--bord); vertical-align: top; font-size: .95rem; }
tr:first-child td { border-top: 0; }
td:first-child { white-space: nowrap; color: var(--discret); width: 1%; }
td:nth-child(2) { white-space: nowrap; font-weight: 700; width: 1%; }
.panne { background: #fdecea; color: var(--rouge); font-weight: 700; padding: 10px 14px; border-radius: 12px; margin: 0 0 14px; }
.envoi { display: inline-block; color: var(--bleu); font-weight: 700; }
.lien-caisse { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: baseline; margin: -6px 0 10px; font-size: .92rem; color: var(--discret); }
.lien-caisse button.lien { padding: 4px 0; min-height: 0; font-size: .88rem; }

/* Page « Images » : photo actuelle à gauche, photo proposée à droite */
.photo h2 a { font-size: .85rem; font-weight: 500; margin-left: 6px; }
.photo .motif { margin: -4px 0 10px; color: var(--nuit); font-weight: 600; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.duo figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.duo figcaption { font-size: .85rem; font-weight: 700; color: var(--discret); text-transform: uppercase; letter-spacing: .03em; }
.duo img, .duo .vide { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f4f6fb; border-radius: 12px; border: 2px solid var(--bord); }
.duo .proposee img { border-color: var(--bleu); }
.duo .vide { display: grid; place-items: center; color: var(--discret); font-weight: 600; }
.duo small { color: var(--discret); font-size: .8rem; overflow-wrap: anywhere; }
.boutons { display: grid; gap: 8px; }
.boutons .refus { display: flex; gap: 8px; }
.boutons .refus input { flex: 1; min-width: 0; width: auto; margin: 0; }
.boutons .refus button { flex: none; width: auto; padding-left: 20px; padding-right: 20px; }
@media (min-width: 720px) { .boutons { grid-template-columns: 1fr 1.4fr; align-items: center; } }

/* Validation du catalogue */
.progres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0 0 18px; }
.progres a { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 10px 12px 14px; border: 1px solid var(--bord);
             border-radius: 12px; background: var(--carte); text-decoration: none; color: var(--texte); }
.progres a.actif { border: 2px solid var(--bleu); }
.progres a span { font-size: .9rem; font-weight: 700; }
.progres a b { font-size: 1.3rem; }
.progres a i { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--bleu); }
.progres a.fini i { background: var(--vert); }
.badge { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--fond);
         border: 1px solid var(--bord); color: var(--discret); font-size: .72rem; font-weight: 600; }
.badge.neuf { background: var(--jaune); color: var(--nuit); border-color: var(--jaune); }
.arbre .n2 { margin-left: 14px; }
.arbre .n3 { margin-left: 28px; }
.arbre .n1 { border-left: 5px solid var(--nuit); }
.noeud.ok, .question.ok, .produit-val.ok, .produit-val.autre, .produit-val.retirer, .produit-val.garder { border-color: #9fd3b1; background: #f6fbf8; }
.noeud.a_revoir { border-color: #f0c48a; background: #fffaf2; }
.noeud p { margin: .3em 0; }
.decision { color: var(--vert); font-weight: 600; font-size: .92rem; margin: .4em 0; }
.a_revoir .decision { color: var(--orange); }
details { margin: 8px 0; }
summary { cursor: pointer; color: var(--bleu); font-size: .95rem; padding: 6px 0; }
.options { display: grid; gap: 8px; margin: 0 0 12px; }
.options label { display: flex; gap: 10px; align-items: center; margin: 0; padding: 12px; border: 1px solid var(--bord); border-radius: 12px; color: var(--texte); cursor: pointer; }
.options input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--bleu); }
.options label:has(input:checked) { border: 2px solid var(--bleu); background: #eef3ff; }
select { display: block; width: 100%; min-height: 48px; padding: 10px; font: inherit; color: var(--texte); background: #fff; border: 1px solid var(--bord); border-radius: 12px; }
.filtre-rubrique { margin-bottom: 8px; }
.produit-val { display: flex; gap: 12px; align-items: flex-start; }
.produit-val > img { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--bord); background: #fff; }
.produit-val > div { flex: 1; min-width: 0; }
.produit-val h2 { font-size: 1rem; }
.produit-val p { margin: .3em 0; }
.produit-val .boutons .refus select { flex: 1; min-width: 0; width: auto; }
.choix-retrait input { margin-bottom: 8px; }
.boutons.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.boutons.trois button { width: 100%; padding-left: 6px; padding-right: 6px; text-align: center; font-size: .92rem; }
button.choisi { outline: 3px solid var(--vert); outline-offset: 1px; }
@media (max-width: 480px) { .produit-val > img { width: 56px; height: 56px; } .arbre .n3 { margin-left: 16px; } .arbre .n2 { margin-left: 8px; } }
.boutons > * { min-width: 0; }
.boutons select { max-width: 100%; text-overflow: ellipsis; }
.carte[id] { scroll-margin-top: 130px; } /* sous l'en-tête collant, après un clic */
