/* Eryeus : même design que l'app (gris clair, blanc, noir, orange Claude, police Archivo). Pas de mode nuit. */
@font-face { font-family: Archivo; font-weight: 400; font-display: swap; src: url(/fonts/archivo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 700; font-display: swap; src: url(/fonts/archivo-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Archivo; font-weight: 900; font-display: swap; src: url(/fonts/archivo-latin-900-normal.woff2) format('woff2'); }
:root {
  --fond: #E6E6E6; --blanc: #FFFFFF; --carte2: #EFEFEF; --survol: #D6D6D6; --piste: #CFCFCF; --filet: #C4C4C4;
  --encre: #0D0D0D; --texte: #2A2A2A; --doux: #6B6B6B; --pale: #A3A3A3;
  --orange: #D97757; --orange2: #C6613F; --ok: #2f8a52;
  --ressort: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fond); color: var(--encre); font-family: Archivo, 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--orange); color: #fff; }
.page { max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; }

/* ---------- en-tête ---------- */
header.haut { position: sticky; top: 0; z-index: 20; background: rgba(230, 230, 230, .86); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
header.haut.ombre { border-bottom-color: var(--filet); }
header.haut .ligne { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.logo img { width: 32px; height: 32px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; align-items: center; }
nav a { text-decoration: none; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; color: var(--doux); transition: background .15s, color .15s; }
nav a:hover { background: var(--survol); color: var(--encre); } nav a.actif { color: var(--encre); background: var(--carte2); }
select.langue { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--filet); background: var(--blanc); font-weight: 700; font-size: 13px; cursor: pointer; }

/* ---------- boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 22px; border-radius: 999px; border: 0; background: var(--encre); color: var(--fond); font-weight: 900; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .18s var(--ressort), background .2s, box-shadow .2s; }
.bouton:hover { transform: translateY(-1px); }
.bouton:active { transform: scale(.97); }
.bouton.orange { background: var(--orange); color: #fff; box-shadow: 0 10px 30px rgba(217, 119, 87, .32); }
.bouton.orange:hover { background: var(--orange2); box-shadow: 0 14px 36px rgba(217, 119, 87, .42); }
.bouton.leger { background: var(--blanc); color: var(--encre); border: 1px solid var(--filet); }
.bouton.leger:hover { border-color: var(--encre); }
.bouton:disabled { opacity: .45; cursor: default; transform: none; }
.bouton svg { width: 20px; height: 20px; }

/* ---------- accueil ---------- */
.heros { position: relative; text-align: center; padding: 70px 0 40px; overflow: hidden; }
.heros::before { content: ''; position: absolute; inset: -20% 10% auto; height: 520px; background: radial-gradient(closest-side, rgba(217, 119, 87, .22), transparent 70%); z-index: -1; animation: halo 6s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.08); opacity: .8; } }
.heros .grand-logo { width: clamp(120px, 18vw, 180px); height: auto; filter: drop-shadow(0 18px 40px rgba(13, 13, 13, .25)); animation: flotte 5s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-10px) rotate(4deg); } }
.heros h1 { font-size: clamp(56px, 11vw, 132px); line-height: .92; margin: 22px 0 14px; letter-spacing: -0.045em; font-weight: 900; }
.heros .slogan { font-size: clamp(19px, 2.6vw, 26px); font-weight: 900; margin: 0 auto 12px; max-width: 760px; letter-spacing: -.01em; }
.heros .description { font-size: 17px; line-height: 1.6; color: var(--doux); max-width: 640px; margin: 0 auto 30px; }
.telechargements { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.telechargements .bouton { min-height: 64px; padding: 16px 30px; font-size: 17px; border-radius: 22px; }
.telechargements .bouton small { display: block; font-size: 11.5px; font-weight: 700; opacity: .85; }
.telechargements .bouton span { text-align: left; line-height: 1.15; }
.note { color: var(--doux); font-size: 13px; margin-top: 16px; }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 30px; }
.bloc-carte { background: var(--blanc); border: 1px solid var(--filet); border-radius: 26px; padding: 22px; transition: transform .2s var(--ressort), border-color .2s; }
.bloc-carte:hover { transform: translateY(-3px); border-color: var(--encre); }
.bloc-carte .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--encre); color: var(--fond); font-weight: 900; margin-bottom: 14px; }
.bloc-carte b { display: block; font-size: 17px; margin-bottom: 6px; } .bloc-carte span { color: var(--doux); font-size: 14.5px; line-height: 1.55; }
h2.titre { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.02em; margin: 70px 0 8px; }
p.sous-titre { color: var(--doux); font-size: 16px; margin: 0 0 22px; max-width: 640px; line-height: 1.55; }

