:root{
  --fond:#F6F8F4; --carte:#FFFFFF; --texte:#24332D; --doux:#5B6B64; --pale:#9AA59F; --ligne:#EEF1EC;
  --vert:#2F5D4E; --vert-fonce:#1F4337; --vert-pale:#E6F2EA; --menthe:#DCEFE3;
  --peche:#FCE3D6; --peche-texte:#8A3F1E; --beurre:#FBF0C9; --beurre-texte:#76580E;
  --lavande:#E6E1F5; --lavande-texte:#4B3C8A; --rose:#F9DDE7; --rose-texte:#8A2E52;
  --ombre:0 1px 2px rgba(36,51,45,.06); --ombre-haute:0 6px 24px rgba(36,51,45,.12);
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--fond);color:var(--texte);font-family:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh}
button,input,select,textarea{font-family:inherit;font-size:16px;color:inherit}
button{cursor:pointer}
a{color:var(--vert);text-decoration:none}
h1,h2,h3{margin:0}
.cache{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Mise en page */
#app{max-width:1280px;margin:0 auto;display:flex;min-height:100dvh}
.panneau{flex:1;min-width:0;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top) + 24px) 20px 110px}
#detail{display:none}
@media (min-width:900px){
  #liste{flex:0 0 420px;border-right:1px solid var(--ligne);height:100dvh;overflow:auto;position:sticky;top:0}
  #detail{display:flex;height:100dvh;overflow:auto}
  body.vue-liste #detail .vide{display:flex}
  .nav{left:calc(max(0px, (100vw - 1280px) / 2) + 14px)!important;right:auto!important;width:392px}
}
@media (max-width:899px){
  body.vue-detail #liste{display:none}
  body.vue-detail #detail{display:flex}
}

/* En-têtes */
.entete{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px}
.entete h1{font-size:30px;font-weight:800;letter-spacing:-.5px}
.sous{font-size:14px;color:var(--doux);font-weight:600}
.badge{background:var(--peche);color:var(--peche-texte);font-size:13px;font-weight:700;padding:6px 12px;border-radius:999px;white-space:nowrap}

