/* Celia's colours (Celiacom, 2026-11-06): the logo's own colours by default, and two choices the merchant can
   pick at the bottom of the cahier: green and white, and Leppi (indigo). Design tokens: docs/04-design-ux-ui.md §3.
   Each palette sets the same tokens; outils/contrastes.cjs checks every text pair ≥ 4.5:1. System font: 0 KB. */
:root {
  /* « Celia » : the logo as it is, navy, cream and orange (the old Celia's colours). */
  --primaire: #142238;        /* header, summary, chosen tab, links */
  --sur-primaire: #F7F4EE;    /* text on the primary colour */
  --sur-primaire-doux: #B9BFCB; /* secondary text on the primary colour */
  --primaire-doux: #E4E8F0;   /* chosen chips, icon backgrounds, focus halo */
  --action: #FF6B35;          /* the main button (orange, dark text as on the old Celia) */
  --action-fonce: #E85A26;    /* pressed */
  --sur-action: #0B1424;
  --accent: #FF6B35;          /* the logo's swoosh: decoration only, never text */
  --fond: #F7F4EE;
  --blanc: #FFFFFF;
  --encre: #0B1424;
  --encre-douce: #4A5468;
  --trait: #E6E0D5;
  --recevoir: #0E7C66;
  --payer: #B03A1E;
  --payer-doux: #F8E6E1;
  --alerte: #8A5A00;
  --logo: url(/celia-logo-192.webp);
  --rayon: 16px;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--encre);
  background: var(--fond);
  -webkit-text-size-adjust: 100%;
}
/* « Vert et blanc » (the first choice of 2026-11-05). */
:root[data-couleurs="vert"] {
  --primaire: #0D6146;
  --sur-primaire: #FFFFFF;
  --sur-primaire-doux: #D3E8DE;
  --primaire-doux: #E3F1EA;
  --action: #0D6146;
  --action-fonce: #09482F;
  --sur-action: #FFFFFF;
  --accent: #7FDCA4;
  --fond: #F6F8F7;
  --encre: #0F2219;
  --encre-douce: #4F6358;
  --trait: #DDE5DF;
  --recevoir: #0D6146;
  --logo: url(/celia-logo-vert-192.webp);
}
/* « Leppi » : the indigo cloth of the Fouta-Djalon. */
:root[data-couleurs="leppi"] {
  --primaire: #2B3990;
  --sur-primaire: #FFFFFF;
  --sur-primaire-doux: #C9CFEF;
  --primaire-doux: #E6E8F6;
  --action: #2B3990;
  --action-fonce: #222D73;
  --sur-action: #FFFFFF;
  --accent: #A8BCFF;
  --fond: #F5F4F9;
  --encre: #161A33;
  --encre-douce: #545B78;
  --trait: #DFDEEA;
  --recevoir: #0E7C66;
  --logo: url(/celia-logo-leppi-192.webp);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; background: var(--fond); }
button, input { font: inherit; color: inherit; }

.entete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 16px; background: var(--primaire); color: var(--sur-primaire); }
/* The logo follows the chosen colours: a background image, so only the chosen one is downloaded (and a plain square of
   the primary colour if it is not on the phone yet, offline). */
.logo, .grand-logo { background: var(--primaire) var(--logo) center / cover no-repeat; }
.logo { display: block; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; }
.marque { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nom { font-size: 17px; font-weight: 700; line-height: 1.1; }
.sous-titre { font-size: 13px; color: var(--sur-primaire-doux); }
.etat { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); white-space: nowrap; }
.etat.attente { background: var(--blanc); color: var(--alerte); }

