/* Movibe — style B1 « pastilles », boutons blancs en relief, barre capsule. Pas de noir plein. */
:root {
  --fond: #FBF8F3;
  --texte: #1C1C1E;
  --texte-2: #5E5A54;
  --texte-3: #6B6660;
  --ligne: #E2DCD2;
  --blanc: #FFFFFF;
  --bleu: #21507F;
  --danger: #A12D2D;
  --relief: 0 2px 10px rgba(60, 50, 40, 0.14);
  --relief-doux: 0 1px 3px rgba(60, 50, 40, 0.10);
  --rayon: 20px;
  --marge: 16px;
  --nav-h: 64px;
  --nav-bas: calc(14px + env(safe-area-inset-bottom));
  --police: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --ressort: cubic-bezier(.32, .72, 0, 1);   /* glissements façon iOS */
  --sortie: cubic-bezier(.2, .8, .2, 1);     /* apparitions */
  --rebond: cubic-bezier(.34, 1.56, .64, 1); /* petit dépassement */
  --t-glisse: .38s;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police);
  font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--bleu); }
:focus-visible { outline: 3px solid #7FA6D6; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; }

.vue {
  max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 16px) var(--marge) calc(var(--nav-h) + var(--nav-bas) + 28px);
}

/* En-têtes */
.entete { display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; }
.entete-ligne { flex-direction: row; align-items: center; justify-content: space-between; }
.surtitre { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
h1 { margin: 0; font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
h1:focus { outline: none; }
.resume, .note { margin: 0; font-size: 15px; color: var(--texte-2); }
.titre-section { margin: 12px 4px 0; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
.vide { margin: 24px 4px; color: var(--texte-2); }
.credit { margin: 4px; font-size: 12px; color: var(--texte-3); text-align: center; }
.credit a { color: var(--texte-2); }

/* Boutons */
.btn-relief, .btn-rond, .pilule.btn, .btn-retour {
  border: 0; background: var(--blanc); color: var(--bleu); box-shadow: var(--relief);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-relief:active, .btn-rond:active, .pilule.btn:active, .btn-retour:active { transform: scale(.97); box-shadow: var(--relief-doux); }
.btn-relief {
  min-height: 46px; padding: 0 18px; border-radius: 999px; font-size: 16px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn-relief.large { min-height: 56px; font-size: 17px; flex: 1; width: 100%; }
.btn-relief.petit { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn-relief:disabled { opacity: .5; }
.btn-rond {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-rond.petit { width: 44px; height: 44px; }
.btn-retour { width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--texte); }
.btn-plat {
  min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--texte-2);
}
.btn-icone { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: transparent; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.btn-danger { min-height: 48px; margin-top: 12px; border: 0; background: transparent; color: var(--danger); font-weight: 600; }
.lien { font-size: 17px; text-decoration: none; color: var(--texte); min-height: 44px; display: inline-flex; align-items: center; }

/* Pilules et rangées */
.rangee { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pilule {
  min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--blanc);
  display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600;
}
.pilule.btn { flex: 1; justify-content: center; color: var(--texte); }
.pilule.discret { color: var(--texte-3); font-weight: 500; }

/* Critères (B1) */
.critere { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--rayon); }
.critere h2 { margin: 0; font-size: 15px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .75);
  font-size: 15px; font-weight: 600; transition: transform .12s ease;
}
.chip:active { transform: scale(.96); }
.ligne-critere { flex-direction: row; align-items: center; justify-content: space-between; }
.actions-bas { display: flex; gap: 10px; padding-top: 8px; }

/* Panneau lieu */
.panneau { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--rayon); background: var(--blanc); box-shadow: var(--relief-doux); }
.recherche { display: flex; gap: 8px; }
.recherche input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--ligne);
  border-radius: 999px; background: var(--fond); font-size: 16px;
}

/* Listes blanches */
.liste-blanche { list-style: none; margin: 0; padding: 0; border-radius: var(--rayon); background: var(--blanc); overflow: hidden; }
.liste-blanche li + li { border-top: .5px solid #ECE7DE; }
.ligne { width: 100%; min-height: 56px; padding: 8px 16px; border: 0; background: transparent; text-align: left; display: flex; flex-direction: column; justify-content: center; }
.ligne-titre { font-size: 16px; font-weight: 600; }
.ligne-sous { font-size: 13px; color: var(--texte-3); }
.ligne-ajout { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 8px 8px 16px; }
.point { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }

/* Bandeau */
.bandeau { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--blanc); font-size: 14px; color: var(--texte-2); display: flex; gap: 8px; align-items: center; }

/* Cartes d'idées */
.liste-cartes { display: flex; flex-direction: column; gap: 12px; }
.carte { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 22px; }
.carte-haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.carte-genre { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.btn-coeur { width: 44px; height: 44px; margin: -6px -6px -6px 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .75); display: inline-flex; align-items: center; justify-content: center; }
.carte h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; color: var(--texte); }
.carte-desc { margin: 0; font-size: 15px; color: #3A3632; }
.metas { display: flex; flex-wrap: wrap; gap: 6px; }
.metas span { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-size: 13px; font-weight: 600; }
.carte-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding-top: 2px; }
.carte-actions .btn-relief { flex: 1; max-width: 220px; margin-left: auto; }
.carte-actions .btn-plat { color: inherit; }

