/* Lokbail, application locataire. Clair et posé : du blanc, une couleur forte (cobalt), le citron pour ce qui
   compte, des illustrations plutôt que des emojis (static/app/illustrations, templates/app/_icones.html). */

/* Polices servies par Lokbail (licence SIL OFL) : aucune requête vers Google Fonts.
   Unbounded pour les titres, Schibsted Grotesk pour tout le reste. */
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../polices/unbounded-latin-wght-normal.8616dc355070.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("../polices/unbounded-latin-ext-wght-normal.c07fbf1bfefa.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../polices/schibsted-grotesk-latin-wght-normal.ba4038fc5cb5.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("../polices/schibsted-grotesk-latin-ext-wght-normal.65233324c912.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cobalt: #2F3CFF;
  --cobalt-fonce: #1F28B8;
  --cobalt-pale: #E6E8FF;
  --citron: #D7FF3F;
  --citron-pale: #F2FFC9;
  --bonbon: #FF8AD1;
  --bonbon-pale: #FFE8F5;
  --signal: #FF5A1F;
  --signal-pale: #FFEDE4;
  --encre: #121216;
  --doux: #6B6B73;
  --fond: #F6F6F2;
  --papier: #F6F6F2;
  --carte: #FFFFFF;
  --bord: #E9E9E3;
  --ombre-carte: 0 1px 2px rgba(18, 18, 22, .04), 0 6px 20px rgba(18, 18, 22, .05);
  /* Couleurs de texte contrastées (4,5:1 minimum) pour les touches vives. */
  --citron-texte: #55700A;
  --bonbon-texte: #B01267;
  --signal-texte: #C23A00;
  --police: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --police-titre: "Unbounded", "Schibsted Grotesk", system-ui, sans-serif;
  --rayon: 18px;
  /* Courbes partagées : --sortie pour ce qui apparaît ou répond au doigt,
     --mouvement pour ce qui se déplace d'un point à un autre. */
  --sortie: cubic-bezier(0.23, 1, 0.32, 1);
  --mouvement: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  /* Pas de « tirer pour rafraîchir » ni de rebond de page : on est dans une app, pas dans un document. */
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%; /* pas de grossissement du texte en paysage */
}
body.app {
  font-family: var(--police); color: var(--encre); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background: #ECECE6; min-height: 100vh; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--cobalt); font-weight: 600; }
img { max-width: 100%; display: block; }
p { margin: 0 0 .6em; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icônes (sprite) et illustrations */
.i { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -.22em; }
.illus { height: auto; }

/* Sur ordinateur, l'app s'affiche comme un téléphone au centre de l'écran. */
.ecran { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--fond); position: relative; box-shadow: 0 0 60px rgba(18, 18, 22, .1); }
@media (max-width: 480px) {
  body.app { background: var(--fond); }
  .ecran { box-shadow: none; }
}
.contenu { padding: 0 16px calc(104px + env(safe-area-inset-bottom)); }

/* En-têtes -------------------------------------------------------------- */
.hero-jeu {
  background: var(--carte); color: var(--encre);
  padding: calc(20px + env(safe-area-inset-top)) 20px 22px; border-radius: 0 0 28px 28px; margin-bottom: 8px;
  box-shadow: 0 1px 0 var(--bord);
}
/* Une illustration à droite du titre. */
.hero-jeu.avec-illus { display: grid; grid-template-columns: minmax(0, 1fr) 104px; column-gap: 10px; align-items: center; }
.hero-jeu.avec-illus > * { grid-column: 1; }
.hero-jeu.avec-illus > .illus { grid-column: 2; grid-row: 1 / span 4; width: 104px; }
.hero-haut { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar {
  width: 46px; height: 46px; border-radius: 15px; background: var(--citron); color: var(--encre);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; flex-shrink: 0;
}
.avatar.petit { width: 42px; height: 42px; border-radius: 14px; font-size: 18px; background: var(--cobalt-pale); color: var(--cobalt); }
.puces { display: flex; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; background: var(--fond); color: var(--encre);
  padding: 7px 12px; border-radius: 99px; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.puce .i { color: var(--cobalt); }
.puce.serie .i { color: var(--signal); }
.surtitre-jeu { font-size: 13px; font-weight: 600; color: var(--doux); margin: 0 0 2px; }
.niveau-titre { font-family: var(--police-titre); font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 4px; line-height: 1.2; }
.hero-sous { color: var(--doux); margin: 0; font-size: 15px; }
.xp { height: 10px; background: var(--cobalt-pale); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.xp > div { height: 100%; width: 100%; background: var(--cobalt); border-radius: 99px; }
.xp-legende { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--doux); margin-top: 6px; }
.solde-geant { font-family: var(--police-titre); font-size: 40px; font-weight: 800; margin: 4px 0; line-height: 1; letter-spacing: -.03em; display: flex; justify-content: center; align-items: center; gap: 10px; }
.solde-geant .i { color: var(--cobalt); }

.accueil-app { text-align: center; padding: calc(40px + env(safe-area-inset-top)) 24px 8px; }
.accueil-app .illus, .illus-accueil { width: 180px; margin: 0 auto 10px; }
.logo-app {
  width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 24px; background: var(--citron);
  display: grid; place-items: end center;
}
/* La porte du logo, en grand, dans le carré citron. */
.logo-app .porte { width: 34px; height: 49px; }
.logo-app .battant { fill: var(--cobalt); }
.logo-app .poignee { fill: var(--bonbon); }
.accueil-app h1 { font-family: var(--police-titre); font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.03em; line-height: 1.15; }
.accueil-app p { color: var(--doux); margin: 8px 0 0; }

.titre-section { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; margin: 28px 2px 12px; }
.titre-section small { font-size: 14px; font-weight: 600; color: var(--doux); }
.compteur { background: var(--cobalt); color: #fff; font-size: 13px; font-weight: 700; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: inline-grid; place-items: center; }

/* Cartes ------------------------------------------------------------------- */
.carte-jeu { background: var(--carte); border-radius: var(--rayon); padding: 18px; box-shadow: var(--ombre-carte); margin-bottom: 12px; }
.veille-galerie { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 88px 88px; gap: 4px; margin: -2px -2px 16px; overflow: hidden; border-radius: 14px; background: var(--fond); }
.veille-galerie img { width: 100%; height: 100%; object-fit: cover; }
.veille-galerie img:first-child { grid-row: span 2; }
.carte-icone { display: flex; gap: 14px; align-items: flex-start; }
.pastille-icone { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--cobalt-pale); color: var(--cobalt); flex-shrink: 0; }
.pastille-icone .i { width: 22px; height: 22px; }
/* Réglage rarement utile : replié, discret, mais toujours là. */
.reglage-discret { margin-top: 22px; }
.reglage-discret summary { list-style: none; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; color: var(--doux); cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.reglage-discret summary::-webkit-details-marker { display: none; }
.reglage-discret summary::after { content: " ›"; }
.reglage-discret[open] summary::after { content: " ⌄"; }
.reglage-discret .carte-jeu { margin-top: 6px; }
.carte-jeu.vide { text-align: center; color: var(--doux); padding: 22px 18px; }
.carte-jeu.vide .illus { width: 150px; margin: 0 auto 6px; }
.carte-jeu.vide p { margin: 0; font-weight: 600; }
.carte-jeu.succes { text-align: center; font-weight: 700; font-size: 17px; background: var(--citron-pale); color: var(--encre); box-shadow: none; border: 1px solid #DDF39A; }
.carte-jeu.succes .illus { width: 150px; margin: 0 auto 4px; }
.carte-jeu.succes p { margin: 0; }

/* Missions ------------------------------------------------------------------ */
.missions { display: grid; gap: 10px; }
.mission {
  display: flex; align-items: center; gap: 14px; background: var(--carte); border-radius: 16px; padding: 12px 14px 12px 12px;
  box-shadow: var(--ombre-carte); text-decoration: none; color: inherit;
  transition: transform .14s var(--sortie);
}
.mission:active { transform: scale(.98); }
.mission .emoji { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--cobalt-pale); color: var(--cobalt); }
.mission .emoji .i { width: 24px; height: 24px; }
.missions .mission:nth-child(4n+2) .emoji { background: var(--citron-pale); color: var(--citron-texte); }
.missions .mission:nth-child(4n+3) .emoji { background: var(--bonbon-pale); color: var(--bonbon-texte); }
.missions .mission:nth-child(4n) .emoji { background: var(--signal-pale); color: var(--signal-texte); }
.mission .corps { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mission .nom { font-weight: 700; font-size: 16px; line-height: 1.25; }
.mission .quand { font-size: 13px; color: var(--doux); }
.mission.faite { opacity: .6; }
.gain { font-weight: 800; font-size: 14px; color: var(--cobalt); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.etat { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--cobalt-pale); color: var(--cobalt); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.etat.VALIDEE { background: var(--citron); color: var(--encre); }
.etat.EN_COURS { background: var(--signal-pale); color: var(--signal-texte); }
.etat.REFUSEE, .etat.MANQUEE { background: var(--bonbon-pale); color: var(--bonbon-texte); }

.liste-jeu { padding-top: 6px; padding-bottom: 6px; }
.liste-jeu .ligne-jeu { display: flex; align-items: center; gap: 12px; padding: 12px 2px; }
.liste-jeu .ligne-jeu + .ligne-jeu { border-top: 1px solid var(--bord); }
.ligne-jeu .corps { flex: 1; min-width: 0; }
a.ligne-jeu.lien-ligne { color: inherit; text-decoration: none; }
.premium-app { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--bord); }
.premium-app p { margin: 0 0 12px; }
.ligne-jeu .petit-emoji { width: 38px; height: 38px; border-radius: 12px; background: var(--fond); color: var(--cobalt); display: grid; place-items: center; flex-shrink: 0; }
.ligne-jeu .petit-emoji .i { width: 20px; height: 20px; }
.ligne-jeu strong { display: block; font-weight: 700; }
.ligne-jeu small { color: var(--doux); }
.ligne-jeu .valeur { font-weight: 800; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }

/* Objectif, badges, classement */
.objectif-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; }
.objectif-haut .gros { font-family: var(--police-titre); font-size: 20px; font-weight: 700; color: var(--cobalt); white-space: nowrap; }
.barre-jeu { height: 10px; background: var(--cobalt-pale); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; position: relative; }
.barre-jeu > div { height: 100%; width: 100%; background: var(--cobalt); border-radius: 99px; }
.barre-jeu .repere { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--encre); opacity: .3; }
.objectif small { color: var(--doux); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-jeu { background: var(--carte); border-radius: 16px; padding: 14px 6px 12px; text-align: center; box-shadow: var(--ombre-carte); }
.badge-jeu .ico { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--citron); color: var(--encre); }
.badge-jeu .ico .i { width: 24px; height: 24px; }
.badge-jeu .lib { font-size: 12px; font-weight: 700; margin-top: 8px; line-height: 1.2; }
.badge-jeu.verrouille .ico { background: var(--fond); color: #B9B9B2; }
.badge-jeu.verrouille .lib { color: var(--doux); }
.rang-medaille { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--doux); background: var(--fond); flex-shrink: 0; }
.rang-medaille.rang-1 { background: #FFE27A; color: #6B4E00; }
.rang-medaille.rang-2 { background: #E3E5EA; color: #4A4F5A; }
.rang-medaille.rang-3 { background: #F6CFAE; color: #7A3D0B; }
.ligne-jeu.moi { background: var(--cobalt-pale); border-radius: 14px; padding-left: 10px; padding-right: 10px; border-top-color: transparent !important; }

/* Boutons ------------------------------------------------------------------- */
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 14px 20px; font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: var(--cobalt);
  cursor: pointer; text-decoration: none; min-height: 50px;
  transition: transform .14s var(--sortie), background-color .14s;
}
.gbtn:active { transform: scale(.98); }
.gbtn.violet { background: var(--cobalt); }
.gbtn.violet:active { background: var(--cobalt-fonce); }
.gbtn.or { background: var(--citron); color: var(--encre); }
.gbtn.blanc { background: var(--carte); color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--bord); }
.gbtn.bloc { width: 100%; }
.gbtn.petit { padding: 10px 14px; font-size: 15px; border-radius: 12px; min-height: 42px; }
.gbtn:disabled { opacity: .45; cursor: default; }
.gbtn:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.gbtn + .gbtn.bloc, .pile > * + * { margin-top: 10px; }
.pile { display: grid; }
.lien-bas { text-align: center; font-weight: 600; color: var(--doux); margin: 16px 0; }
.lien-jeu { background: none; border: 0; font: inherit; font-weight: 600; color: var(--cobalt); cursor: pointer; text-decoration: underline; }

/* Mission et conversation : en-tête centré -------------------------------- */
.entete-mission {
  background: var(--carte); color: var(--encre); text-align: center; position: relative;
  padding: calc(16px + env(safe-area-inset-top)) 20px 22px; border-radius: 0 0 28px 28px; margin-bottom: 18px;
  box-shadow: 0 1px 0 var(--bord);
}
.retour-jeu {
  position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top)); width: 40px; height: 40px; border-radius: 13px;
  background: var(--fond); color: var(--encre); display: grid; place-items: center; font-size: 24px; font-weight: 500; text-decoration: none;
}
.emoji-geant { font-size: 64px; line-height: 1; margin: 18px 0 10px; }
.entete-mission .illus-entete { width: 150px; margin: 10px auto 4px; }
.pastille-geante { width: 76px; height: 76px; border-radius: 24px; margin: 18px auto 12px; display: grid; place-items: center; background: var(--cobalt-pale); color: var(--cobalt); }
.pastille-geante .i { width: 38px; height: 38px; }
.entete-mission h1 { font-family: var(--police-titre); font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; line-height: 1.25; }
.entete-mission p { margin: 0; color: var(--doux); }
.entete-mission p a { color: inherit; }
.etapes { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.etapes li { display: flex; align-items: center; gap: 12px; background: var(--carte); border-radius: 16px; padding: 12px 14px; box-shadow: var(--ombre-carte); }
.etapes .rond { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--cobalt-pale); color: var(--cobalt); flex-shrink: 0; }
.etapes li.courante { box-shadow: 0 0 0 2px var(--cobalt), var(--ombre-carte); }
.etapes li.fait .rond { background: var(--cobalt); color: #fff; }
.etapes li > div { flex: 1; min-width: 0; }
.etapes strong { display: block; font-weight: 700; }
.etapes small { color: var(--doux); }
.etapes img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; }
.motif { background: var(--bonbon-pale); color: var(--bonbon-texte); font-weight: 600; border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.note-camera { text-align: center; color: var(--doux); font-size: 13px; margin: 18px 8px; }
.chrono { text-align: center; font-weight: 700; color: var(--cobalt); margin: 0 0 12px; }


/* Boutique ------------------------------------------------------------------ */
.boutique { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.article { background: var(--carte); border-radius: var(--rayon); padding: 16px 12px 14px; box-shadow: var(--ombre-carte); text-align: center; display: grid; gap: 8px; align-content: start; }
.article-valeur { font-size: 30px; font-weight: 800; color: var(--cobalt); line-height: 1; }
.article-nom { font-weight: 700; }
.mini-barre { height: 8px; background: var(--cobalt-pale); border-radius: 99px; overflow: hidden; }
.mini-barre > div { height: 100%; width: 100%; background: var(--cobalt); border-radius: 99px; }
.article small { color: var(--doux); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: var(--cobalt-pale); padding: 4px 8px; border-radius: 8px; }

/* Coloc ----------------------------------------------------------------------- */
.colocs { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 8px; }
.coloc { display: grid; justify-items: center; gap: 6px; font-weight: 700; font-size: 14px; min-width: 64px; }
.lien-copie { width: 100%; font: inherit; font-weight: 600; font-size: 15px; padding: 12px; border: 1.5px solid var(--bord); border-radius: 14px; background: var(--fond); color: var(--doux); margin: 6px 0 10px; }

/* Carte des chambres et liste avec photos ----------------------------------- */
.carte-chambres { margin: 4px 0 4px; }
#carte-app { height: 240px; border-radius: var(--rayon); overflow: hidden; background: var(--cobalt-pale); box-shadow: var(--ombre-carte); isolation: isolate; z-index: 0; }
.note-carte { font-size: 12px; color: var(--doux); margin: 8px 4px 0; }
.pastille-prix span { display: inline-block; transform: translate(-50%, -50%); background: var(--encre); color: #fff; font: 700 13px/1 var(--police); padding: 7px 10px; border-radius: 99px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.liste-chambres { display: grid; gap: 10px; margin-bottom: 12px; }
.chambre-ligne { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: var(--carte); border-radius: 16px; box-shadow: var(--ombre-carte); color: inherit; text-decoration: none; transition: transform .14s var(--sortie); }
.chambre-ligne:active { transform: scale(.98); }
.chambre-photo { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--cobalt-pale); color: var(--cobalt); display: grid; place-items: center; flex-shrink: 0; }
.chambre-photo img { width: 100%; height: 100%; object-fit: cover; }
.chambre-photo .i { width: 26px; height: 26px; }
.chambre-ligne .corps { flex: 1; min-width: 0; display: grid; gap: 3px; }
.chambre-ligne strong { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chambre-ligne small { color: var(--doux); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.chambre-ligne .valeur { font-weight: 800; white-space: nowrap; }

/* Formulaires ----------------------------------------------------------------- */
.champ { margin-bottom: 14px; }
.champ > label, .etiquette { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.app input[type=text], .app input[type=email], .app input[type=password], .app textarea,
.app input[type=tel], .app input[type=number], .app input[type=date], .app select {
  width: 100%; font: inherit; font-weight: 500; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--bord);
  border-radius: 14px; background-color: #fff; color: var(--encre); outline: none; appearance: none;
  transition: border-color .14s, box-shadow .14s;
}
.app textarea { min-height: 96px; resize: vertical; }
.app select {
  padding-right: 42px; background-repeat: no-repeat; background-position: right 16px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%232F3CFF' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.app input:focus, .app textarea:focus, .app select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-pale); }
.app input[type=file] { width: 100%; font: inherit; font-size: 14px; color: var(--doux); margin-top: 10px; }
.app input[type=file]::file-selector-button {
  font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 9px 14px; margin-right: 10px;
  background: var(--cobalt-pale); color: var(--cobalt); cursor: pointer;
}
.app input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--cobalt); flex-shrink: 0; margin: 1px 0 0; }
.champ-case > label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.piece { padding: 14px 0; }
.piece + .piece { border-top: 1px solid var(--bord); }
.piece-haut { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.piece-haut label { margin: 0; }
.piece-haut a { display: inline-flex; align-items: center; gap: 4px; }
.piece small { display: block; color: var(--doux); font-size: 13px; margin-top: 2px; }
.piece.fournie .piece-haut a { color: var(--cobalt-fonce); }
.checklist ul, .manques { margin: 8px 0 0; padding-left: 20px; font-weight: 600; color: var(--signal-texte); }
.aide { font-size: 12px; color: var(--doux); margin-top: 4px; }
.erreurs { color: var(--bonbon-texte); font-weight: 600; font-size: 13px; margin: 4px 0; }

/* Navigation par onglets -------------------------------------------------------- */
.onglets {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40;
  display: flex; gap: 2px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--bord);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.onglets a { flex: 1; display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--doux); text-decoration: none; padding: 6px 0 4px; }
.onglets a .ico { width: 52px; height: 30px; border-radius: 99px; display: grid; place-items: center; transition: background-color .15s var(--sortie); }
.onglets a .ico .i { width: 23px; height: 23px; }
.onglets a.actif { color: var(--cobalt); }
.onglets a.actif .ico { background: var(--cobalt-pale); }

/* Notifications et fête ----------------------------------------------------------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(448px, calc(100% - 32px)); z-index: 80; display: grid; gap: 8px; pointer-events: none; }
.toast {
  background: var(--encre); color: #fff; font-weight: 600; padding: 14px 16px; border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  opacity: 1; transform: none;
  transition: opacity .2s var(--sortie), transform .2s var(--sortie);
  animation: toast-sortie .4s var(--sortie) 4.8s forwards;
}
@starting-style {
  .toast { opacity: 0; transform: translateY(-14px) scale(.96); }
}
.toast.success { background: var(--encre); }
.toast.error { background: var(--bonbon-texte); animation-delay: 7.8s; }
.toast.fete { background: var(--citron); color: var(--encre); font-weight: 700; text-align: center; }
@keyframes toast-sortie { to { opacity: 0; transform: translateY(-10px) scale(.98); visibility: hidden; } }
.confettis { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confettis i { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 3px;
  animation: tombe cubic-bezier(.36, 0, .9, .55) forwards; }
@keyframes tombe { to { transform: translateY(110vh) rotate(760deg); } }

@media (prefers-reduced-motion: reduce) {
  .toast, .entree { animation: none; }
  .entree { display: none; }
  .toast { opacity: 1; transform: none; transition: none; }
  .mission, .gbtn, .onglets a .ico, .chambre-ligne { transition: none; }
  .mission:active, .gbtn:active, .chambre-ligne:active { transform: none; }
  .jauge-animee > div { transition: none; }
}

/* Envoi en cours (static/formulaires.js) */
.gbtn.en-cours { opacity: .75; cursor: progress; }
.gbtn.en-cours::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: tourne .7s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* Comportements attendus d'une app installée -------------------------------------- */
/* Réponse immédiate au doigt (plus d'attente du double-tap) et pas de sélection du texte
   des boutons à l'appui long : ce texte est une commande, pas du contenu. */
.app a, .app button, .app [role="button"], .onglets a, .mission, .gbtn {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* Le contenu, lui, reste copiable (lien de cooptation, montants, dates). */
.app p, .app li, .app td, .app input, .app .lien-copie {
  user-select: text;
  -webkit-user-select: text;
}
/* Les listes défilantes ne font plus bouger la page derrière elles. */
.contenu { overscroll-behavior: contain; }

/* Jauges qui montent ------------------------------------------------------------- */
/* La valeur arrive du gabarit en pourcentage brut : style="--valeur: 62".
   On l'anime en transform (pas en largeur) : aucun recalcul de mise en page. */
.jauge-animee > div {
  transform-origin: left center;
  transform: scaleX(calc(max(var(--valeur, 0), 2) / 100));
  transition: transform .7s var(--sortie) .12s;
}
@starting-style {
  .jauge-animee > div { transform: scaleX(0); }
}

/* Entrée dans l'app : on pousse la porte du logo et on la franchit ---------------- */
.entree {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--cobalt); pointer-events: none;
  animation: entree-traverse .95s cubic-bezier(.65, 0, .35, 1) forwards;
}
/* Le carré citron de l'icône, avec la porte posée sur son bord bas. */
.entree-cadre {
  width: 128px; height: 128px; border-radius: 33px; background: var(--citron);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden; position: relative;
  /* On grandit depuis l'embrasure : c'est par là qu'on passe. */
  transform-origin: 50% 86%;
  animation: entree-cadre .95s cubic-bezier(.65, 0, .35, 1) forwards;
}
/* La lumière du logement, derrière la porte. */
.entree-lumiere {
  position: absolute; bottom: 0; left: 50%; width: 55px; height: 81px; margin-left: -27.5px;
  border-radius: 27px 27px 0 0; background: #FFFFFF;
}
/* La porte s'ouvre vers nous, charnière à gauche : derrière, la lumière de l'app. */
.entree-porte {
  position: relative; width: 55px; height: 81px; background: var(--cobalt); border-radius: 27px 27px 0 0;
  transform-origin: left center; animation: entree-porte .95s cubic-bezier(.4, 0, .2, 1) forwards;
}
.entree-poignee { position: absolute; right: 9px; top: 39px; width: 13px; height: 13px; border-radius: 50%; background: var(--bonbon); }
@keyframes entree-porte {
  0%, 18% { transform: perspective(300px) rotateY(0deg); }
  58%, 100% { transform: perspective(300px) rotateY(-78deg); }
}
@keyframes entree-cadre {
  0% { transform: scale(.88); opacity: 0; }
  16% { transform: scale(1); opacity: 1; }
  55% { transform: scale(1); }
  /* On franchit la porte : le cadre grandit jusqu'à sortir de l'écran. */
  100% { transform: scale(14); opacity: .96; }
}
@keyframes entree-traverse {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* Vérification automatique des pièces, vue par le locataire ---------------------- */
.verif-jeu { margin: 14px 0 4px; padding: 14px; border-radius: 14px; background: var(--cobalt-pale); }
.verif-jeu.ATTENTION { background: var(--signal-pale); }
.verif-jeu.BLOQUANT { background: var(--bonbon-pale); }
.verif-titre { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 8px; }
.verif-pastille { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--cobalt); color: #fff; }
.verif-jeu.ATTENTION .verif-pastille { background: var(--signal-texte); }
.verif-jeu.BLOQUANT .verif-pastille { background: var(--bonbon-texte); }
.verif-jeu ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.verif-jeu small { display: block; margin-top: 10px; color: var(--doux); }

/* Un lien discret dans une phrase, qui reste un bouton de formulaire. */
.lien-nu { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--cobalt); text-decoration: underline; cursor: pointer; }

/* Compatibilité entre colocataires (services/matching) */
.compat { margin: 0 0 12px; padding: 16px 18px; border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre-carte); }
.compat p { margin: 8px 0 0; }
.compat-haut { display: flex; align-items: center; gap: 14px; line-height: 1.3; }
.compat-score { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--cobalt); white-space: nowrap; }
.compat-score small { font-size: .5em; }
.compat-moyen .compat-score { color: #B23E00; }
.compat-faible .compat-score { color: #D0021B; }
.compat-inconnu { background: var(--carte); }

/* Messagerie */
.fil { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.bulle { align-self: flex-start; max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--carte); box-shadow: var(--ombre-carte); }
.bulle.moi { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--cobalt); color: #fff; box-shadow: none; }
.bulle p { margin: 0; overflow-wrap: anywhere; }
.bulle small { display: block; margin-top: 4px; font-size: 11px; opacity: .7; }
.message-systeme { align-self: center; margin: 4px 0; padding: 7px 14px; border-radius: 14px; background: #ECECE6; color: var(--doux); font-size: 13px; text-align: center; }
.ecrire textarea { min-height: 84px; margin-bottom: 10px; }
.pastille-non-lu { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--signal); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.onglets a { position: relative; }
.pastille-non-lu.onglet { position: absolute; top: 2px; right: calc(50% - 26px); min-width: 18px; height: 18px; font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.ligne-jeu { color: inherit; text-decoration: none; }
.questionnaire-vie fieldset { border: 0; margin: 0 0 12px; }
.questionnaire-vie legend { float: left; width: 100%; margin-bottom: 10px; font-weight: 700; }
.choix-vie { display: grid; gap: 8px; clear: both; }
.choix-vie label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--fond); font-weight: 600; cursor: pointer; touch-action: manipulation; }
.choix-vie input { width: 20px; height: 20px; accent-color: var(--cobalt); flex-shrink: 0; }
.choix-vie label:has(input:checked) { background: var(--cobalt-pale); color: var(--cobalt); }

/* Champ piège anti-robots : invisible pour les humains. */
.piege { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Inscription : l'adresse a déjà un compte, on propose le mot de passe oublié. */
.compte-existant { background: var(--cobalt-pale); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; font-size: 15px; }
.compte-existant p { margin: 0 0 12px; }
.compte-existant-choix { display: flex; gap: 10px; }
.compte-existant-choix > * { flex: 1; text-align: center; cursor: pointer; margin: 0; }
/* Alertes de chambre : une alerte en pause reste visible, plus discrète. */
.ligne-jeu.en-pause .corps, .ligne-jeu.en-pause .petit-emoji { opacity: .5; }