.ecran { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; }
.resume { display: flex; flex-direction: column; gap: 4px; background: var(--primaire); border-color: var(--primaire); color: var(--sur-primaire); }
.etiquette-claire, .detail-clair { color: var(--sur-primaire-doux); }
.etiquette-claire { font-size: 13px; }
.grand-montant { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tuile { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.etiquette { font-size: 13px; color: var(--encre-douce); }
.montant { font-size: 22px; font-weight: 700; }
.recevoir { color: var(--recevoir); }
.payer { color: var(--payer); }

.formulaire { display: flex; flex-direction: column; gap: 8px; }
.formulaire h1 { margin: 0 0 4px; font-size: 22px; }
.formulaire label { font-size: 15px; font-weight: 600; margin-top: 6px; }
/* Every text field and list: 48 px high at least (only elements with .champ: a checkbox keeps its own size). */
.champ { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--blanc); color: var(--encre); font-size: 17px; }
select.champ { padding-right: 8px; }
.champ:focus { outline: none; border-color: var(--primaire); box-shadow: 0 0 0 3px var(--primaire-doux); }
.champ::placeholder { color: var(--encre-douce); opacity: .8; }
.champ-montant { font-size: 30px; font-weight: 700; min-height: 60px; }
.champ-avec-bouton { position: relative; }
.champ-avec-bouton .champ { padding-right: 56px; }
.bouton-oeil { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 48px; height: 44px; border: 0; background: none; color: var(--encre-douce); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bouton-oeil[aria-pressed="true"] { color: var(--primaire); }
.aide { margin: 0 0 2px; font-size: 13px; color: var(--encre-douce); }
.formulaire .case { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin-top: 8px; font-size: 15px; font-weight: 400; cursor: pointer; }
.case input { width: 24px; height: 24px; flex-shrink: 0; margin: 0; accent-color: var(--primaire); }
.oubli { margin-top: 4px; }
.oubli summary { min-height: 44px; display: flex; align-items: center; color: var(--primaire); font-weight: 600; cursor: pointer; }
.oubli p { margin: 0 0 12px; color: var(--encre-douce); }

/* Welcome, sign-up, sign-in, the shop. */
.ecran-compte { gap: 16px; }
.grand-logo { display: block; width: 88px; height: 88px; margin: 24px auto 0; border-radius: 22px; }
.promesse { margin: 8px 0 0; font-size: 26px; line-height: 1.2; text-align: center; }
.intro { margin: 0 0 8px; font-size: 17px; color: var(--encre-douce); text-align: center; }
.bouton-secondaire { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--primaire); border-radius: 999px; background: var(--blanc); color: var(--primaire); font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; }
.lien-retour, .lien-discret { min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 15px; font-weight: 600; cursor: pointer; }
.lien-retour { align-self: flex-start; color: var(--primaire); }
.lien-discret { align-self: center; margin-top: 8px; color: var(--encre-douce); text-decoration: underline; }
/* The three kinds side by side, equal width, on the narrowest phones (« Paiement reçu » may take two lines). */
.onglets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.onglets .onglet { padding: 4px 8px; line-height: 1.15; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.onglet, .puce { min-height: 48px; padding: 0 16px; border: 1.5px solid var(--trait); border-radius: 999px; background: var(--blanc); font-size: 15px; font-weight: 600; cursor: pointer; }
.onglet.choisi { background: var(--primaire); border-color: var(--primaire); color: var(--sur-primaire); }
.puce.choisie { background: var(--primaire-doux); border-color: var(--primaire); color: var(--primaire); }
.bouton-principal { min-height: 52px; margin-top: 8px; border: 0; border-radius: 999px; background: var(--action); color: var(--sur-action); font-size: 17px; font-weight: 700; cursor: pointer; }
.bouton-principal:active { background: var(--action-fonce); }
.bouton-principal:disabled { opacity: .7; cursor: progress; }
.erreur { margin: 4px 0 0; color: var(--payer); font-weight: 600; }
.confirmation { margin: 4px 0 0; color: var(--recevoir); font-weight: 600; }
[hidden] { display: none !important; }

.lignes h2 { margin: 0 0 4px; font-size: 17px; }
.lignes ul { list-style: none; margin: 0; padding: 0; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.ligne:last-child { border-bottom: 0; }
.icone { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--primaire-doux); color: var(--primaire); font-weight: 700; }
.ligne.sortie .icone { background: var(--payer-doux); color: var(--payer); }
.texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.texte b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.texte small, .somme small { font-size: 13px; color: var(--encre-douce); }
.somme { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; white-space: nowrap; }
.ligne.sortie .somme { color: var(--payer); }
.somme .attente { color: var(--alerte); font-weight: 600; }
.vide { margin: 8px 0 0; color: var(--encre-douce); }

/* Skeleton while loading. */
.os { min-height: 96px; background: linear-gradient(90deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .025), rgba(0, 0, 0, .06)); background-size: 200% 100%; animation: os 1.2s linear infinite; border-color: transparent; }
.os.haut { min-height: 320px; }
.resume.os { min-height: 116px; }
@keyframes os { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .os { animation: none; } }

/* The colour choice (bottom of the cahier): three tiles, each with its own swatch and name; the chosen one also has
   a tick and a thicker border (never the colour alone). Real radio buttons underneath, for the keyboard and readers. */
.couleurs h2 { margin: 0 0 8px; font-size: 17px; }
.choix-couleurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; }
.choix-couleur { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 4px; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--blanc); font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; cursor: pointer; }
.choix-couleur input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choix-couleur.choisi { border: 2.5px solid var(--primaire); }
.choix-couleur.choisi::after { content: "✓"; position: absolute; top: 4px; right: 8px; font-weight: 700; color: var(--primaire); }
.choix-couleur:focus-within { outline: 3px solid var(--primaire-doux); outline-offset: 1px; }
.pastille { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
/* Fixed colours: each swatch shows its own palette, whatever the current one. */
.pastille-celia { background: linear-gradient(135deg, #142238 0 58%, #FF6B35 58% 100%); }
.pastille-vert { background: linear-gradient(135deg, #0D6146 0 58%, #FFFFFF 58% 100%); }
.pastille-leppi { background: linear-gradient(135deg, #2B3990 0 58%, #A8BCFF 58% 100%); }
