/* amytop - feuille de style commune (sans dépendance) */
:root {
    --fond: #0f0c26;
    --fond-2: #1b1640;
    --carte: #221c4d;
    --bord: #352d6e;
    --texte: #f1efff;
    --gris: #b5b0d8;
    --or: #facc15;
    --violet: #8b5cf6;
    --rayon: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--texte); background: radial-gradient(circle at 15% 0, #2a2170 0, transparent 40%), var(--fond); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--or); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--or); color: #111; padding: .4rem .8rem; border-radius: 8px; z-index: 10; }

.entete { background: rgba(15, 12, 38, .9); border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.logo { color: var(--texte); text-decoration: none; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.logo b { color: var(--or); }
.entete nav { display: flex; gap: 1rem; }
.entete nav a { color: var(--gris); text-decoration: none; font-weight: 600; }
.entete nav a[aria-current="page"], .entete nav a:hover { color: var(--texte); }

main { flex: 1; padding-top: 2rem; padding-bottom: 3rem; }
h1 { font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .75rem; }
h2 { font-size: 1.3rem; margin: 0 0 .5rem; }

.hero { text-align: center; padding: 2rem 0 1.5rem; }
.intro { color: var(--gris); font-size: 1.1rem; max-width: 680px; margin: 0 auto; }

.outils { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.carte-outil { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; }
.carte-outil .emoji { font-size: 2rem; }
.carte-outil p { color: var(--gris); margin: .25rem 0; }
.carte-outil .etat { display: inline-block; margin-top: .5rem; font-size: .85rem; font-weight: 700; color: var(--or); background: rgba(250, 204, 21, .1); border: 1px solid rgba(250, 204, 21, .3); border-radius: 999px; padding: .1rem .7rem; }

.note-vie-privee { text-align: center; color: var(--gris); font-size: .95rem; }

.faq { max-width: 760px; margin: 2rem auto 0; }
.faq details { background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { color: var(--gris); margin: .6rem 0 0; }

.bloc { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.25rem; max-width: 760px; }
.prose h2 { margin-top: 1.25rem; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .4rem; }

.bouton { display: inline-block; background: var(--or); color: #111; border: 0; border-radius: 12px; padding: .7rem 1.3rem; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; }
.formulaire label { display: block; margin-bottom: .9rem; font-weight: 600; }
.formulaire small { color: var(--gris); font-weight: 400; }
.formulaire input, .formulaire select, .formulaire textarea { display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--bord); background: var(--fond-2); color: var(--texte); font: inherit; }
.formulaire .piege { position: absolute; left: -9999px; }
.note { color: var(--gris); font-size: .9rem; }
.alertes { color: #fca5a5; padding-left: 1.2rem; }

.pied { border-top: 1px solid var(--bord); color: var(--gris); font-size: .9rem; padding: 1.5rem 0; }
.pied a { color: var(--gris); }

/* ---------- Commun (phase 1) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bouton-grand { font-size: 1.1rem; padding: .85rem 1.6rem; }
.bouton-sec { display: inline-block; background: transparent; color: var(--texte); border: 1px solid var(--bord); border-radius: 12px; padding: .6rem 1rem; font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; font-family: inherit; }
.bouton-sec:hover { border-color: var(--violet); }
.bouton:focus-visible, .bouton-sec:focus-visible, .ed-el:focus-visible, .ed-etiquette:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.carte-outil.actif { border-color: var(--or); }
.carte-outil.actif h2 a { color: var(--texte); text-decoration: none; }
.carte-outil.actif .etat { color: #4ade80; background: rgba(74, 222, 128, .1); border-color: rgba(74, 222, 128, .35); }
.fil { color: var(--gris); font-size: .9rem; margin-bottom: .5rem; }
.fil a { color: var(--gris); }
.entete-page { max-width: 820px; }
.resume { color: var(--gris); font-size: 1.05rem; margin: 0 0 1.25rem; }
.bloc-modeles, .prose-page { margin-top: 2.5rem; }
.grille-modeles { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.carte-modele { display: flex; flex-direction: column; gap: .2rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: .9rem 1rem; color: var(--texte); text-decoration: none; font-weight: 700; height: 100%; }
.carte-modele:hover { border-color: var(--or); }
.carte-modele .emoji { font-size: 1.6rem; }
.carte-modele small { color: var(--gris); font-weight: 400; }
.criteres { width: 100%; max-width: 760px; border-collapse: collapse; background: var(--carte); border-radius: 12px; overflow: hidden; }
.criteres th, .criteres td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--bord); }
.criteres th { color: var(--or); }
/* Éléments d'un modèle (image + description) et crédits des photos */
.elements { margin-top: 2.5rem; }
.grille-elements { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.grille-elements li { display: flex; gap: .75rem; align-items: flex-start; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: .6rem; }
.grille-elements img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; background: #2d2566; }
.grille-elements h3 { margin: 0 0 .2rem; font-size: 1rem; }
.grille-elements p { margin: 0; color: var(--gris); font-size: .86rem; line-height: 1.4; }
.note-credits { font-size: .85rem; margin-top: .8rem; }
.tableau-defilant { overflow-x: auto; }
.credits table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.credits th, .credits td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.credits th { color: var(--or); }
.credits td img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: .4rem; }
.etapes li { margin-bottom: .4rem; }
.lien-partenaire { margin-top: 1.5rem; }
.langues { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: .75rem; }
.langues a { text-decoration: none; }
.langues a[aria-current] { color: var(--texte); font-weight: 700; }

/* ---------- Éditeur de tier list ---------- */
.editeur { margin: 0 0 1rem; }
.ed-titre { width: 100%; font: inherit; font-size: 1.3rem; font-weight: 800; color: var(--texte); background: transparent; border: 1px dashed var(--bord); border-radius: 10px; padding: .5rem .7rem; margin-bottom: .75rem; }
.ed-titre:focus { border-style: solid; border-color: var(--violet); outline: none; }
.ed-tableau { border-radius: 12px; overflow: hidden; border: 1px solid var(--bord); }
.ed-rangee { display: flex; min-height: 112px; background: var(--fond-2); border-bottom: 2px solid var(--fond); }
.ed-rangee:last-child { border-bottom: 0; }
.ed-etiquette { flex: 0 0 84px; display: flex; align-items: center; justify-content: center; text-align: center; color: #111; font-family: inherit; font-weight: 800; font-size: 1.35rem; line-height: 1.1; border: 0; padding: .3rem; cursor: pointer; overflow-wrap: anywhere; }
.ed-zone { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 6px; min-height: 112px; position: relative; }
.ed-zone:empty::before { content: attr(data-vide); color: rgba(181, 176, 216, .45); font-size: .85rem; align-self: center; padding-left: .4rem; pointer-events: none; }
.ed-el { width: 100px; height: 100px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; border-radius: 8px; background: #2d2566; border: 1px solid #463c8c; color: var(--texte); font-size: .80rem; font-weight: 700; line-height: 1.15; overflow: hidden; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.ed-el-image { padding: 0; }
.ed-el-image img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ed-el-image { position: relative; }
.ed-legende { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 3px; background: rgba(15, 11, 38, .78); color: #fff; font-size: .56rem; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ed-el.ed-choisi { outline: 3px solid var(--or); outline-offset: 1px; }
.ed-el.ed-place { opacity: .3; }
.ed-fantome { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; cursor: grabbing; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); opacity: .95; }
.ed-ajout-rangee { margin: .6rem 0 0; }
.ed-bloc-reserve { margin-top: 1.25rem; background: var(--carte); border: 1px solid var(--bord); border-radius: 14px; padding: 1rem; }
.ed-sous-titre { font-size: 1.05rem; margin-bottom: .5rem; }
.ed-reserve { background: var(--fond-2); border-radius: 10px; min-height: 112px; }
.ed-ajout { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.ed-ajout-texte { flex: 1 1 200px; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--bord); background: var(--fond-2); color: var(--texte); font: inherit; }
.ed-images { position: relative; overflow: hidden; }
.ed-images input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-aide { color: var(--gris); font-size: .88rem; margin: .6rem 0 0; }
.ed-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ed-actions button { font-family: inherit; }
.ed-message { min-height: 1.4em; color: #4ade80; font-weight: 600; margin: .5rem 0 0; }
.ed-choix { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 40; width: min(640px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; background: #2a2170; border: 1px solid var(--or); border-radius: 14px; padding: .6rem .8rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.ed-choix[hidden] { display: none; }
.ed-choix-boutons { display: flex; gap: .4rem; }
.ed-choix button { background: var(--fond-2); color: var(--texte); border: 1px solid var(--bord); border-radius: 10px; padding: .4rem .7rem; font: inherit; font-size: .88rem; cursor: pointer; }
.ed-dialogue { background: var(--carte); color: var(--texte); border: 1px solid var(--bord); border-radius: 16px; padding: 1.25rem; width: min(520px, calc(100% - 32px)); }
.ed-dialogue::backdrop { background: rgba(5, 3, 20, .7); }
.ed-dialogue label { display: block; margin-bottom: .8rem; font-weight: 600; }
.ed-dialogue input[type="text"] { display: block; width: 100%; margin-top: .3rem; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--bord); background: var(--fond-2); color: var(--texte); font: inherit; }
.ed-dialogue input[type="color"] { display: block; margin-top: .3rem; width: 64px; height: 40px; border: 0; background: none; cursor: pointer; }
.ed-dialogue-boutons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.ed-dialogue-export { width: min(720px, calc(100% - 32px)); }
.ed-dialogue-export img { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto .75rem; border-radius: 8px; }
@media (max-width: 600px) {
    .ed-etiquette { flex-basis: 58px; font-size: 1.1rem; }
    .ed-el { width: 62px; height: 62px; font-size: .62rem; }
    .ed-rangee, .ed-zone { min-height: 66px; }
    .ed-zone { gap: 4px; padding: 4px; }
    .ed-actions .bouton, .ed-actions .bouton-sec { flex: 1 1 calc(50% - .5rem); text-align: center; }
}