/* Recherche */
.recherche{display:flex;gap:10px;align-items:center;margin-bottom:12px}
.champ{flex:1;display:flex;align-items:center;gap:10px;background:var(--carte);border-radius:16px;padding:0 14px;height:50px;box-shadow:var(--ombre)}
.champ input{border:0;outline:0;background:transparent;flex:1;min-width:0;font-size:16px}
.btn-icone{flex:none;width:50px;height:50px;border:0;border-radius:16px;background:var(--vert);color:#fff;display:flex;align-items:center;justify-content:center}
.btn-icone.clair{background:var(--carte);color:var(--texte);box-shadow:var(--ombre);width:44px;height:44px;border-radius:14px}
.btn-icone.ecoute{background:#C8653A;animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.6}}

/* Pastilles */
.pastilles{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.pastille{border:0;height:36px;padding:0 14px;border-radius:999px;font-size:14px;font-weight:700;background:var(--carte);color:var(--texte);box-shadow:0 1px 2px rgba(36,51,45,.08);display:inline-flex;align-items:center;gap:6px}
.pastille.actif{background:var(--vert);color:#fff}
.etiquette{display:inline-flex;align-items:center;font-size:13px;font-weight:700;padding:5px 12px;border-radius:999px;background:var(--carte);color:var(--peche-texte)}

/* Encart frigo */
.encart{background:var(--vert-pale);border-radius:16px;padding:12px 14px;display:flex;align-items:center;gap:10px;margin-bottom:14px;color:var(--texte)}
.encart span.t{font-size:14px;flex:1}
.encart b.n{font-size:13px;color:var(--vert);white-space:nowrap}

/* Liste des recettes */
.liste{display:flex;flex-direction:column;gap:12px}
.carte-recette{background:var(--carte);border-radius:20px;padding:14px 16px;display:flex;gap:14px;align-items:center;box-shadow:var(--ombre);color:var(--texte)}
.carte-recette.ouverte{outline:2px solid var(--vert)}
.vignette{flex:none;width:64px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:4px}
.carte-recette .txt{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.carte-recette .titre{font-size:17px;font-weight:700;line-height:1.25}
.carte-recette .meta{font-size:13px;color:var(--doux)}
.plus-resultats{border:0;background:transparent;color:var(--vert);font-weight:800;padding:14px}
.rien{color:var(--doux);text-align:center;padding:30px 10px;font-size:15px}

.t-plat{background:var(--peche);color:var(--peche-texte)}
.t-soupe,.t-sauce,.t-fond,.t-condiment{background:var(--beurre);color:var(--beurre-texte)}
.t-entrée,.t-zakouski,.t-apéritif{background:var(--lavande);color:var(--lavande-texte)}
.t-dessert,.t-pâte,.t-pain{background:var(--rose);color:var(--rose-texte)}
.t-salade,.t-accompagnement{background:var(--menthe);color:var(--vert)}

/* Navigation */
.nav{position:fixed;left:14px;right:14px;bottom:calc(14px + env(safe-area-inset-bottom));background:var(--carte);border-radius:24px;padding:8px;display:flex;justify-content:space-around;box-shadow:var(--ombre-haute);z-index:20}
.nav a{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;font-weight:700;padding:6px 14px;border-radius:16px;color:var(--doux)}
.nav a.actif{background:var(--vert-pale);color:var(--vert)}
body.pas-a-pas .nav{display:none}

/* Fiche */
.fiche{margin:calc(-24px - env(safe-area-inset-top)) -20px 0}
.fiche-haut{padding:calc(env(safe-area-inset-top) + 24px) 20px 22px;border-radius:0 0 32px 32px;display:flex;flex-direction:column;gap:14px}
.fiche-haut .barre{display:flex;justify-content:space-between}
.fiche-haut .btn-icone.clair{background:rgba(255,255,255,.75);box-shadow:none}
.fiche-haut h1{font-size:28px;font-weight:800;line-height:1.15}
.fiche-corps{padding:0 20px;display:flex;flex-direction:column;gap:16px;margin-top:18px}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{background:var(--carte);border-radius:16px;padding:10px 6px;text-align:center;display:flex;flex-direction:column;gap:2px}
.stat span{font-size:12px;color:var(--doux);font-weight:600}
.stat b{font-size:16px;font-weight:800}
.stat b.manque{color:var(--pale)}
.actions{display:flex;gap:10px}
.btn{height:48px;border:0;border-radius:16px;font-weight:800;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px}
.btn.plein{background:var(--vert);color:#fff}
.btn.lavande{background:var(--lavande);color:var(--lavande-texte)}
.btn.pointille{border:2px dashed #B9C4BE;background:transparent;color:var(--vert)}
.btn.clair{background:var(--vert-pale);color:var(--vert)}
.btn.peche{background:var(--peche);color:var(--peche-texte)}
.btn.large{width:100%;height:54px;border-radius:18px;font-size:16px}
.actions .btn{flex:1}
.ligne-titre{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ligne-titre h2{font-size:20px;font-weight:800}
.portions{display:flex;align-items:center;gap:6px;background:var(--carte);border-radius:14px;padding:4px}
.portions button{width:40px;height:40px;border:0;border-radius:10px;background:var(--vert-pale);color:var(--vert);font-size:22px;font-weight:800}
.portions button.plus{background:var(--vert);color:#fff}
.portions span{min-width:66px;text-align:center;font-size:15px;font-weight:800}
.bloc{background:var(--carte);border-radius:20px;padding:6px 16px}
.ingr{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--ligne);font-size:15px}
.ingr:last-child{border-bottom:0}
.ingr .q{font-weight:800;color:var(--vert);white-space:nowrap;text-align:right}
.ingr .q.verif{color:#B5651D;font-weight:700;font-size:13px}
.groupe{font-size:13px;font-weight:800;color:var(--doux);text-transform:uppercase;letter-spacing:.5px;padding:12px 0 4px}
.etapes{display:flex;flex-direction:column;gap:12px}
.etape{display:flex;gap:12px;align-items:flex-start;font-size:15px;line-height:1.5}
.etape .n{flex:none;width:28px;height:28px;border-radius:10px;background:var(--beurre);color:var(--beurre-texte);font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center}
.notes{background:var(--beurre);border-radius:20px;padding:14px 16px;font-size:14px;line-height:1.5;display:flex;flex-direction:column;gap:8px}

/* Pas à pas */
.pap{position:fixed;inset:0;background:#EFECF8;z-index:50;display:flex;flex-direction:column;padding:calc(env(safe-area-inset-top) + 24px) 20px calc(24px + env(safe-area-inset-bottom));gap:18px;max-width:900px;margin:0 auto}
.pap .barres{display:flex;gap:6px}
.pap .barres span{flex:1;height:6px;border-radius:3px;background:#D6D0EC}
.pap .barres span.ok{background:var(--lavande-texte)}
.pap .num{font-size:18px;font-weight:800;color:var(--lavande-texte)}
.pap .texte{flex:1;background:#fff;border-radius:28px;padding:28px 24px;display:flex;align-items:center;overflow:auto;font-size:clamp(22px,6vw,32px);line-height:1.4;font-weight:700;box-shadow:0 6px 24px rgba(75,60,138,.08)}
.pap .bas{display:flex;gap:12px}
.pap .bas button{flex:1;height:60px;border:0;border-radius:20px;font-size:17px;font-weight:800;background:#fff;color:var(--lavande-texte)}
.pap .bas button.suiv{flex:1.4;background:var(--lavande-texte);color:#fff}

/* Courses */
.rayon{background:var(--carte);border-radius:20px;padding:12px 16px 4px}
.rayon h2{font-size:16px;font-weight:800;display:flex;align-items:center;gap:8px;margin-bottom:4px}
.rayon h2 i{width:10px;height:10px;border-radius:5px;display:inline-block}
.article{display:flex;align-items:center;gap:12px;min-height:46px;border-top:1px solid var(--ligne);cursor:pointer}
.article input{width:22px;height:22px;accent-color:var(--vert);margin:0;flex:none}
.article .nom{flex:1;font-size:15px}
.article .q{font-size:14px;font-weight:800;color:var(--vert);text-align:right}
.article.coche .nom,.article.coche .q{text-decoration:line-through;color:#7C8A84}
.choix-recette{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:700;padding:2px 4px 2px 12px;border-radius:999px}
.choix-recette button{border:0;background:rgba(255,255,255,.6);border-radius:10px;width:30px;height:30px;font-weight:800;color:inherit}
.colonne{display:flex;flex-direction:column;gap:14px}

/* Garde-manger */
.carte{background:var(--carte);border-radius:22px;padding:16px 18px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--ombre)}
.carte h3{font-size:18px;font-weight:800;display:flex;align-items:center;gap:8px}
.carte .tete{display:flex;justify-content:space-between;align-items:center;gap:10px}
.frigo-item{display:inline-flex;align-items:center;gap:4px;background:var(--vert-pale);color:var(--vert-fonce);font-size:14px;font-weight:700;padding:4px 4px 4px 12px;border-radius:999px}
.frigo-item button{width:30px;height:30px;border:0;border-radius:15px;background:transparent;color:var(--vert);font-size:17px;font-weight:800}
.saisie{display:flex;gap:8px}
.saisie input{flex:1;min-width:0;height:46px;border:0;border-radius:14px;padding:0 14px;background:var(--fond)}
.saisie .btn{height:46px}
.saisie .btn-icone{width:46px;height:46px;border-radius:14px}
.prep.ferment{background:var(--beurre)}
.prep.etapes{background:var(--peche)}
.prep.simple{background:var(--menthe)}
.prep .statut{background:#fff;font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;white-space:nowrap}
.progression{height:8px;border-radius:4px;background:rgba(255,255,255,.8);overflow:hidden}
.progression div{height:8px;background:#C9A227;border-radius:4px}
.dates{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px;font-size:13px}
.dates div{display:flex;flex-direction:column}
.dates span{opacity:.75;font-weight:600}
.etape-prep{display:flex;gap:10px;align-items:center;font-size:14px;min-height:36px;cursor:pointer}
.etape-prep input{width:20px;height:20px;accent-color:#C8653A;margin:0}
.etape-prep.fait span{text-decoration:line-through;opacity:.65}
.petits-btns{display:flex;gap:8px;flex-wrap:wrap}
.petit{height:40px;padding:0 14px;border:0;border-radius:12px;background:#fff;font-size:14px;font-weight:800;color:var(--texte);display:inline-flex;align-items:center;gap:6px}

/* Formulaires */
.form{display:flex;flex-direction:column;gap:14px}
.form label.l{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:700;color:var(--doux)}
.form input[type=text],.form input[type=number],.form input[type=date],.form select,.form textarea{height:50px;border:0;border-radius:14px;padding:0 14px;background:var(--carte);color:var(--texte);font-weight:400;box-shadow:var(--ombre)}
.form textarea{height:auto;min-height:80px;padding:12px 14px}
.modeles{display:flex;gap:8px}
.modeles button{flex:1;height:44px;border-radius:14px;font-size:14px;font-weight:800;border:2px solid #DCE3DE;background:#fff}
.modeles button.actif{border-color:var(--vert);background:var(--vert);color:#fff}
.date-ligne{display:flex;gap:8px;align-items:center;background:var(--carte);border-radius:14px;padding:6px 6px 6px 12px;box-shadow:var(--ombre)}
.date-ligne input[type=text]{flex:1;min-width:0;border:0;background:transparent;height:40px;box-shadow:none;padding:0}
.date-ligne input[type=date]{border:0;background:var(--fond);border-radius:10px;height:40px;padding:0 8px;box-shadow:none}
.case{display:flex;align-items:center;gap:12px;background:var(--vert-pale);border-radius:16px;padding:12px 14px;font-size:15px;cursor:pointer}
.case input{width:22px;height:22px;accent-color:var(--vert);margin:0}

/* Feuille (bas d'écran) */
.voile{position:fixed;inset:0;background:rgba(36,51,45,.35);z-index:60;display:flex;align-items:flex-end;justify-content:center}
.feuille{background:var(--fond);width:100%;max-width:560px;max-height:88dvh;overflow:auto;border-radius:28px 28px 0 0;padding:20px 20px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px}
@media (min-width:900px){.voile{align-items:center}.feuille{border-radius:28px}}
.feuille h2{font-size:22px;font-weight:800}
.options{display:flex;flex-direction:column;background:var(--carte);border-radius:18px;padding:4px 14px}
.options button{display:flex;justify-content:space-between;align-items:center;border:0;background:transparent;text-align:left;padding:12px 0;border-bottom:1px solid var(--ligne);font-size:16px}
.options button:last-child{border-bottom:0}
.options button.actif{color:var(--vert);font-weight:800}
.options button small{color:var(--doux);font-weight:600}
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);background:var(--texte);color:#fff;padding:12px 18px;border-radius:14px;font-weight:700;font-size:14px;z-index:80;box-shadow:var(--ombre-haute);max-width:90vw;text-align:center}
.vide{flex:1;align-items:center;justify-content:center;color:var(--pale);font-size:16px;font-weight:700;display:none}
