/* ============================================================
   ÎLOVIE — interface
   Identité : lagon turquoise, corail, soleil, papier crème,
   cartes postales. Police Fredoka, formes rondes.
   ============================================================ */
:root {
  --lagon: #2ec4b6; --lagon-f: #1a9c90; --corail: #ff6f61; --corail-f: #e2534a; --soleil: #ffd23f; --ciel: #4aa3ff;
  --encre: #1d2340; --encre-d: #5b6280; --creme: #fff8ec; --papier: #fffdf8; --trait: rgba(29, 35, 64, .1);
  --verre: rgba(255, 253, 248, .86); --ombre: 0 10px 30px rgba(29, 35, 64, .18); --ombre-f: 0 18px 50px rgba(29, 35, 64, .28);
  --r: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #8fd3f0; color: var(--encre);
  font-family: 'Fredoka', 'Baloo 2', 'Segoe UI', system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
[hidden] { display: none !important; }
/* barres de défilement fines et arrondies partout (téléphone, panneaux, catalogue) */
* { scrollbar-width: thin; scrollbar-color: rgba(29, 35, 64, .28) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(29, 35, 64, .28); border-radius: 99px; }
button { font-family: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
input, select, textarea { font-family: inherit; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--encre); color: #fff;
  font: 600 12px/1 'Fredoka', sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
#jeu { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }

.verre { background: var(--verre); border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--r); box-shadow: var(--ombre); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bt { padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; background: #fff; box-shadow: 0 3px 0 rgba(29, 35, 64, .15); transition: transform .08s, box-shadow .08s, background .15s; white-space: nowrap; }
.bt:hover { transform: translateY(-1px); }
.bt:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(29, 35, 64, .15); }
.bt.principal { background: var(--corail); color: #fff; box-shadow: 0 4px 0 var(--corail-f); }
.bt.lagon { background: var(--lagon); color: #fff; box-shadow: 0 4px 0 var(--lagon-f); }
.bt.soleil { background: var(--soleil); color: var(--encre); box-shadow: 0 4px 0 #d9ac1d; }
.bt.sec { background: #eef0f6; }
.bt.lien { background: transparent; box-shadow: none; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.bt.petit { padding: 6px 12px; font-size: 13px; }
.bt:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.bt-rond { width: 48px; height: 48px; border-radius: 50%; background: var(--verre); box-shadow: var(--ombre); font-size: 22px; position: relative; display: grid; place-items: center; }
.bt-rond kbd { position: absolute; bottom: -4px; right: -4px; min-width: 18px; height: 18px; font-size: 10px; }
.jauge { height: 8px; border-radius: 99px; background: rgba(29, 35, 64, .12); overflow: hidden; }
.jauge > b { display: block; height: 100%; width: 50%; border-radius: 99px; background: var(--lagon); transition: width .4s; }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud button, #hud .verre { pointer-events: auto; }
#hud-perso { position: absolute; top: 14px; left: 14px; padding: 12px 14px; width: 222px; }
.hp-ligne { display: flex; gap: 10px; align-items: center; }
#hp-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--corail), var(--soleil)); }
#hp-nom { font-weight: 700; font-size: 16px; line-height: 1.1; }
#hp-heure { font-size: 13px; color: var(--encre-d); margin-top: 2px; }
#hp-argent { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 26px; font-weight: 700; }
#hp-argent.pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); }
#hp-argent.perte { animation: secoue .35s; color: var(--corail-f); }
@keyframes pop { 40% { transform: scale(1.18); } }
@keyframes popCentre { from { transform: translate(-50%, -50%) scale(.9); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes secoue { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hp-besoins { display: flex; gap: 10px; margin-top: 6px; }
.besoin { flex: 1; display: flex; align-items: center; gap: 4px; font-size: 13px; }
.besoin .jauge { flex: 1; }
#j-faim { background: #ff9f43; } #j-energie { background: #4aa3ff; }
.besoin.bas .jauge > b { animation: clignote 1s infinite; background: var(--corail); }
@keyframes clignote { 50% { opacity: .35; } }

#hud-haut { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
#zone-nom { font-size: 28px; font-weight: 700; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .6s; white-space: nowrap; }
#zone-nom.vu { opacity: 1; }
#decret { padding: 5px 14px; font-size: 13px; font-weight: 500; border-radius: 999px; cursor: help; white-space: nowrap; }

#notifs { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; width: 330px; }
.notif { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--papier); border-radius: 14px; box-shadow: var(--ombre); font-size: 14px; line-height: 1.3;
  animation: entreNotif .35s cubic-bezier(.2, 1.3, .4, 1); max-width: 330px; pointer-events: auto; }
.notif i { font-style: normal; font-size: 22px; }
.notif.sort { animation: sortNotif .3s forwards; }
@keyframes entreNotif { from { transform: translateX(60px); opacity: 0; } }
@keyframes sortNotif { to { transform: translateX(60px); opacity: 0; } }

#hud-metier { position: absolute; left: 14px; top: 190px; width: 250px; padding: 12px 14px; font-size: 14px; }
#hud-metier h4 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
#hud-metier .obj { margin-top: 6px; padding: 6px 9px; border-radius: 10px; background: rgba(46, 196, 182, .12); }
#hud-metier .obj.fait { opacity: .5; text-decoration: line-through; }
#hud-metier .gain { color: var(--lagon-f); font-weight: 700; }
#hud-metier .tickets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
#hud-metier .ticket { padding: 3px 7px; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-size: 13px; }
#hud-metier .ticket.urgent { background: #ffe1dc; }
#hud-metier .ticket.pret { background: #d9f7e8; }

#hud-voiture { position: absolute; left: 14px; bottom: 18px; padding: 10px 16px; min-width: 190px; }
#hv-vitesse b { font-size: 38px; font-weight: 700; line-height: 1; }
#hv-vitesse small { margin-left: 4px; color: var(--encre-d); }
.hv-essence { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.hv-essence .jauge { flex: 1; }
#hv-carbu { background: #ff9f43; }
#hv-aide { font-size: 11px; color: var(--encre-d); margin-top: 6px; }

#coin-bd { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#minicarte-cadre { width: 190px; height: 190px; border-radius: 50%; overflow: hidden; border: 5px solid var(--papier); box-shadow: var(--ombre); position: relative; background: #2aa6d6; pointer-events: auto; cursor: pointer; }
#minicarte { width: 100%; height: 100%; }
#mc-nord { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }
#boutons-hud { display: flex; gap: 8px; }

#bas-centre { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
#invite { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 9px; background: var(--papier); border-radius: 999px; box-shadow: var(--ombre); font-size: 16px; font-weight: 500; animation: pop .3s; white-space: nowrap; }
#invite kbd { width: 30px; height: 30px; font-size: 15px; background: var(--corail); box-shadow: 0 3px 0 var(--corail-f); }
#barre-action { background: var(--papier); padding: 8px 14px; border-radius: 14px; box-shadow: var(--ombre); min-width: 240px; font-size: 14px; }
#barre-action .jauge { margin-top: 5px; height: 10px; }
#barre-action .jauge b { transition: none; background: var(--corail); }
#emotes { display: flex; gap: 6px; padding: 6px; background: var(--verre); border-radius: 999px; box-shadow: var(--ombre); pointer-events: auto; }
#emotes button { width: 50px; height: 50px; border-radius: 50%; background: #fff; font-size: 22px; position: relative; }
#emotes button:hover { background: var(--soleil); }
#emotes button small { position: absolute; bottom: -2px; right: 2px; font-size: 10px; font-weight: 700; }

#viseur { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
#aide-souris { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(29, 35, 64, .75); color: #fff; font-size: 14px; }

/* textes flottants et bulles */
#flottants { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.flottant { position: absolute; font-weight: 700; font-size: 20px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); white-space: nowrap; transform: translate(-50%, -50%); }
.bulle { position: absolute; transform: translate(-50%, -100%); background: var(--papier); padding: 6px 11px; border-radius: 14px; font-size: 14px; max-width: 240px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); line-height: 1.25; text-align: center; }
.bulle::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--papier); }
.bulle.icone { font-size: 22px; padding: 4px 9px; }
.bulle.impatient { background: #ffe1dc; }
.etiquette { position: absolute; transform: translate(-50%, -100%); font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); white-space: nowrap; }
.marqueur { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.marqueur i { font-style: normal; font-size: 26px; animation: flotte 1.2s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-6px); } }

#fondu { position: fixed; inset: 0; background: #1d2340; opacity: 0; pointer-events: none; z-index: 60; transition: opacity .45s; }
#fondu.noir { opacity: 1; pointer-events: auto; }

/* ---------------- dialogue ---------------- */
#dialogue { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(680px, 94vw); background: var(--papier); border-radius: 22px; padding: 18px 20px 14px; box-shadow: var(--ombre-f); z-index: 56; animation: monte .3s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes monte { from { transform: translate(-50%, 30px); opacity: 0; } }
#dl-nom { position: absolute; top: -16px; left: 22px; background: var(--corail); color: #fff; font-weight: 700; padding: 5px 14px; border-radius: 999px; font-size: 15px; box-shadow: 0 3px 0 var(--corail-f); }
#dl-nom small { opacity: .85; font-weight: 500; margin-left: 6px; }
#dl-texte { font-size: 18px; line-height: 1.4; min-height: 50px; margin-top: 4px; }
#dl-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#dl-options .bt { font-size: 14px; padding: 8px 14px; background: #eef0f6; box-shadow: none; }
#dl-options .bt:hover { background: var(--soleil); }
#dl-options .bt kbd { margin-right: 6px; min-width: 18px; height: 18px; font-size: 11px; }

#menu-contexte { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--papier); border-radius: 18px; padding: 12px; box-shadow: var(--ombre-f); z-index: 56; min-width: 260px; animation: popCentre .25s cubic-bezier(.2, 1.3, .4, 1); }
#menu-contexte h4 { font-size: 14px; color: var(--encre-d); margin: 2px 6px 8px; }
#menu-contexte button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 16px; }
#menu-contexte button:hover, #menu-contexte button.sel { background: #eef0f6; }
#menu-contexte button:disabled { opacity: .4; }

/* ---------------- fenêtres ---------------- */
#voile { position: fixed; inset: 0; background: rgba(29, 35, 64, .35); z-index: 52; }
#panneau { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(820px, 96vw); max-height: 88vh; background: var(--papier); border-radius: 26px; box-shadow: var(--ombre-f); z-index: 53; display: flex; flex-direction: column; overflow: hidden; animation: popCentre .28s cubic-bezier(.2, 1.3, .4, 1); }
#pn-tete { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
#pn-ico { font-size: 28px; }
#pn-titre { flex: 1; font-size: 24px; font-weight: 700; }
#pn-fermer { width: 38px; height: 38px; border-radius: 50%; background: #eef0f6; font-size: 16px; }
#pn-fermer:hover { background: var(--corail); color: #fff; }
#pn-onglets { display: flex; gap: 6px; padding: 0 20px 8px; flex-wrap: wrap; }
#pn-onglets:empty { display: none; }
#pn-onglets button { padding: 7px 14px; border-radius: 999px; background: #eef0f6; font-weight: 500; font-size: 14px; }
#pn-onglets button.actif { background: var(--encre); color: #fff; }
#pn-corps { padding: 6px 20px 20px; overflow: auto; flex: 1; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.carte-item { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 2px 8px rgba(29, 35, 64, .08); display: flex; flex-direction: column; gap: 5px; position: relative; border: 2px solid transparent; }
.carte-item:hover { border-color: var(--soleil); }
.carte-item .ico { font-size: 34px; line-height: 1; }
.carte-item .nom { font-weight: 600; font-size: 15px; line-height: 1.15; }
.carte-item .desc { font-size: 12.5px; color: var(--encre-d); line-height: 1.3; }
.carte-item .prix { font-weight: 700; margin-top: auto; }
.carte-item .etiq { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--soleil); }
.carte-item.possede { border-color: var(--lagon); }
.carte-item.verrou { opacity: .55; }
.carte-item canvas, .carte-item img { width: 100%; border-radius: 10px; background: #eef6fb; }
.ligne { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(29, 35, 64, .06); }
.ligne .ico { font-size: 26px; }
.ligne .txt { flex: 1; line-height: 1.25; }
.ligne .txt small { display: block; color: var(--encre-d); font-size: 12.5px; }
.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; }
.pastille.sel { box-shadow: 0 0 0 3px var(--encre); }
.section-t { font-size: 13px; font-weight: 700; color: var(--encre-d); text-transform: uppercase; letter-spacing: .6px; margin: 14px 0 8px; }
.intro { font-size: 15px; color: var(--encre-d); margin-bottom: 10px; line-height: 1.4; }
.vide { text-align: center; padding: 30px; color: var(--encre-d); }
.champ { width: 100%; padding: 10px 14px; border-radius: 12px; border: 2px solid #e3e6ef; font-size: 16px; outline: none; background: #fff; }
.champ:focus { border-color: var(--lagon); }
.etoiles { color: #ffb400; letter-spacing: 1px; }

/* ---------------- téléphone ---------------- */
#telephone { position: fixed; right: 220px; bottom: 16px; z-index: 35; animation: telMonte .35s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes telMonte { from { transform: translateY(110%); } }
#tel-cadre { width: 330px; height: min(640px, 86vh); background: #1d2340; border-radius: 42px; padding: 12px; box-shadow: var(--ombre-f); display: flex; flex-direction: column; }
#tel-statut { display: flex; justify-content: space-between; color: #fff; font-size: 12px; padding: 4px 14px 8px; font-weight: 500; }
#tel-ecran { flex: 1; border-radius: 30px; overflow: auto; background: linear-gradient(170deg, #7fdcff 0%, #2ec4b6 55%, #1a9c90 100%); position: relative; }
#tel-bas { display: flex; justify-content: center; padding-top: 8px; }
#tel-accueil { width: 60px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 16px; }
.tel-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; padding: 24px 16px; }
.tel-app { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #fff; font-size: 12px; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); position: relative; }
.tel-app span { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.tel-app em { position: absolute; top: -4px; right: 14px; background: var(--corail); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 5px; }
.tel-page { background: var(--papier); min-height: 100%; padding: 14px; }
.tel-page h3 { font-size: 20px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.tel-page h3 button { font-size: 20px; }
.tel-accueil-haut { color: #fff; text-align: center; padding: 26px 10px 0; }
.tel-accueil-haut .h { font-size: 54px; font-weight: 600; line-height: 1; }
.tel-accueil-haut .d { font-size: 14px; opacity: .9; }
.tel-page .ligne { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------------- moment (carte postale) ---------------- */
#moment { position: fixed; inset: 0; display: grid; place-items: center; z-index: 57; pointer-events: none; }
.mo-carte { width: min(420px, 90vw); background: var(--papier); border-radius: 10px; padding: 26px 26px 22px; box-shadow: var(--ombre-f); position: relative; transform: rotate(-3deg);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 111, 97, .06) 14px 28px); border: 8px solid #fff; animation: carteArrive .7s cubic-bezier(.2, 1.4, .4, 1); }
#moment.sort .mo-carte { animation: carteSort .5s forwards; }
@keyframes carteArrive { from { transform: rotate(-20deg) translateY(90px) scale(.6); opacity: 0; } }
@keyframes carteSort { to { transform: rotate(8deg) translateY(-60px) scale(.8); opacity: 0; } }
.mo-timbre { position: absolute; top: -18px; right: -14px; width: 76px; height: 86px; background: var(--soleil); display: grid; place-items: center; font-size: 42px; border: 5px dashed #fff; transform: rotate(8deg); }
.mo-sur { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--corail); }
#mo-titre { font-size: 30px; margin: 6px 0; }
#mo-texte { font-size: 17px; line-height: 1.4; color: var(--encre-d); }
.mo-cachet { margin-top: 12px; display: inline-block; border: 2px solid var(--lagon); color: var(--lagon-f); padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; transform: rotate(-4deg); }

/* ---------------- mini-jeux ---------------- */
#minijeu { position: fixed; left: 50%; top: 58%; transform: translate(-50%, 0); background: var(--papier); padding: 14px 18px; border-radius: 20px; box-shadow: var(--ombre-f); min-width: 320px; text-align: center; z-index: 54; }
#minijeu h4 { font-size: 17px; margin-bottom: 8px; }
.mj-jauge { position: relative; height: 26px; border-radius: 99px; background: #eef0f6; overflow: hidden; }
.mj-zone { position: absolute; top: 0; bottom: 0; background: rgba(46, 196, 182, .55); border-left: 2px solid var(--lagon-f); border-right: 2px solid var(--lagon-f); }
.mj-curseur { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: var(--encre); border-radius: 3px; }
.mj-aide { font-size: 13px; color: var(--encre-d); margin-top: 8px; }
.mj-coups { font-size: 30px; font-weight: 700; }

/* ---------------- construction ---------------- */
#construction { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
#construction .verre { pointer-events: auto; }
#cs-gauche { position: absolute; left: 14px; top: 14px; bottom: 14px; width: 300px; padding: 14px; display: flex; flex-direction: column; }
#cs-titre { font-size: 20px; font-weight: 700; }
#cs-budget { font-size: 14px; color: var(--encre-d); margin: 2px 0 10px; }
#cs-cats { display: flex; flex-wrap: wrap; gap: 5px; }
#cs-cats button { width: 40px; height: 40px; border-radius: 12px; background: #fff; font-size: 20px; }
#cs-cats button.actif { background: var(--soleil); }
#cs-liste { flex: 1; overflow: auto; margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.cs-item { background: #fff; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; text-align: center; line-height: 1.15; border: 2px solid transparent; }
.cs-item:hover { border-color: var(--soleil); }
.cs-item.sel { border-color: var(--corail); }
.cs-item img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.cs-item b { font-size: 12px; }
#cs-outils { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 360px); }
#cs-outils button { padding: 8px 12px; border-radius: 12px; background: #fff; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; }
#cs-outils button.actif { background: var(--encre); color: #fff; }
#cs-outils .pastilles { padding: 0 6px; align-items: center; }
#cs-aide { position: absolute; right: 14px; top: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.6; max-width: 280px; }

/* ---------------- créateur ---------------- */
#createur { position: fixed; inset: 0; z-index: 45; pointer-events: none; }
#cr-panneau { position: absolute; left: 18px; top: 18px; bottom: 18px; width: min(430px, 94vw); background: var(--papier); border-radius: 26px; box-shadow: var(--ombre-f); display: flex; flex-direction: column; pointer-events: auto; overflow: hidden; }
#cr-tete { padding: 18px 20px 8px; }
#cr-tete h2 { font-size: 28px; }
#cr-prenom { width: 100%; margin-top: 8px; padding: 12px 16px; font-size: 20px; border-radius: 14px; border: 3px solid #e3e6ef; outline: none; font-weight: 600; }
#cr-prenom:focus { border-color: var(--corail); }
#cr-onglets { display: flex; gap: 5px; padding: 6px 20px; flex-wrap: wrap; }
#cr-onglets button { padding: 7px 12px; border-radius: 999px; background: #eef0f6; font-size: 14px; font-weight: 500; }
#cr-onglets button.actif { background: var(--encre); color: #fff; }
#cr-corps { flex: 1; overflow: auto; padding: 6px 20px 12px; }
#cr-bas { padding: 12px 20px 18px; display: flex; gap: 10px; justify-content: space-between; border-top: 1px solid var(--trait); }
.cr-choix { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-choix button { padding: 8px 12px; border-radius: 12px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); font-size: 14px; border: 2px solid transparent; }
.cr-choix button.sel { border-color: var(--corail); background: #fff3f1; }
.cr-choix button .p { display: block; font-size: 11px; color: var(--encre-d); }
.cr-curseur { width: 100%; accent-color: var(--corail); }
#cr-rotation { position: absolute; right: 30px; bottom: 30px; display: flex; gap: 10px; pointer-events: auto; }

/* ---------------- écran titre ---------------- */
#titre { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 120%, rgba(255, 210, 63, .35), transparent 60%); }
#ti-contenu { text-align: center; width: min(900px, 96vw); }
#ti-logo { font-size: clamp(64px, 13vw, 140px); font-weight: 700; letter-spacing: -2px; line-height: .95; color: #fff; text-shadow: 0 6px 0 var(--corail-f), 0 14px 40px rgba(0, 0, 0, .25); animation: logo 3s ease-in-out infinite; }
.ti-v { color: var(--soleil); }
@keyframes logo { 50% { transform: translateY(-6px) rotate(-1deg); } }
#ti-slogan { color: #fff; font-size: 20px; margin: 10px 0 28px; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
#ti-vies { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.vie { width: 240px; background: var(--papier); border-radius: 22px; padding: 16px; box-shadow: var(--ombre-f); text-align: left; display: flex; flex-direction: column; gap: 8px; transition: transform .15s; }
.vie:hover { transform: translateY(-4px) rotate(-1deg); }
.vie .vt { display: flex; align-items: center; gap: 10px; }
.vie .va { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; }
.vie .vn { font-weight: 700; font-size: 20px; line-height: 1.1; }
.vie .vs { font-size: 13px; color: var(--encre-d); }
.vie .vb { display: flex; gap: 6px; margin-top: auto; }
.vie.nouvelle { align-items: center; justify-content: center; text-align: center; min-height: 180px; border: 3px dashed rgba(29, 35, 64, .2); background: rgba(255, 253, 248, .75); cursor: pointer; }
.vie.nouvelle .plus { font-size: 44px; }
#ti-bas { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
#ti-chargement { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 16px; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

/* ---------------- tactile ---------------- */
#tactile { position: fixed; inset: 0; pointer-events: none; z-index: 15; }
#t-joy { position: absolute; left: 30px; bottom: 40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .25); border: 3px solid rgba(255, 255, 255, .5); pointer-events: auto; touch-action: none; }
#t-joy i { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; background: rgba(255, 255, 255, .8); }
#t-boutons { position: absolute; right: 230px; bottom: 30px; display: grid; grid-template-columns: repeat(3, 60px); gap: 10px; pointer-events: auto; }
.t-bt { width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .8); font-size: 24px; font-weight: 700; touch-action: none; }
.t-bt.t-e { background: var(--corail); color: #fff; }
.t-bt.actif { background: var(--soleil); }
body.tactile #tactile { display: block !important; }
body.tactile #aide-souris { display: none !important; }

@media (max-width: 760px) {
  #hud-perso { transform: scale(.82); transform-origin: top left; }
  #minicarte-cadre { width: 130px; height: 130px; }
  #telephone { right: 8px; left: 8px; bottom: 8px; }
  #tel-cadre { width: 100%; }
  #notifs { width: 240px; }
  #t-boutons { right: 16px; bottom: 170px; }
  #zone-nom { font-size: 20px; }
}
