@font-face { font-family: "Nunito"; src: url("/polices/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/polices/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --fond: #F4F0FA;
  --carte: #FDFBFF;
  --encre: #1C2A24;
  --doux: #6B6478;
  --trait: #E2D9F0;
  --terre: #1F4D3A;
  --sur-terre: #FFFFFF;
  --terre-clair: #E6DCF5;
  --lilas: #8A72B8;
  --vedette: #1F4D3A;
  --rose: #C9B6EA;
  --sauge: #3E7A5E;
  --nuit: #5E4A8C;
  --rayon: 22px;
  --serif: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --sans: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  --ombre: 0 1px 0 rgba(31, 77, 58, .04), 0 8px 24px -12px rgba(60, 40, 100, .20);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #131A17; --carte: #1C2622; --encre: #EEEAF5; --doux: #A9A3B8; --trait: #2D3934;
    --terre: #C9B6EA; --sur-terre: #1C1430; --terre-clair: #352D4A; --lilas: #C9B6EA; --vedette: #24503F;
    --rose: #C9B6EA; --sauge: #8FC2A6; --nuit: #CDB8E0;
    --ombre: 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}
[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 var(--sans); }
body { min-height: 100dvh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
main { max-width: 560px; margin: 0 auto; padding: calc(18px + env(safe-area-inset-top)) 18px 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; margin: 0 0 .4em; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
a { color: var(--terre); }
.doux { color: var(--doux); }
.petit { font-size: 14px; }
.centre { text-align: center; }
.pile > * + * { margin-top: 14px; }
.ligne { display: flex; gap: 10px; align-items: center; }
.ligne.entre { justify-content: space-between; }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre); }
.carte.lien { display: block; color: inherit; text-decoration: none; }
.carte.vedette { background: var(--vedette); color: #F4F0FA; border: 0; }
.carte.vedette .doux { color: #D9CCF0; }
.carte.nuit { background: var(--nuit); color: #F4ECFA; border: 0; }
.etiquette { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-bottom: 6px; }
.question { font-family: var(--serif); font-weight: 500; font-size: 23px; line-height: 1.3; }

button, .bouton {
  font: 700 16px var(--sans); border: 0; border-radius: 999px; padding: 13px 20px; cursor: pointer;
  background: var(--terre); color: var(--sur-terre); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button.plein { width: 100%; }
button.second { background: var(--terre-clair); color: var(--terre); }
button.fantome { background: transparent; color: var(--doux); padding: 8px 10px; }
button.danger { background: transparent; color: #B3261E; border: 1px solid currentColor; }
button:disabled { opacity: .5; }
.vedette button { background: #E6DCF5; color: #1F4D3A; }

input, textarea, select {
  font: 16px var(--sans); width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--trait);
  background: var(--carte); color: var(--encre);
}
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.case input { width: auto; margin-top: 3px; }

.choix { display: grid; gap: 10px; }
.choix button { background: var(--carte); color: var(--encre); border: 1.5px solid var(--trait); border-radius: 16px; text-align: left; justify-content: flex-start; font-weight: 500; padding: 15px 16px; }
.choix button.actif { border-color: var(--terre); background: var(--terre-clair); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.couple-tete { display: flex; align-items: center; gap: 14px; }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 600 22px var(--serif); background: var(--terre-clair); color: var(--terre); position: relative; flex: none; }
.avatar .hum { position: absolute; right: -6px; bottom: -4px; font-size: 20px; }
.coeur { color: var(--lilas); font-size: 20px; }

.humeurs { display: flex; gap: 6px; flex-wrap: wrap; }
.humeurs button { background: var(--carte); border: 1px solid var(--trait); padding: 8px; width: 44px; height: 44px; font-size: 22px; }
.humeurs button.actif { border-color: var(--terre); background: var(--terre-clair); }

.chiffre { font: 600 34px/1 var(--serif); }
.reponses { display: grid; gap: 10px; }
.bulle { border-radius: 18px; padding: 12px 14px; background: var(--fond); border: 1px solid var(--trait); white-space: pre-wrap; }
.bulle.moi { background: var(--terre-clair); border-color: transparent; }
.bulle .qui { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); display: block; margin-bottom: 2px; }
.attente { display: flex; gap: 10px; align-items: center; color: var(--doux); }
.points::after { content: "…"; animation: pts 1.4s infinite steps(4); display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes pts { from { width: 0 } to { width: 1.2em } }
.reacs { display: flex; gap: 6px; flex-wrap: wrap; }
.reacs button { background: transparent; border: 1px solid var(--trait); padding: 6px 10px; font-size: 18px; }
.reacs button.actif { background: var(--terre-clair); border-color: var(--terre); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode { border-radius: var(--rayon); padding: 16px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; text-align: left; border: 0; font: inherit; cursor: pointer; }
.mode b { font: 600 19px/1.15 var(--serif); }
.mode small { opacity: .85; font-size: 13px; }
.m-connecte { background: #1F4D3A; } .m-qui { background: #7A62A8; } .m-prefere { background: #3E7A5E; }
.m-miroir { background: #8A72B8; } .m-souvenir { background: #2C6B57; } .m-okpasok { background: #5E4A8C; }

.segment { display: flex; background: var(--trait); border-radius: 999px; padding: 4px; gap: 4px; }
.segment button { flex: 1; background: transparent; color: var(--encre); padding: 9px 10px; font-size: 14px; }
.segment button.actif { background: var(--carte); box-shadow: var(--ombre); }

.progres { height: 6px; background: var(--trait); border-radius: 9px; overflow: hidden; }
.progres i { display: block; height: 100%; background: var(--terre); border-radius: 9px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #DCEBE2; color: #1F4D3A; }
.badge.n2 { background: #E6DCF5; color: #5E4A8C; } .badge.n3 { background: #D3C3EE; color: #43306E; }
.badge.ok { background: #DDE8D4; color: #3F5A30; }
.liste > * + * { border-top: 1px solid var(--trait); }
.liste > * { padding: 12px 0; }

.flip { min-height: 300px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.code { font: 600 38px/1 ui-monospace, Menlo, monospace; letter-spacing: .18em; text-align: center; padding: 18px; border: 2px dashed var(--terre); border-radius: 18px; color: var(--terre); }
.logo { font: 600 40px/1 var(--serif); letter-spacing: -.02em; }
.logo i { color: var(--lilas); font-style: normal; }

nav#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--carte) 92%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--trait); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
nav#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 600; color: var(--doux); text-decoration: none; padding: 4px 0; position: relative; }
nav#tabs a span { font-size: 21px; line-height: 1.2; }
nav#tabs a.actif { color: var(--terre); }
.pastille { position: absolute; top: 2px; left: 55%; min-width: 17px; height: 17px; border-radius: 9px; background: var(--lilas); color: var(--sur-terre); font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
#toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--encre); color: var(--fond); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.vu { opacity: 1; transform: translateX(-50%); }
.retour { background: none; color: var(--doux); padding: 0; margin-bottom: 10px; font-weight: 500; }
.carte.lien.enigme-carte { background: linear-gradient(135deg, #5E4A8C, #1F4D3A); color: #F4F0FA; border: 0; }
.carte.indice { background: var(--terre-clair); border: 1.5px dashed var(--lilas); }
.carte.indice .etiquette { color: var(--lilas); opacity: 1; }
.carte.lien.casse { display: flex; flex-direction: column; gap: 4px; color: #fff !important; border: 0; min-height: 130px; }
.casse b { font: 600 19px/1.15 var(--serif); } .casse small { opacity: .9; font-size: 13px; }
.carte.lien.m-mm { background: #7A62A8; } .carte.lien.m-sdk { background: #2C6B57; }
.course .progres.partenaire i { background: var(--sauge); }
.tirelire .chiffre { font-size: 26px; }
.tour { text-align: center; padding: 10px; border-radius: 999px; font-weight: 700; background: var(--trait); color: var(--doux); }
.tour.moi { background: var(--terre); color: var(--sur-terre); }
.mm { display: grid; gap: 2px; background: var(--carte); border: 1px solid var(--trait); border-radius: 16px; padding: 6px; user-select: none; }
.mm button { aspect-ratio: 1; padding: 0; border-radius: 6px; background: transparent; color: var(--encre); font: 700 clamp(12px, 3.6vw, 17px) var(--sans); }
.mm button:disabled { opacity: 1; }
.mm button.t-moi, .mots .t-moi { background: #D9CCF0; color: #43306E; }
.mm button.t-partenaire, .mots .t-partenaire { background: #CFE5D8; color: #1F4D3A; }
.mm button.t-solution { background: var(--trait); }
.mm button.sel { background: var(--terre); color: var(--sur-terre); }
.mots { display: flex; flex-wrap: wrap; gap: 6px; }
.mots span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--trait); font-weight: 700; font-size: 13px; letter-spacing: .03em; }
.mots span.t-moi, .mots span.t-partenaire { text-decoration: line-through; border-color: transparent; }
.sdk { display: grid; grid-template-columns: repeat(9, 1fr); border: 2px solid var(--encre); border-radius: 12px; overflow: hidden; background: var(--carte); }
.sdk button { aspect-ratio: 1; padding: 0; border-radius: 0; background: var(--carte); color: var(--encre); font: 600 clamp(15px, 5vw, 22px) var(--sans);
  border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait); }
.sdk .c2, .sdk .c5 { border-right: 2px solid var(--encre); } .sdk .c8 { border-right: 0; }
.sdk .r2, .sdk .r5 { border-bottom: 2px solid var(--encre); } .sdk .r8 { border-bottom-width: 0; }
.sdk .fixe { font-weight: 800; }
.sdk .p-moi { color: #7A62A8; } .sdk .p-partenaire { color: #2C6B57; }
.sdk .vois { background: color-mix(in srgb, var(--terre-clair) 55%, var(--carte)); }
.sdk .meme { background: var(--terre-clair); }
.sdk .sel { background: var(--rose); color: #1C1430; }
.sdk .faux { color: #C62828 !important; background: #FBE3E3; }
.sdk .dernier { box-shadow: inset 0 0 0 2px var(--sauge); }
.pave { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pave button { padding: 12px 0; font-size: 20px; border-radius: 14px; }
@media (prefers-color-scheme: dark) {
  .sdk .p-moi { color: #C9B6EA; } .sdk .p-partenaire { color: #8FC2A6; }
  .sdk .faux { background: #4A1F22; color: #FF8A80 !important; }
}
.articles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.article { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--ombre); }
.article .emoji { font-size: 30px; line-height: 1; }
.article .titre { font-weight: 700; flex: 1; line-height: 1.25; }
.article button { padding: 9px 12px; }
.article button.fantome { padding: 2px; font-size: 13px; }
a.tirelire { display: block; }
.carte.lien.m-sdk2 { background: #3E7A5E; } .carte.lien.m-mm2 { background: #5E4A8C; }
.grille.trois { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.grille.trois .casse { min-height: 104px; padding: 12px; } .grille.trois .casse b { font-size: 15px; }
.motus { display: grid; gap: 6px; justify-content: center; }
.motus-ligne { display: grid; grid-template-columns: repeat(5, 54px); gap: 6px; }
.motus-ligne span { height: 54px; display: grid; place-items: center; border-radius: 12px; border: 2px solid var(--trait); font: 800 24px var(--sans); background: var(--carte); }
.motus-ligne span.courante { border-color: var(--lilas); }
.motus-ligne span.r2, .clavier .r2 { background: #3E7A5E; color: #fff; border-color: transparent; }
.motus-ligne span.r1, .clavier .r1 { background: #8A72B8; color: #fff; border-color: transparent; border-radius: 50%; }
.motus-ligne span.r0 { background: var(--trait); color: var(--doux); border-color: transparent; }
.clavier { display: grid; gap: 6px; }
.cl-ligne { display: flex; gap: 4px; justify-content: center; }
.cl-ligne button { flex: 1; max-width: 36px; padding: 13px 0; border-radius: 8px; background: var(--terre-clair); color: var(--encre); font-size: 15px; }
.cl-ligne button.large { max-width: 56px; flex: 1.6; }
.cl-ligne button.r0 { opacity: .35; }
.memory { display: grid; gap: 8px; }
.memory button { aspect-ratio: 3 / 4; border-radius: 14px; background: var(--terre); font-size: 30px; padding: 0; transition: transform .15s; }
.memory button.ouverte { background: var(--carte); border: 2px solid var(--lilas); transform: scale(1.04); }
.memory button.trouvee { background: var(--terre-clair); }
.p4 { display: grid; gap: 6px; background: #1F4D3A; padding: 10px; border-radius: 18px; }
.p4 button { aspect-ratio: 1; padding: 0; border-radius: 50%; background: var(--fond); display: grid; place-items: center; }
.p4 button.j1, .pion.j1 { background: #8A72B8; } .p4 button.j2, .pion.j2 { background: #E0A030; }
.p4 button.der { box-shadow: 0 0 0 3px #fff inset; }
.pion { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.gomoku { display: grid; gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.gomoku button { aspect-ratio: 1; padding: 0; border-radius: 0; background: var(--carte); font: 800 clamp(12px, 4vw, 20px) var(--sans); }
.gomoku .j1 { color: #7A62A8; } .gomoku .j2 { color: #C08020; } .gomoku .der { background: var(--terre-clair); }
.gomoku .j2::before { content: ""; } 
.bn { display: grid; gap: 2px; background: #BFD7EA; padding: 4px; border-radius: 12px; }
.bn button, .bn span { aspect-ratio: 1; padding: 0; border-radius: 4px; background: #E3EFF8; display: grid; place-items: center; font-size: 13px; color: #2D5B7A; }
.bn.mienne { opacity: .95; } .bn.mienne span { font-size: 11px; }
.bn .bateau { background: #6B7F8E; } .bn .touche { background: #F2B8B5; } .bn .coule { background: #C62828; }
.bn .revele { background: #6B7F8E; opacity: .5; } .bn .eau { background: #D5E6F3; }
.toile { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--trait); background: #fff; touch-action: none; }
.toile.active { border: 2px solid var(--lilas); }
.outils button { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--trait); }
.outils button.actif { box-shadow: 0 0 0 3px var(--lilas); }
.outils select { width: auto; padding: 8px; }
.scelle { text-align: center; padding: 18px; border: 1.5px dashed var(--lilas); border-radius: 14px; color: var(--doux); }
.capsule.ouverte { border-color: var(--lilas); }
.reve .coche { width: 30px; height: 30px; padding: 0; border-radius: 50%; background: transparent; border: 2px solid var(--lilas); color: var(--sur-terre); }
.reve.fait .coche { background: var(--sauge); border-color: var(--sauge); color: #fff; }
.reve.fait span:nth-child(3) { text-decoration: line-through; opacity: .7; }
.carte.savoir, .carte.lien.savoir { background: linear-gradient(135deg, #E6DCF5, #DCEBE2); border: 0; color: #1C2A24; }
.carte.savoir .etiquette { color: #5E4A8C; opacity: 1; }
button.petit { padding: 7px 12px; font-size: 13px; }
button.pense { background: linear-gradient(135deg, #8A72B8, #5E4A8C); color: #fff; }
.pendu-svg { width: 90px; height: 112px; stroke: var(--encre); stroke-width: 4; fill: none; stroke-linecap: round; flex: none; }
.pendu-mot { font: 800 24px var(--sans); letter-spacing: .12em; flex: 1; word-break: break-word; }
.lettres { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.lettres button { padding: 9px 0; border-radius: 9px; background: var(--terre-clair); color: var(--encre); font-size: 15px; }
.lettres button:disabled { opacity: .25; }
.mi .interdits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.mi .interdits span { background: rgba(255,255,255,.15); padding: 5px 10px; border-radius: 999px; text-decoration: line-through; }
.filtres { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.filtres button { flex: none; padding: 7px 12px; font-size: 13px; background: var(--terre-clair); color: var(--encre); }
.filtres button.actif { background: var(--terre); color: var(--sur-terre); }
.idee { cursor: pointer; }
.photo-choix { display: grid; place-items: center; min-height: 90px; border: 2px dashed var(--lilas); border-radius: 16px; cursor: pointer; color: var(--lilas); font-weight: 700; margin: 0; }
.frise { display: grid; gap: 14px; border-left: 3px solid var(--lilas); padding-left: 14px; }
.souvenir { padding: 10px; } .souvenir img { width: 100%; border-radius: 14px; display: block; }
.menu-jour b { text-transform: capitalize; } .menu-jour input { padding: 9px 12px; }
.humeurs.repliees { display: none; }
.humeurs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.humeurs button { width: auto; height: 46px; }
.motsgrille { display: grid; gap: 2px; background: var(--trait); padding: 3px; border-radius: 10px; }
.motsgrille button { aspect-ratio: 1; padding: 0; border-radius: 4px; background: var(--carte); color: var(--encre); font: 800 clamp(12px, 3.8vw, 18px) var(--sans); position: relative; }
.motsgrille button.plein { background: #F3E3B5; color: #3B2A1A; }
.motsgrille button.sel { box-shadow: inset 0 0 0 3px var(--lilas); }
.motsgrille sub { position: absolute; right: 2px; bottom: 0; font-size: 8px; font-weight: 600; }
.case.course { margin: 0; font-size: 16px; padding: 6px 0; }
.calendrier { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calendrier button { aspect-ratio: 1; border-radius: 16px; display: flex; flex-direction: column; gap: 2px; font-size: 22px; padding: 0; }
.calendrier button b { font-size: 14px; }
.calendrier .fermee { background: var(--terre-clair); color: var(--doux); }
.calendrier .ouverte { background: var(--terre); }
.calendrier .vide { background: var(--trait); color: var(--doux); }
.battement { animation: bat 1s infinite; } @keyframes bat { 50% { transform: scale(1.15); } }

/* ── Thèmes ── */
[data-theme="rose"] { --fond: #FBF0F3; --carte: #FFFBFC; --encre: #2B1A20; --doux: #7A5F68; --trait: #F0DCE3; --terre: #A23B5C; --sur-terre: #fff; --terre-clair: #F8DCE6; --lilas: #C2577B; --vedette: #8E2F4E; --rose: #E9A2B8; --sauge: #3E7A5E; }
[data-theme="ocean"] { --fond: #EEF5F8; --carte: #FBFDFE; --encre: #13262E; --doux: #5B7079; --trait: #D6E6EC; --terre: #1F5E7A; --sur-terre: #fff; --terre-clair: #D5EAF2; --lilas: #2A8C80; --vedette: #1B4F66; --rose: #8FC9D9; --sauge: #2A8C80; }
[data-theme="peche"] { --fond: #FCF3EC; --carte: #FFFAF6; --encre: #2B1E18; --doux: #7B6559; --trait: #F2E1D3; --terre: #C65D3B; --sur-terre: #fff; --terre-clair: #F8DFD2; --lilas: #D07655; --vedette: #A9472B; --rose: #F0B49A; --sauge: #6F8B5E; }
[data-theme="nuit"] { --fond: #121418; --carte: #1C2027; --encre: #ECEAF4; --doux: #A3A1B5; --trait: #2C313B; --terre: #C9B6EA; --sur-terre: #1C1430; --terre-clair: #332C48; --lilas: #C9B6EA; --vedette: #2D2550; --rose: #C9B6EA; --sauge: #8FC2A6; --ombre: 0 8px 24px -12px rgba(0,0,0,.7); }
[data-theme="menthe"] { --fond: #EEF7F2; --carte: #FAFDFB; --encre: #15281F; --doux: #5D7368; --trait: #D5EADF; --terre: #23735A; --sur-terre: #fff; --terre-clair: #D3EEE1; --lilas: #3E9C7C; --vedette: #1C5C48; --rose: #9ED8C1; --sauge: #3E7A5E; }
[data-theme="framboise"] { --fond: #FAEEF2; --carte: #FFFAFC; --encre: #2A141C; --doux: #7A5A66; --trait: #F1D6E0; --terre: #B0124F; --sur-terre: #fff; --terre-clair: #F7D2E0; --lilas: #D23C74; --vedette: #8A0E3E; --rose: #F2A3C0; --sauge: #3E7A5E; }
[data-theme="soleil"] { --fond: #FDF7E6; --carte: #FFFDF6; --encre: #2B2410; --doux: #7A6E4E; --trait: #F3E7BF; --terre: #9A6A00; --sur-terre: #fff; --terre-clair: #FBEAB0; --lilas: #C98A00; --vedette: #7A5400; --rose: #F7D774; --sauge: #5E8A3E; }
[data-theme="foret"] { --fond: #EFF3EC; --carte: #FBFCFA; --encre: #18241A; --doux: #5F6E60; --trait: #D9E3D4; --terre: #2E5233; --sur-terre: #fff; --terre-clair: #DCE8D5; --lilas: #6E8F4E; --vedette: #24412A; --rose: #B9D3A2; --sauge: #4E7A3E; }
[data-theme="corail"] { --fond: #FDF0EE; --carte: #FFFAF9; --encre: #2C1816; --doux: #7D5F5B; --trait: #F5DAD5; --terre: #C9483A; --sur-terre: #fff; --terre-clair: #FADBD5; --lilas: #E2705F; --vedette: #A33528; --rose: #F7B2A6; --sauge: #4E8A6E; }
[data-theme="ardoise"] { --fond: #EFF1F4; --carte: #FBFCFD; --encre: #1A1F27; --doux: #626B78; --trait: #DCE1E8; --terre: #3A4A63; --sur-terre: #fff; --terre-clair: #DCE3EE; --lilas: #6A7FA3; --vedette: #2C3A50; --rose: #B5C3DA; --sauge: #4E7A6E; }
[data-theme="rose"] .vedette button, [data-theme="ocean"] .vedette button, [data-theme="peche"] .vedette button,
[data-theme="menthe"] .vedette button, [data-theme="framboise"] .vedette button, [data-theme="soleil"] .vedette button,
[data-theme="foret"] .vedette button, [data-theme="corail"] .vedette button, [data-theme="ardoise"] .vedette button,
[data-theme="perso"]:not([data-mode="s"]) .vedette button { color: var(--vedette); background: var(--terre-clair); }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.themes button { background: var(--fond); color: var(--encre); border: 1.5px solid var(--trait); justify-content: flex-start; padding: 10px 12px; font-size: 14px; }
.themes button.actif { border-color: var(--terre); background: var(--terre-clair); }
.pastille-theme { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.t-lilas { background: linear-gradient(135deg, #C9B6EA 50%, #1F4D3A 50%); } .t-rose { background: linear-gradient(135deg, #F8DCE6 50%, #A23B5C 50%); }
.t-ocean { background: linear-gradient(135deg, #D5EAF2 50%, #1F5E7A 50%); } .t-peche { background: linear-gradient(135deg, #F8DFD2 50%, #C65D3B 50%); }
.t-nuit { background: linear-gradient(135deg, #2D2550 50%, #121418 50%); }
.t-menthe { background: linear-gradient(135deg, #D3EEE1 50%, #23735A 50%); } .t-framboise { background: linear-gradient(135deg, #F7D2E0 50%, #B0124F 50%); }
.t-soleil { background: linear-gradient(135deg, #FBEAB0 50%, #9A6A00 50%); } .t-foret { background: linear-gradient(135deg, #DCE8D5 50%, #2E5233 50%); }
.t-corail { background: linear-gradient(135deg, #FADBD5 50%, #C9483A 50%); } .t-ardoise { background: linear-gradient(135deg, #DCE3EE 50%, #3A4A63 50%); }
.t-perso { background: conic-gradient(#e66 0 60deg, #eb5 60deg 120deg, #6c6 120deg 180deg, #5bd 180deg 240deg, #86e 240deg 300deg, #e6b 300deg); }
.perso-couleurs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perso-couleurs label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 14px; }
.perso-couleurs input[type=color] { width: 100%; height: 44px; padding: 2px; border: 1.5px solid var(--trait); border-radius: 14px; background: var(--carte); }
.apercu-perso { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 16px; }
.interrupteur { margin: 0; padding: 4px 0; }
.prefs > * { padding: 8px 0; }
/* ── Photos ── */
.avatar { overflow: visible; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .hum { z-index: 1; }
.avatar.grand { width: 84px; height: 84px; font-size: 32px; }
.fond-couple { margin: calc(-18px - env(safe-area-inset-top)) -18px -64px; height: 220px; overflow: hidden; border-radius: 0 0 28px 28px; position: relative; }
.fond-couple img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fond-couple::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); }
.couple-tete.sur-fond { position: relative; z-index: 1; color: #fff; }
.couple-tete.sur-fond .doux, .couple-tete.sur-fond a { color: #F4F0FA; }
.couple-tete.sur-fond .avatar { box-shadow: 0 0 0 3px #fff; }
/* ── Confettis ── */
.confettis { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }
/* ── Taquin ── */
.taquin { display: grid; grid-template-columns: repeat(var(--k), 1fr); gap: 3px; background: var(--trait); padding: 3px; border-radius: 16px; aspect-ratio: 1; }
.taquin > * { aspect-ratio: 1; border-radius: 8px; overflow: hidden; }
.taquin button { padding: 0; background: var(--terre-clair); color: var(--encre); display: block; border: 0; transition: transform .08s; }
.taquin button:active { transform: scale(.95); }
.taquin .vide { background: transparent; }
.taquin .numero { display: grid; place-items: center; height: 100%; font: 700 22px var(--serif); }
.taquin button.bien .numero { color: var(--terre); }
.taquin .morceau { display: block; width: 100%; height: 100%; background-size: calc(var(--k) * 100%) calc(var(--k) * 100%); }
/* ── Boggle ── */
.boggle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; touch-action: manipulation; }
.boggle button { aspect-ratio: 1; padding: 0; border-radius: 16px; background: var(--carte); color: var(--encre); border: 2px solid var(--trait); font: 700 28px var(--serif); box-shadow: var(--ombre); }
.boggle button.sel { background: var(--terre-clair); border-color: var(--lilas); }
.boggle button.der { background: var(--terre); color: var(--sur-terre); border-color: var(--terre); }
.boggle-mot { text-align: center; font: 700 26px var(--serif); letter-spacing: .12em; min-height: 34px; color: var(--terre); }
/* ── Petit bac ── */
.pb-lettre { font: 700 64px/1 var(--serif); color: var(--terre); }
.pb-juge { width: 100%; display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 0 10px; background: var(--fond); color: var(--encre); border: 1.5px solid var(--trait); border-radius: 14px; padding: 8px 12px; }
.pb-juge small { grid-column: 1; color: var(--doux); font-size: 12px; } .pb-juge b { grid-column: 1; }
.pb-juge span { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 20px; }
.pb-juge.oui span { color: var(--sauge); } .pb-juge.non { opacity: .6; } .pb-juge.non b { text-decoration: line-through; }
.pb-table { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; font-size: 14px; }
.pb-table small { color: var(--doux); }
.pb-table .oui::before { content: "✓ "; color: var(--sauge); font-weight: 700; } .pb-table .non { color: var(--doux); text-decoration: line-through; }
/* ── Devinettes ── */
.dev-emo { font-size: 46px; line-height: 1.2; letter-spacing: .06em; padding: 8px 0; word-break: break-word; }
/* ── Dames ── */
.dames { display: grid; border-radius: 12px; overflow: hidden; border: 3px solid var(--terre); aspect-ratio: 1; }
.dames > * { aspect-ratio: 1; }
.dames .clair { background: var(--terre-clair); }
.dames button { padding: 0; border-radius: 0; background: var(--lilas); display: block; position: relative; border: 0; }
.dames button .pion-d { position: absolute; inset: 11%; width: auto; }
.dames button.jouable { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.dames button.sel { background: var(--vedette); }
.dames button.cible { background: var(--sauge); }
.dames button.der { background: color-mix(in srgb, var(--lilas) 70%, #E0A030); }
.dames button.pris { background: color-mix(in srgb, var(--lilas) 70%, #c0392b); }
.pion-d { display: inline-block; width: 78%; aspect-ratio: 1; border-radius: 50%; vertical-align: middle; }
.ligne .pion-d { width: 14px; }
.pion-d.blanc { background: radial-gradient(circle at 35% 30%, #fff, #E8E1D5 60%, #CFC5B4); box-shadow: 0 2px 0 #A89F90; }
.pion-d.noir { background: radial-gradient(circle at 35% 30%, #6A5A57, #2E2422 65%); box-shadow: 0 2px 0 #120d0c; }
.pion-d.dame { position: relative; } .pion-d.dame::after { content: "♛"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #E0A030; }
/* ── Match à deux ── */
.pile-cartes { display: grid; place-items: center; min-height: 230px; }
.carte-match { position: relative; width: 100%; min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px;
  background: var(--carte); border: 1.5px solid var(--trait); border-radius: 26px; padding: 26px 20px; box-shadow: var(--ombre); touch-action: pan-y; user-select: none; transition: transform .22s, opacity .22s; }
.carte-match .etiquette { position: absolute; top: 14px; left: 18px; }
.cm-texte { font: 600 26px/1.25 var(--serif); }
.carte-match .tampon { position: absolute; top: 18px; padding: 4px 10px; border: 3px solid; border-radius: 10px; font: 800 18px var(--serif); opacity: 0; transition: opacity .1s; }
.tampon.oui { right: 18px; color: var(--sauge); transform: rotate(12deg); } .tampon.non { left: 18px; color: #c0392b; transform: rotate(-12deg); }
.carte-match.vers-oui .tampon.oui, .carte-match.vers-non .tampon.non { opacity: 1; }
.carte-match.part-droite { transform: translateX(120%) rotate(18deg) !important; opacity: 0; }
.carte-match.part-gauche { transform: translateX(-120%) rotate(-18deg) !important; opacity: 0; }
.match-boutons button { font-size: 30px; padding: 12px; border-radius: 999px; }
.match-boutons .non { background: var(--carte); color: #c0392b; border: 2px solid var(--trait); }
.match-boutons .oui { background: var(--terre); color: var(--sur-terre); }
/* ── Roue ── */
.roue { position: relative; width: min(100%, 320px); margin: 0 auto; }
.roue-svg { width: 100%; display: block; }
#roue-g { transform-origin: 160px 160px; transform-box: view-box; }
.roue-fleche { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 1; font-size: 26px; color: var(--encre); text-shadow: 0 2px 0 var(--carte); }
.roue-res { min-height: 24px; font-size: 18px; }
/* ── Souvenirs ── */
.souvenir-jour, .souvenir-accueil { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.souvenir-jour img, .souvenir-accueil img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; flex: none; }
.souvenir-jour .titre { font-weight: 700; }
/* ── Photo de la semaine ── */
.photos-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photos-duo figure { margin: 0; background: var(--carte); border: 1px solid var(--trait); border-radius: 18px; overflow: hidden; }
.photos-duo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.photos-duo figcaption { padding: 8px 10px; font-size: 13px; }
.photos-duo figure.vide > span { display: grid; place-items: center; aspect-ratio: 3 / 4; font-size: 34px; background: var(--terre-clair); }
/* ── Étoiles ── */
.etoiles { white-space: nowrap; }
.etoiles button, .etoiles span { background: none; border: 0; padding: 0 1px; font-size: 18px; color: var(--trait); }
.etoiles .on { color: #E0A030; }
.pb-form label { margin-top: 8px !important; }
/* ── Série 3 : 2048, vrai ou faux, qui suis-je, yams, envies, lieux, playlist, sondage, rebours, défis du mois ── */
.badge.actif { background: var(--terre); color: var(--sur-terre); }
.badge.gros { font-size: 16px; padding: 10px 16px; }
.trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.j2048 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; border-radius: 18px; background: var(--trait); touch-action: none; }
.j2048 span { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font: 700 26px var(--serif); background: var(--carte); color: var(--encre); }
.j2048 .t0 { background: color-mix(in srgb, var(--carte) 60%, transparent); }
.j2048 .t2 { background: #F3EEF9; } .j2048 .t4 { background: #E6DCF5; } .j2048 .t8 { background: #D3C3EE; }
.j2048 .t16 { background: #B9A3E0; color: #fff; } .j2048 .t32 { background: #9A80CC; color: #fff; } .j2048 .t64 { background: #7C5FB8; color: #fff; }
.j2048 .t128 { background: #6FA58B; color: #fff; font-size: 22px; } .j2048 .t256 { background: #4F8C6F; color: #fff; font-size: 22px; }
.j2048 .t512 { background: #3E7A5E; color: #fff; font-size: 22px; } .j2048 .t1024 { background: #2C6249; color: #fff; font-size: 18px; }
.j2048 .t2048, .j2048 .t4096 { background: #E0A030; color: #fff; font-size: 18px; box-shadow: 0 0 18px #E0A03088; }
.fleches { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; justify-content: center; }
.fleches button { padding: 10px 0; font-size: 20px; background: var(--terre-clair); color: var(--terre); }
.vf-texte { font: 600 21px/1.3 var(--serif); padding: 10px 0; }
.vf-b { font-size: 18px; padding: 16px; } .vf-b.faux { background: #F6DADA; color: #8E2B2B; } .vf-b.vrai { background: #D6EADF; color: #23573F; }
.vf.bon { border: 2px solid var(--sauge); } .vf.faux { border: 2px solid #C0392B; }
.vf-verdict { font: 700 24px var(--serif); } .vf.bon .vf-verdict { color: var(--sauge); } .vf.faux .vf-verdict { color: #C0392B; }
.qsj { display: flex; flex-direction: column; gap: 6px; }
.qsj .bulle { max-width: 80%; } .qsj .bulle.moi { align-self: flex-end; } .qsj .bulle.lui { align-self: flex-start; }
.qsj .bulle.essai { font-weight: 700; }
.des { display: flex; justify-content: center; gap: 8px; }
.de { width: 52px; height: 52px; padding: 6px; border-radius: 12px; background: var(--carte); border: 2px solid var(--trait); box-shadow: var(--ombre); transition: transform .15s; }
.de:disabled { opacity: 1; }
.de.garde { border-color: var(--terre); background: var(--terre-clair); transform: translateY(-6px); }
.de.eteint { opacity: .35; }
.de.roule { animation: roule .35s ease; }
@keyframes roule { 50% { transform: rotate(160deg) scale(.85); } }
.face { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; }
.face i { display: block; margin: 15%; border-radius: 50%; }
.face i.on { background: var(--encre); }
.feuille-y { display: grid; grid-template-columns: 1fr 70px 70px; gap: 6px 8px; align-items: center; text-align: center; font-size: 15px; }
.feuille-y > :nth-child(3n+1) { text-align: left; }
.feuille-y .pris { font-weight: 700; } .feuille-y .vide { color: var(--doux); }
.case-y { padding: 4px 0; font-size: 15px; background: var(--terre-clair); color: var(--terre); border: 1.5px dashed var(--terre); }
.case-y.zero { background: transparent; color: var(--doux); border-color: var(--trait); }
.envie { padding: 10px 0; border-bottom: 1px solid var(--trait); } .envie:last-child { border-bottom: 0; }
.envie.offerte { opacity: .55; }
.coeurs { color: #D25A7E; letter-spacing: 1px; }
.trio-stats { grid-template-columns: 1fr 1fr 1fr; }
.lieu { display: flex; gap: 12px; align-items: flex-start; }
.lieu img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; }
.rebours, .rebours-accueil { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.r-emoji { font-size: 30px; }
.r-j { font: 700 22px var(--serif); color: var(--terre); white-space: nowrap; }
.objectif.reussi { border: 2px solid #E0A030; }
.chiffre-petit { font: 700 18px var(--serif); }
button.badge { font-size: 14px; padding: 7px 12px; }
button.badge.gros, .vedette button.badge.gros { font-size: 16px; padding: 10px 16px; background: var(--carte); color: var(--encre); border: 0; }
#emojis button.badge, #emo button.badge { font-size: 20px; padding: 6px 10px; }
a.carte.rebours-accueil, a.carte.souvenir-accueil, a.carte.souvenir-jour, .carte.rebours, .carte.lieu { display: flex; }
/* ── Monnaie : les avions ── */
.av-ic { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.28em; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2249%22%20fill%3D%22%23E6DCF5%22/%3E%3Cg%20transform%3D%22rotate%2838%2050%2050%29%20translate%289%209%29%20scale%28.82%29%22%3E%3Cpath%20d%3D%22M57%2034%20L93%2055%20Q96%2057%2094%2061%20L57%2053%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M43%2034%20L7%2055%20Q4%2057%206%2061%20L43%2053%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M56%2075%20L71%2084%20Q73%2086%2070%2088%20L55%2085%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M44%2075%20L29%2084%20Q27%2086%2030%2088%20L45%2085%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cellipse%20cx%3D%2273%22%20cy%3D%2252%22%20rx%3D%223.6%22%20ry%3D%227%22%20fill%3D%22%232C2733%22/%3E%3Cellipse%20cx%3D%2227%22%20cy%3D%2252%22%20rx%3D%223.6%22%20ry%3D%227%22%20fill%3D%22%232C2733%22/%3E%3Cpath%20d%3D%22M50%203%20C56%203%2058.5%2011%2058.5%2020%20L58.5%2070%20C58.5%2079%2055%2087%2050%2094%20C45%2087%2041.5%2079%2041.5%2070%20L41.5%2020%20C41.5%2011%2044%203%2050%203%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M50%2024%20L50%2082%22%20stroke%3D%22%233A3442%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22/%3E%3Cpath%20d%3D%22M45.5%2014%20Q50%209.5%2054.5%2014%20L53.6%2017.5%20Q50%2015%2046.4%2017.5%20Z%22%20fill%3D%22%23C9B6EA%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.av-grand { display: block; width: 120px; height: 102px; margin: 0 auto; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20200%20170%22%3E%3Cpath%20d%3D%22M88%20108%20C%2070%20124%2C%2050%20118%2C%2040%20130%22%20fill%3D%22none%22%20stroke%3D%22%23C9B6EA%22%20stroke-width%3D%223%22%20stroke-dasharray%3D%222%207%22%20stroke-linecap%3D%22round%22/%3E%3Cpath%20d%3D%22M32%20144%20C%2022%20134%2C%2022%20124%2C%2030%20122%20C%2034%20121%2C%2037%20124%2C%2038%20127%20C%2040%20123%2C%2044%20121%2C%2047%20123%20C%2054%20127%2C%2049%20138%2C%2038%20147%20Z%22%20fill%3D%22none%22%20stroke%3D%22%23D25A7E%22%20stroke-width%3D%222.4%22%20stroke-linejoin%3D%22round%22/%3E%3Ccircle%20cx%3D%22130%22%20cy%3D%2272%22%20r%3D%2264%22%20fill%3D%22%23E6DCF5%22/%3E%3Ccircle%20cx%3D%22130%22%20cy%3D%2272%22%20r%3D%2264%22%20fill%3D%22none%22%20stroke%3D%22%23C9B6EA%22%20stroke-width%3D%222%22/%3E%3Cg%20transform%3D%22rotate%2838%20130%2072%29%20translate%2880%2022%29%22%3E%3Cpath%20d%3D%22M57%2034%20L93%2055%20Q96%2057%2094%2061%20L57%2053%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M43%2034%20L7%2055%20Q4%2057%206%2061%20L43%2053%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M56%2075%20L71%2084%20Q73%2086%2070%2088%20L55%2085%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M44%2075%20L29%2084%20Q27%2086%2030%2088%20L45%2085%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cellipse%20cx%3D%2273%22%20cy%3D%2252%22%20rx%3D%223.6%22%20ry%3D%227%22%20fill%3D%22%232C2733%22/%3E%3Cellipse%20cx%3D%2227%22%20cy%3D%2252%22%20rx%3D%223.6%22%20ry%3D%227%22%20fill%3D%22%232C2733%22/%3E%3Cpath%20d%3D%22M50%203%20C56%203%2058.5%2011%2058.5%2020%20L58.5%2070%20C58.5%2079%2055%2087%2050%2094%20C45%2087%2041.5%2079%2041.5%2070%20L41.5%2020%20C41.5%2011%2044%203%2050%203%20Z%22%20fill%3D%22%2317141C%22/%3E%3Cpath%20d%3D%22M50%2024%20L50%2082%22%20stroke%3D%22%233A3442%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22/%3E%3Cpath%20d%3D%22M45.5%2014%20Q50%209.5%2054.5%2014%20L53.6%2017.5%20Q50%2015%2046.4%2017.5%20Z%22%20fill%3D%22%23C9B6EA%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.perso-accueil .masque { opacity: .5; }
.perso-accueil .ligne button:disabled { opacity: .25; }
