/* Renaide : mise en page. AUCUNE couleur ici : uniquement les variables de tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--renee-lait);
  color: var(--renee-encre);
  font-family: var(--font-text);
  font-size: var(--text-body);
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  gap: var(--space-4);
}

/* --- Titres ------------------------------------------------------------- */
.titre {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-h2);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

/* --- En-tête de conversation ------------------------------------------ */
.entete { display: flex; align-items: center; gap: var(--space-3); }
.entete__nom { font-weight: 700; font-size: var(--text-body); }
.entete__etat { font-size: var(--text-small); color: var(--renee-ardoise); }

/* --- Le fil ------------------------------------------------------------- */
.fil {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow-y: auto;
}

.bulle {
  max-width: 86%;
  padding: 11px 14px;
  line-height: 1.3;
  white-space: pre-line;
}
.bulle--renaide {
  align-self: flex-start;
  background: var(--renee-sable);
  border-radius: var(--radius-l) var(--radius-l) var(--radius-l) 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.bulle--aidant {
  align-self: flex-end;
  max-width: 80%;
  background: var(--renee-bonbon);
  border-radius: var(--radius-l) var(--radius-l) 6px var(--radius-l);
  font-size: var(--text-body);
}
.bulle--aidant img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-m);
}

.puces { align-self: flex-start; display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* --- Boutons ------------------------------------------------------------ */
.pill {
  font: inherit;
  font-weight: 600;
  font-size: var(--text-small);
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: var(--border-strong);
  background: transparent;
  color: var(--renee-encre);
  cursor: pointer;
}
.pill:focus-visible, .bouton:focus-visible, .champ:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.bouton {
  font: inherit;
  font-weight: 600;
  font-size: var(--text-body);
  height: var(--control-h-mobile);
  padding: 0 26px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--renee-encre);
  color: var(--renee-lait);
  cursor: pointer;
  width: 100%;
}
.bouton--cobalt { background: var(--renee-cobalt); }

/* --- Barre « Racontez-moi » ------------------------------------------- */
.barre {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 6px 6px var(--space-4);
  border-radius: var(--radius-pill);
  border: var(--border-strong);
}
.barre__champ {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: var(--text-body);
  color: var(--renee-encre);
  outline: none;
}
.barre__champ::placeholder { color: var(--renee-ardoise); }
.disque {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: var(--renee-cobalt);
  color: var(--renee-lait);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Écran du code d'accès -------------------------------------------- */
.acces { margin: auto 0; display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.champ {
  width: 100%;
  height: var(--control-h-mobile);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: var(--border-strong);
  background: transparent;
  font: inherit;
  color: var(--renee-encre);
}
.erreur { color: var(--renee-brique); font-size: var(--text-small); min-height: 1.2em; margin: 0; }

.cache { display: none; }
