/* Clé un-chef — même univers que Kairos, Agenda, Contacts et la Calculatrice : fond nacré, bleu marine et or. */
@font-face { font-family: "Jakarta"; src: url("jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #F7F5F0; --surface: #fff; --surface-2: #F4F6FA;
  --navy: #12306B; --navy-2: #21468F; --navy-3: #0A1C47;
  --gold: #C39A4F; --gold-soft: #E6C98A; --gold-ink: #8A6424;
  --ink: #0E1B35; --ink-2: #33405C; --muted: #667089;
  --line: rgba(14, 27, 53, .09); --line-2: rgba(14, 27, 53, .14);
  --danger: #B42318; --ok: #1F7A4D;
  --shadow: 0 1px 2px rgba(14, 27, 53, .05), 0 10px 26px -14px rgba(14, 27, 53, .22);
  --shadow-lg: 0 2px 6px rgba(14, 27, 53, .06), 0 26px 50px -22px rgba(14, 27, 53, .32);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: "Jakarta", "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(760px 460px at 0% -10%, rgba(195, 154, 79, .16), transparent 60%),
              radial-gradient(760px 500px at 100% -5%, rgba(33, 70, 143, .11), transparent 60%);
}
button, input { font-family: inherit; }
button { touch-action: manipulation; }

.page {
  position: relative; z-index: 1; max-width: 460px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
}
.marque { display: flex; align-items: center; gap: 12px; margin: 2px 2px 6px; }
.marque img { border-radius: 13px; box-shadow: 0 8px 18px -10px rgba(10, 28, 71, .7); }
.marque b { display: block; font-size: 15px; font-weight: 800; letter-spacing: .16em; }
.marque small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }

.ecran { display: flex; flex-direction: column; gap: 14px; animation: entrer .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes entrer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.carte {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px 20px;
  box-shadow: var(--shadow);
}
.carte-centre { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 30px 22px 24px; }
.surtitre { margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
h1 { margin: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
h2 { margin: 22px 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.intro { margin: 10px 0 0; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.intro strong { color: var(--navy); }

/* ── Bouton empreinte ── */
.bio {
  position: relative; width: 132px; height: 132px; margin: 30px auto 10px; border-radius: 50%; border: none; cursor: pointer;
  color: #fff; background: radial-gradient(circle at 30% 22%, #2C56A6, var(--navy) 55%, var(--navy-3));
  box-shadow: 0 22px 40px -18px rgba(10, 28, 71, .8), inset 0 1px 0 rgba(255, 255, 255, .18);
  display: grid; place-items: center; transition: transform .15s ease;
}
.bio:active { transform: scale(.96); }
.bio svg { width: 62px; height: 62px; color: var(--gold-soft); }
.bio-anneau { position: absolute; inset: -9px; border-radius: 50%; border: 2px solid rgba(195, 154, 79, .55); }
.bio-anneau::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--gold);
  opacity: 0; animation: onde 2.6s ease-out infinite;
}
.bio.actif .bio-anneau::after { animation-duration: 1.1s; }
@keyframes onde { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.32); opacity: 0; } }
.bio-legende { margin: 12px 0 0; font-weight: 700; font-size: .9rem; color: var(--navy); }
.succes .bio { background: radial-gradient(circle at 30% 22%, #E6C98A, var(--gold) 60%, #A97C35); }
.succes .bio svg { color: #fff; }

/* ── Formulaires ── */
.champs { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; width: 100%; text-align: left; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.champ small { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.champ input {
  width: 100%; padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  font-size: 1.05rem; font-weight: 600;
}
.champ input:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(33, 70, 143, .12); }
.erreur { margin: 0; min-height: 0; color: var(--danger); font-size: .88rem; font-weight: 600; line-height: 1.4; }
.erreur:empty { display: none; }
.carte-centre .erreur { margin-top: 12px; }

.btn {
  width: 100%; border: none; border-radius: 14px; padding: 15px 16px; font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: transform .1s ease, opacity .15s; touch-action: manipulation;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-or { background: linear-gradient(135deg, #E6C98A, var(--gold)); color: var(--navy-3); box-shadow: 0 12px 24px -14px rgba(169, 124, 53, .95); }
.btn-bleu { background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: #fff; box-shadow: 0 12px 24px -14px rgba(10, 28, 71, .9); }
.btn-clair { background: var(--surface-2); color: var(--navy); border: 1px solid var(--line); }
.btn-contour { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.btn.petit { width: auto; padding: 10px 16px; font-size: .9rem; border-radius: 12px; }
.carte-centre .btn { margin-top: 20px; }
.lien { margin-top: 18px; background: none; border: none; color: var(--navy-2); font-weight: 700; font-size: .92rem; cursor: pointer; padding: 6px; text-decoration: none; }
.lien.discret { color: var(--muted); font-weight: 600; font-size: .82rem; margin-top: 8px; }
.code-secours { margin-top: 6px; }

/* ── Déverrouillé ── */
.statut { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: #fff; border: none; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.statut::after { content: ""; position: absolute; right: -78px; top: -70px; width: 150px; height: 150px; border-radius: 50%; border: 2px solid rgba(230, 201, 138, .35); }
.statut h1 { color: #fff; font-size: 1.12rem; }
.statut p { margin: 4px 0 0; color: rgba(255, 255, 255, .75); font-size: .88rem; }
.pastille { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #E6C98A, var(--gold)); color: var(--navy-3); }
.pastille svg { width: 24px; height: 24px; }
.carte-proposition { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; border-color: #EEDFBF; background: #FBF6EA; }
.carte-proposition b { font-size: .95rem; }
.carte-proposition p { margin: 3px 0 0; font-size: .82rem; color: var(--ink-2); }
.carte-proposition > div { flex: 1; }

.grille-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; padding: 18px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.app { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); font-size: .74rem; font-weight: 700; text-align: center; }
.app img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 8px 16px -10px rgba(10, 28, 71, .55); background: var(--surface-2); object-fit: cover; }
.app:active img { transform: scale(.94); }

.reglages summary { cursor: pointer; font-weight: 800; color: var(--navy); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.reglages summary::-webkit-details-marker { display: none; }
.reglages summary::after { content: ""; width: 9px; height: 9px; border-right: 2.2px solid var(--muted); border-bottom: 2.2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.reglages[open] summary::after { transform: rotate(-135deg); }
.liste { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; background: var(--surface-2); }
.liste li > div { flex: 1; min-width: 0; }
.liste b { display: block; font-size: .9rem; }
.liste small { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; line-height: 1.35; }
.mini { border: 1px solid var(--line-2); background: #fff; color: var(--danger); font-weight: 700; font-size: .78rem; padding: 7px 10px; border-radius: 10px; cursor: pointer; }

.pied { margin: auto 0 0; padding-top: 10px; text-align: center; font-size: .72rem; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--navy-3); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; z-index: 9;
}
.toast.montre { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .page { padding-top: 48px; }
  .carte { padding: 28px 28px; }
}
@media (prefers-reduced-motion: reduce) { .ecran, .bio-anneau::after { animation: none; } }