/* ---------- workshop ---------- */
h1.page-titre { font-size: clamp(40px, 7vw, 76px); letter-spacing: -.035em; margin: 40px 0 10px; }
.outils { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.outils input[type=search] { flex: 1 1 260px; min-width: 0; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--filet); background: var(--blanc); }
.outils input[type=search]:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce { min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--filet); background: var(--blanc); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .15s; }
.puce.sel { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.carte { background: var(--blanc); border: 1px solid var(--filet); border-radius: 24px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .2s var(--ressort), border-color .2s; }
.carte:hover { transform: translateY(-3px); border-color: var(--encre); }
.carte .vignette { aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 42%, #3b2b24, #100d0c 78%); overflow: hidden; }
.carte .vignette img { width: 100%; height: 100%; object-fit: cover; }
.carte .infos { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; }
.carte .infos b { font-size: 15.5px; } .carte .infos small { color: var(--doux); font-size: 12.5px; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: var(--carte2); color: var(--texte); }
.badge.orange { background: var(--orange); color: #fff; } .badge.noir { background: var(--encre); color: var(--fond); }
.vide { padding: 50px 20px; text-align: center; color: var(--doux); border: 1px dashed var(--pale); border-radius: 24px; }

/* ---------- page modèle ---------- */
.fiche { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 860px) { .fiche { grid-template-columns: 1fr; } }
.vue3d { position: relative; aspect-ratio: 4 / 3; border-radius: 30px; overflow: hidden; border: 1px solid var(--encre); background: radial-gradient(circle at 50% 42%, #3b2b24, #0e0c0b 76%); }
.vue3d canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.vue3d .aide3d { position: absolute; left: 14px; bottom: 12px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .45); padding: 6px 11px; border-radius: 999px; }
.panneau { background: var(--blanc); border: 1px solid var(--encre); border-radius: 30px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chiffres div { background: var(--carte2); border-radius: 14px; padding: 10px 12px; } .chiffres small { display: block; color: var(--doux); font-size: 11.5px; font-weight: 700; } .chiffres b { font-size: 17px; }
.prompt { white-space: pre-wrap; font-size: 13px; line-height: 1.55; background: var(--carte2); border-radius: 14px; padding: 12px 14px; max-height: 260px; overflow: auto; color: var(--texte); }

/* ---------- formulaires ---------- */
.formulaire { max-width: 430px; margin: 50px auto; background: var(--blanc); border: 1px solid var(--encre); border-radius: 30px; padding: 28px; display: flex; flex-direction: column; gap: 13px; }
.formulaire .tete { display: flex; align-items: center; gap: 12px; } .formulaire .tete img { width: 40px; height: 40px; }
.formulaire label { font-weight: 700; font-size: 13px; display: flex; flex-direction: column; gap: 6px; color: var(--texte); }
.formulaire input { min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--filet); background: var(--fond); }
.formulaire input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.message { font-size: 14px; font-weight: 700; margin: 0; } .message.erreur { color: #b3261e; } .message.ok { color: var(--ok); }
.code { font-size: 30px; font-weight: 900; letter-spacing: .14em; text-align: center; padding: 14px; border-radius: 16px; background: var(--carte2); }
footer { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--doux); font-size: 13px; padding: 34px 20px; }
footer img { width: 20px; height: 20px; }
.cache { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* accord (inscription, compte), pages légales */
.accord { border: 1px solid var(--filet); border-radius: 18px; padding: 12px 14px; margin: 2px 0; display: flex; flex-direction: column; gap: 9px; }
.accord legend { font-weight: 900; font-size: 13px; padding: 0 6px; }
label.case { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 600 !important; font-size: 13px; line-height: 1.45; cursor: pointer; }
label.case input { min-height: 0 !important; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--orange); flex: none; }
label.case a, .note-dl a { color: var(--orange2); font-weight: 800; }
.note-dl { color: var(--doux); font-size: 13.5px; font-weight: 700; margin: 12px 0 0; }
.accord-maj { max-width: 680px; border-color: var(--orange) !important; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.bloc-carte.danger:hover { border-color: #b3261e; }
.formulaire-mini { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } .formulaire-mini input { flex: 1; min-width: 160px; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--filet); background: var(--fond); }
footer .lien-legal { color: var(--doux); margin-left: 14px; font-weight: 700; }
.legal h3 { font-size: 16px; margin: 22px 0 6px; } .legal p, .legal li { color: var(--texte); line-height: 1.6; max-width: 760px; } .legal li { margin: 4px 0; }
.onglets-legal { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }

/* onglet Admin */
.cmd-admin { white-space: pre-wrap; word-break: break-all; font: 600 12.5px/1.5 ui-monospace, Consolas, monospace; background: #0D0D0D; color: #EFEFEF; padding: 12px 14px; border-radius: 12px; margin: 10px 0 0; }
.barre-envoi { height: 8px; border-radius: 4px; background: #CFCFCF; overflow: hidden; margin-top: 12px; } .barre-envoi i { display: block; height: 100%; width: 0; background: #D97757; transition: width .2s; }
#stats .bloc-carte b { font-size: 28px; }
.liste-prives { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; } .prive { display: flex; gap: 8px; flex-wrap: wrap; }
/* toutes les étoiles d'Eryeus (logo de l'en-tête, du pied, de l'accueil…) tournent très vite */
@keyframes tourneEtoile { to { transform: rotate(360deg); } }
img[src="/logo.svg"], .etoile-tourne { animation: tourneEtoile .7s linear infinite !important; will-change: transform; } /* voulu même avec « réduire les animations » */
/* onglet Admin : éditeur des PROMPTS officiels */
.editeur-prompt { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.editeur-prompt input { min-height: 42px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--filet); background: var(--fond); }
.editeur-prompt textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--filet); background: var(--fond); font: 13px/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.prompt-ligne { flex: 1; min-width: 200px; align-self: center; font-size: 14px; font-weight: 700; }
/* Workshop élargi : types d'assets, collection LihFolk, vidéos au survol, fichiers à télécharger */
.puces.types { margin: 18px 0 4px; }
.choix-ws { min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--filet); background: var(--blanc); font-weight: 700; font-size: 13.5px; }
.total-ws { margin: 4px 0 10px; }
.plus-ws { text-align: center; margin: 18px 0 6px; }
.carte .vignette { position: relative; }
.carte .vignette.plein { background: #1a1716; }
.carte .vignette video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.carte .vignette.lecture video { opacity: 1; }
.carte .vignette.avec-video::after { content: '▶'; position: absolute; right: 10px; bottom: 9px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 999px; }
.carte .vignette.lecture::after { opacity: 0; }
.vue3d.apercu-media { display: flex; align-items: center; justify-content: center; }
.vue3d .media { width: 100%; height: 100%; object-fit: contain; display: block; }
.vue3d .media.cache { display: none; }
.description-asset { margin: 2px 0; color: var(--texte); font-size: 14px; line-height: 1.5; }
.liste-fichiers { display: flex; flex-direction: column; gap: 6px; }
.liste-fichiers .fichier { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--carte2); }
.liste-fichiers .fichier span { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-fichiers .fichier small { color: var(--doux); font-size: 12px; }
.bouton.petit { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.bouton.noir-plein { background: var(--encre); color: var(--fond); }
/* onglet Admin : ajouter au Workshop */
.formulaire-asset { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.formulaire-asset select, .formulaire-asset > input, .formulaire-asset textarea { min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--filet); background: var(--fond); font: inherit; }
.formulaire-asset textarea { min-height: 80px; resize: vertical; }
.champ-fichier { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--filet); font-size: 13px; }
.champ-fichier b { font-size: 13px; }

.lecteur-son { width: 100%; height: 32px; margin: 2px 0 10px; }