/* Souvenirs */
.souvenir { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 6px 16px 6px 6px; text-decoration: none; color: var(--texte); }
.souvenir-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vignette { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--fond); }
.photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; object-fit: cover; background: var(--blanc); }
.vide-photo { display: flex; align-items: center; justify-content: center; }
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texte-3); text-transform: uppercase; letter-spacing: .04em; }
.champ textarea {
  padding: 12px 14px; border: 0; border-radius: 16px; background: var(--blanc); box-shadow: var(--relief-doux);
  font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--texte); resize: vertical;
}
.chip-ligne { align-self: flex-start; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--blanc); box-shadow: var(--relief-doux); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #8A2E4A; }
.sauvegarde { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.sauvegarde h2 { margin: 0 4px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
.sauvegarde .note { margin: 0 4px 4px; font-size: 14px; }
label.btn-relief { cursor: pointer; }

/* Objectifs */
.objectif { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--rayon); }
.objectif-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.objectif h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.compte { font-size: 17px; font-weight: 700; white-space: nowrap; }
.barre { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .8); overflow: hidden; }
.barre span { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.objectif-bas { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.barre-titre { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px; }
.barre-titre h1 { font-size: 17px; letter-spacing: 0; }
.apercu { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 22px; background: var(--blanc); box-shadow: var(--relief-doux); }
.apercu strong { font-size: 22px; line-height: 1.25; }
.apercu span:last-child { color: var(--texte-2); }
.stepper { display: flex; align-items: center; gap: 6px; font-size: 24px; font-weight: 700; color: var(--bleu); }
.stepper span { min-width: 44px; text-align: center; }
.btn-pas { width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .75); color: var(--bleu); font-size: 24px; font-weight: 600; }
.btn-pas.plein { background: var(--blanc); box-shadow: var(--relief-doux); }

/* Barre capsule 2c */
.capsule {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: var(--nav-bas);
  width: min(calc(100% - 2 * var(--marge)), 528px); height: var(--nav-h); padding: 8px; z-index: 10;
  display: flex; gap: 4px; border-radius: 32px; background: rgba(255, 255, 255, .92);
  box-shadow: 0 6px 20px rgba(60, 50, 40, .14);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.capsule .pastille {
  position: absolute; top: 8px; bottom: 8px; left: 0; width: 0; border-radius: 24px;
  transition: transform var(--t-glisse) var(--ressort), width var(--t-glisse) var(--ressort), background-color .3s ease;
}
.onglet {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 44px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none; color: #6E6A64;
  transition: flex-grow var(--t-glisse) var(--ressort), color .25s ease;
}
.onglet.actif { flex-grow: 2.4; }
.onglet .nom { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; transition: max-width var(--t-glisse) var(--ressort), opacity .2s ease; }
.onglet.actif .nom { max-width: 96px; opacity: 1; transition: max-width var(--t-glisse) var(--ressort), opacity .25s ease .1s; }
.badge {
  position: absolute; top: 2px; right: 14%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #8A2E4A; color: #fff; font-size: 11px; font-weight: 700; display: none; align-items: center; justify-content: center;
}
.badge.on { display: flex; }
.badge.pop { animation: pop .45s var(--rebond); }

/* ---- Animations (discrètes et utiles : transform + opacity, 0,2–0,45 s) ---- */
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes entre { from { opacity: 0; transform: translateY(14px); } }
@keyframes entreDroite { from { opacity: 0; transform: translateX(24px); } }
@keyframes sortGauche { to { opacity: 0; transform: translateX(-24px); } }
.entre { animation: entre .34s var(--sortie) both; }
.entre-droite { animation: entreDroite .34s var(--sortie) both; }
.carte.sort-gauche { animation: sortGauche .22s ease-in both; }

.chip { transition: background-color .18s var(--sortie), color .18s var(--sortie), transform .12s ease; }
.btn-coeur.pop .ic { animation: pop .42s var(--rebond); }

.jyvais { position: relative; overflow: hidden; }
.jyvais .txt, .jyvais .ok { transition: transform .3s var(--ressort), opacity .2s ease; }
.jyvais .ok { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: #245C3E; transform: translateY(100%); opacity: 0; }
.jyvais.fait .txt { transform: translateY(-100%); opacity: 0; }
.jyvais.fait .ok { transform: none; opacity: 1; }

.barre span { transition: width .7s var(--sortie); }
.objectif { transition: filter .6s ease; }
.objectif.eclat { filter: brightness(1.06) saturate(1.1); }
.compte { display: inline-flex; align-items: center; gap: 8px; }
.coche { width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #fff; transform: scale(0); }
.coche.on { animation: pop .45s var(--rebond) forwards; }
.coche.fixe { transform: none; }

.fente { height: 52px; overflow: hidden; border-radius: 16px; background: var(--blanc); box-shadow: var(--relief-doux); }
.rouleau { display: flex; flex-direction: column; transition: transform .75s cubic-bezier(.15, .85, .25, 1); }
.rouleau div { height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }

/* Transitions d'écran (View Transitions, Safari 18+) */
.capsule { view-transition-name: capsule; }
::view-transition-group(capsule) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; animation-timing-function: var(--ressort); }
[data-transition="avance"]::view-transition-old(root) { animation-name: vtReculer; }
[data-transition="avance"]::view-transition-new(root) { animation-name: vtArriverDroite; }
[data-transition="recule"]::view-transition-old(root) { animation-name: vtPartirDroite; z-index: 1; }
[data-transition="recule"]::view-transition-new(root) { animation-name: vtRevenir; }
[data-transition="fondu"]::view-transition-old(root), [data-transition="fondu"]::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }
@keyframes vtArriverDroite { from { transform: translateX(100%); } }
@keyframes vtReculer { to { transform: translateX(-28%); filter: brightness(.94); } }
@keyframes vtPartirDroite { to { transform: translateX(100%); } }
@keyframes vtRevenir { from { transform: translateX(-28%); filter: brightness(.94); } }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--nav-bas) + 12px);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; z-index: 20;
  background: var(--blanc); color: var(--texte); box-shadow: var(--relief); font-size: 15px; font-weight: 600;
}
.toast.erreur { color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
