/* ===== Mon Jardin — thème ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: linear-gradient(160deg, #111d14 0%, #0c180e 55%, #181208 100%);
  font-family: Georgia, serif;
  color: #dde8d8;
  padding-bottom: 3rem;
}

.dots {
  position: fixed; inset: 0; opacity: 0.022; pointer-events: none;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 22px 22px;
}

.page { max-width: 1200px; margin: 0 auto; padding: 1.2rem 1rem 0; position: relative; }
.hidden { display: none !important; }

button { font-family: Georgia, serif; }

/* ===== Navigation ===== */
.topnav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 1rem;
  background: rgba(10, 20, 12, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(8px);
}
.brand { color: #a8d5a2; text-decoration: none; font-size: 1.05rem; letter-spacing: 0.08em; white-space: nowrap; }
.navlinks { display: flex; gap: 0.15rem; flex: 1; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.navlinks a {
  color: #8aa88a; text-decoration: none; font-size: 0.85rem;
  padding: 0.45rem 0.7rem; border-radius: 999px; white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
}
.navlinks a.on { background: rgba(80,160,60,0.22); color: #cfe8c8; }
.navlinks a:hover { color: #d0f0c0; }
.qui { margin-left: auto; color: #7ea87e; font-size: 0.78rem; white-space: nowrap; }
.logout-form { margin-left: 0.5rem; }
.lien-doux { color: #8ad08a; }

/* ===== Flash ===== */
.flash {
  max-width: 680px; margin: 0.8rem auto 0; padding: 0.7rem 1.1rem;
  border-radius: 10px; font-size: 0.85rem; text-align: center;
}
.flash-ok { background: rgba(80,160,60,0.18); border: 1px solid rgba(100,180,80,0.4); color: #b8e0b0; }
.flash-erreur { background: rgba(180,60,50,0.18); border: 1px solid rgba(200,80,70,0.4); color: #f0b8b0; }

/* ===== Entête de page ===== */
.entete-plan { text-align: center; margin: 1.2rem 0 1.6rem; }
.entete-plan .leaf { font-size: 2.2rem; margin-bottom: 0.4rem; }
.entete-plan h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem); font-weight: normal;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #a8d5a2; text-shadow: 0 2px 24px rgba(100,210,100,0.25);
}
.sous-titre { color: #5e8a5e; font-size: 0.7rem; letter-spacing: 0.2em; margin-top: 0.5rem; text-transform: uppercase; }
.sep-titre { width: 90px; border: none; border-top: 1px solid #4a7a4a; margin: 0.9rem auto 0; opacity: 0.5; }

.barre-annees { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.4rem 1.1rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; color: #a8c8a8; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; letter-spacing: 0.05em;
  transition: all 0.2s;
}
.pill.on { background: rgba(80,160,60,0.3); border-color: rgba(100,180,80,0.5); color: #e0f5d8; }
.pill:hover { background: rgba(80,160,60,0.18); color: #d0f0c0; }
.pill-action { background: rgba(80,160,60,0.15); border-color: rgba(100,180,80,0.35); }
body.edition .pill-action { background: #4a8a3a; border-color: #6aba52; color: #fff; box-shadow: 0 2px 14px rgba(90,190,70,0.45); }

/* ===== Légende ===== */
.legende { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; max-width: 900px; margin: 0 auto 1.8rem; }
.legende-btn {
  display: flex; align-items: center; gap: 0.38rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px; padding: 0.35rem 0.75rem; min-height: 40px;
  cursor: pointer; color: #a8c8a8; font-size: 0.75rem; letter-spacing: 0.04em;
  transition: all 0.2s;
}
.legende-btn.on { background: rgba(80,160,60,0.4); border-color: rgba(120,200,100,0.6); color: #fff; }
.legende-btn .count { background: rgba(0,0,0,0.25); border-radius: 999px; padding: 0 0.35rem; font-size: 0.65rem; }

/* ===== Carte du jardin (grille libre) ===== */
.carte-plan {
  max-width: 1200px; margin: 0 auto;
  overflow: auto; max-height: 78vh;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  padding-bottom: 0.4rem;
}
body.mode-liste .carte-plan, body.mode-liste .pill-carte { display: none; }
.grille-libre {
  --cell: 44px;
  display: grid;
  grid-template-columns: 30px repeat(var(--gl, 14), var(--cell));
  grid-template-rows: 22px repeat(var(--gh, 2), calc(var(--cell) * 1.5)) 22px;
  gap: 4px;
  width: max-content;
  margin: 0 auto;
  position: relative;
}
.gl-entete {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; font-family: monospace; font-weight: bold;
  color: #d8f0d0; z-index: 3;
}
.gl-col, .gl-bas, .gl-lig {
  background: rgba(80,160,80,0.22);
  border: 1px solid rgba(100,180,100,0.3); border-radius: 5px;
  padding: 0.1rem 0.3rem;
}
.gl-bas { font-size: 0.58rem; color: #8abf8a; background: rgba(60,120,60,0.15); border-color: rgba(80,150,80,0.2); }
.gl-col { position: sticky; top: 0; align-self: stretch; }
.gl-lig { position: sticky; left: 0; }
.gl-coin { background: transparent; position: sticky; top: 0; left: 0; z-index: 4; }

.gl-vide {
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: 7px; padding: 0;
  pointer-events: none; cursor: default;
}
body.edition .gl-vide {
  pointer-events: auto; cursor: pointer;
  border-color: rgba(140,220,120,0.45);
  background: rgba(80,160,60,0.07);
}
body.edition .gl-vide:hover { background: rgba(80,160,60,0.22); }

.gl-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 3px; position: relative; overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.14); border-radius: 6px;
  cursor: pointer; color: inherit; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
/* Coins arrondis façon plan classique : cellule A bombée en haut, dernière ligne en bas */
.gl-zone.gl-haut { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.gl-zone.gl-bas-arr { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
/* Reflet lustré en haut de chaque case */
.gl-shine {
  position: absolute; top: 0; left: 0; right: 0; height: 38%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent);
  pointer-events: none; border-radius: inherit; z-index: 0;
}
.gl-info {
  position: absolute; bottom: 3px; right: 4px; z-index: 1;
  font-size: 0.6rem; color: rgba(255,255,255,0.5);
}
.gl-zone:hover { transform: translateY(-3px) scale(1.03); z-index: 2; }
.gl-zone.dim { opacity: 0.25; }
.gl-zone .emoji, .gl-zone img.ico-svg { font-size: 1.5rem; width: 1.7em; height: 1.7em; }
.gl-zone .nom {
  font-size: 0.56rem; font-weight: bold; color: rgba(255,255,255,0.95);
  line-height: 1.15; text-align: center; max-width: 100%;
  overflow: hidden; text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  position: relative; z-index: 1; padding: 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.gl-zone .note-dot { position: absolute; bottom: 2px; right: 3px; font-size: 0.6rem; z-index: 1; }
.gl-etiquette {
  position: absolute; top: 2px; left: 3px; z-index: 1;
  font-size: 0.52rem; font-family: monospace; color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.28); border-radius: 4px; padding: 0 3px;
  max-width: calc(100% - 6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gl-zone-libre { background: rgba(255,255,255,0.05); border-style: dashed; }
.gl-zone-libre .nom { color: rgba(255,255,255,0.45); text-shadow: none; }
.gl-vide-message {
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #7ea87e; font-size: 0.85rem; line-height: 1.5; padding: 1rem;
  border: 1.5px dashed rgba(255,255,255,0.14); border-radius: 12px;
  pointer-events: none; /* ne jamais bloquer les taps sur les cases en dessous */
}
body.edition .gl-vide-message { display: none; } /* en édition, place aux cases à dessiner */

/* Le nom reste visible même sur les petites zones (1×1) — c'est le visuel « avant ».
   Seul le mode aperçu (jardin entier réduit) masque les textes, faute de place. */
.mode-apercu .gl-zone .nom, .mode-apercu .gl-etiquette, .mode-apercu .gl-zone .note-dot { display: none; }
.mode-apercu .gl-zone .emoji, .mode-apercu .gl-zone img.ico-svg { font-size: 1rem; width: 1.1em; height: 1.1em; padding: 1px; }

/* Fantôme de placement */
.gl-fantome {
  border: 2px dashed #a8e690; border-radius: 9px;
  background: rgba(120, 210, 100, 0.18);
  pointer-events: none; z-index: 5;
}
.gl-fantome.invalide { border-color: #e88a7a; background: rgba(220, 90, 70, 0.2); }

/* Barre de placement */
.barre-placement {
  position: fixed; left: 0.6rem; right: 0.6rem; z-index: 70;
  bottom: calc(0.6rem + env(safe-area-inset-bottom));
  background: linear-gradient(145deg, #16241a, #101a12);
  border: 1px solid rgba(100,180,80,0.45); border-radius: 14px;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.65);
}
.bp-statut { font-size: 0.78rem; color: #cfe8c8; margin-bottom: 0.5rem; text-align: center; }
.bp-boutons { display: flex; gap: 0.5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.bp-groupe { display: flex; gap: 0.3rem; align-items: center; }
.bp-lbl { font-size: 0.62rem; color: #6abf6a; text-transform: uppercase; letter-spacing: 0.08em; }
.bp-btn { margin: 0; min-height: 44px; min-width: 44px; padding: 0.3rem 0.8rem; }
#bp-valider:disabled { opacity: 0.4; cursor: not-allowed; }

/* Vue liste */
.vue-liste { display: none; max-width: 680px; margin: 0 auto; }
body.mode-liste .vue-liste { display: flex; flex-direction: column; gap: 0.55rem; }
.carte-zone { width: 100%; text-align: left; cursor: pointer; font-family: Georgia, serif; }
.carte-zone.dim { opacity: 0.3; }
.carte-zone:hover { border-color: rgba(100,180,80,0.45); }

/* Boutons segmentés (carnet, etc.) */
.segments { display: flex; gap: 0.5rem; }
.choix-seg {
  flex: 1; min-height: 48px; padding: 0.4rem 0.6rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; color: #a8c8a8; font-size: 0.85rem; cursor: pointer;
  transition: all 0.15s;
}
.choix-seg:hover { background: rgba(80,160,60,0.18); }
.choix-seg.on {
  background: rgba(80,160,60,0.35); border-color: rgba(120,200,100,0.6);
  color: #e8f5e8; outline: 2px solid rgba(160,230,140,0.5); outline-offset: 1px;
}

/* ===== Stats ===== */
.stats {
  max-width: 680px; margin: 1.8rem auto 0;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px; padding: 1rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center;
}
.stat { text-align: center; }
.stat .val { font-size: 1.4rem; font-weight: bold; color: #7ec882; }
.stat .lbl { font-size: 0.58rem; color: #5e8a5e; letter-spacing: 0.1em; text-transform: uppercase; }

/* ===== Voiles + feuilles (bottom sheet mobile / panneau desktop) ===== */
.voile {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(5,12,5,0.82); backdrop-filter: blur(6px);
}
.voile.hidden { display: none; }
.feuille {
  position: relative; background: linear-gradient(145deg, #141e14, #1a1a10);
  border: 1.5px solid rgba(100,180,80,0.3);
  border-radius: 18px; padding: 1.6rem;
  max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.fermer {
  position: absolute; top: 0.9rem; right: 0.9rem;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; width: 40px; height: 40px;
  color: #aaa; cursor: pointer; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.feuille-entete { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; padding-right: 2.5rem; }
.feuille-icone {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.icone-neutre { background: rgba(80,160,60,0.2); border: 1px solid rgba(100,180,80,0.35); }
.feuille-titre { color: #e8f5e8; font-size: 1.15rem; letter-spacing: 0.06em; }
.feuille-sub { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.2rem; color: #6abf6a; }

.lignes-info { display: flex; flex-direction: column; gap: 0.7rem; }
.ligne-info {
  display: flex; gap: 0.75rem;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 0.6rem 0.8rem;
}
.ligne-info .ico { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }
.ligne-info .lbl { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.2rem; color: #6abf6a; }
.ligne-info .val { font-size: 0.8rem; color: #c8dcc8; line-height: 1.5; }

.boite-notes {
  border-radius: 10px; padding: 0.7rem 0.9rem; margin-top: 0.8rem;
  background: rgba(80,160,60,0.1); border: 1px solid rgba(100,180,80,0.25);
}
.boite-notes-titre { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.35rem; color: #6abf6a; }
.note-item {
  font-size: 0.78rem; color: #b8d4b8; line-height: 1.5;
  padding-left: 0.6rem; margin-bottom: 0.4rem; border-left: 2px solid rgba(100,180,80,0.4);
}
.note-item:last-child { margin-bottom: 0; }

/* ===== Pastilles (choix de légume) ===== */
.pastilles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.pastille {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
  min-height: 64px; padding: 0.5rem 0.3rem;
  border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.15);
  cursor: pointer; color: #fff; transition: all 0.15s;
}
.pastille .p-emoji { font-size: 1.4rem; }
.pastille .p-nom { font-size: 0.62rem; font-weight: bold; text-align: center; line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.pastille.on { outline: 3px solid #d0f0c0; outline-offset: 1px; transform: scale(1.04); }
.pastille-vide { background: rgba(255,255,255,0.05); border-style: dashed; color: #a8c8a8; }

/* ===== Formulaires ===== */
.panneau-form {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1.4rem;
}
.panneau-form-large { max-width: 640px; margin: 0 auto; }
.panneau-form h2 { font-weight: normal; color: #a8d5a2; letter-spacing: 0.08em; font-size: 1.1rem; margin-bottom: 1rem; }
.champ-label {
  display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: #6abf6a; margin: 0.9rem 0 0.3rem;
}
.requis { color: #e8a08a; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 0.65rem 0.8rem; font-size: 1rem; font-family: Georgia, serif;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; color: #e8f5e8; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(120,200,100,0.5); border-color: rgba(120,200,100,0.5); }
.aide { font-size: 0.72rem; color: #5e8a5e; margin-top: 0.4rem; line-height: 1.4; }
.check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #a8c8a8; margin: 0.9rem 0; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; }

.btn-vert {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.6rem 1.6rem; margin-top: 1rem;
  background: linear-gradient(135deg, rgba(80,160,60,0.5), rgba(60,120,40,0.35));
  border: 1px solid rgba(100,180,80,0.55); border-radius: 999px;
  color: #d8f5d0; font-size: 0.95rem; letter-spacing: 0.08em; cursor: pointer;
  transition: all 0.2s;
}
.btn-vert:hover { background: linear-gradient(135deg, rgba(90,180,70,0.65), rgba(70,140,50,0.5)); color: #fff; box-shadow: 0 2px 16px rgba(80,160,60,0.35); }
.btn-large { width: 100%; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px; color: #a8c8a8; font-size: 0.82rem; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #e0f0dc; }
.btn-danger { color: #e8a89e; border-color: rgba(200,90,80,0.35); }
.btn-danger:hover { background: rgba(180,60,50,0.2); color: #ffc8be; }
.btn-danger:disabled { opacity: 0.35; cursor: not-allowed; }
.rangee-boutons { display: flex; gap: 0.7rem; align-items: stretch; flex-wrap: wrap; margin-top: 1rem; }
.rangee-boutons .btn-vert { margin-top: 0; }
.rangee-boutons .btn-ghost { min-height: 48px; }
.inline { display: inline; }
.form-rangs { display: inline-flex; gap: 0.3rem; align-items: center; }
.mini-nombre { width: 64px; min-height: 40px; padding: 0.3rem 0.4rem; font-size: 0.9rem; }

/* Icônes SVG des légumes : dimensionnées en em pour suivre chaque contexte.
   Pastille sombre : détache l'icône des cases colorées (ton sur ton). */
img.ico-svg {
  width: 1.4em; height: 1.4em; display: inline-block; vertical-align: -0.25em;
  background: rgba(10, 20, 12, 0.28); border-radius: 50%;
  padding: 3px; box-sizing: content-box;
}
.gl-zone img.emoji { display: block; }
.feuille-icone img.ico-svg { width: 36px; height: 36px; }
.cl-icone img.ico-svg { width: 32px; height: 32px; }
.apercu-case img.ico-svg { width: 30px; height: 30px; }

/* Sélecteur d'icônes (nom visible sous chaque tuile — le survol n'existe pas au tactile) */
.grille-icones { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 0.45rem; }
.choix-icone {
  min-height: 64px; padding: 6px 3px 5px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
  transition: all 0.15s;
}
.choix-icone img { width: 32px; height: 32px; }
.choix-icone .ci-nom {
  font-size: 0.56rem; line-height: 1.15; color: #a8c8a8;
  text-align: center; overflow-wrap: break-word; max-width: 100%;
}
.choix-icone:hover { background: rgba(80,160,60,0.2); }
.choix-icone.on { outline: 3px solid #d0f0c0; outline-offset: 1px; }
.choix-icone.on .ci-nom { color: #e8f5e8; }

/* Palette + emojis */
.palette { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choix-couleur {
  width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2); transition: all 0.15s;
}
.choix-couleur.on { outline: 3px solid #fff; outline-offset: 2px; transform: scale(1.08); }
.apercu-case {
  width: 82px; height: 110px; margin: 1rem auto 0;
  border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.apercu-case .emoji { font-size: 1.6rem; }
.apercu-case .nom { font-size: 0.55rem; font-weight: bold; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.6); margin-top: 0.25rem; text-align: center; padding: 0 4px; }

/* ===== Cartes (catalogue, années) ===== */
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.colonne-liste { display: flex; flex-direction: column; gap: 0.6rem; }
.carte-legume, .carte-annee {
  display: flex; align-items: center; gap: 0.9rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; padding: 0.8rem 1rem;
}
.carte-annee.courante { border-color: rgba(100,180,80,0.45); background: rgba(80,160,60,0.08); }
.cl-icone {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.ca-emoji { font-size: 1.7rem; }
.cl-infos { flex: 1; min-width: 0; }
.cl-nom { color: #e0f0dc; font-size: 1rem; }
.cl-usage { color: #5e8a5e; font-size: 0.7rem; margin-top: 0.15rem; }
.cl-actions { display: flex; gap: 0.4rem; align-items: center; flex-shrink: 0; }

/* ===== Recette ===== */
.panneau-recette { max-width: 560px; margin: 0 auto; }
.recette-section { margin-bottom: 1.3rem; }
.recette-section-titre {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: #6abf6a; margin-bottom: 0.5rem; padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(100,180,80,0.2);
}
.recette-item {
  font-size: 0.85rem; color: #c8dcc8; line-height: 1.6;
  padding: 0.2rem 0 0.2rem 0.8rem; border-left: 2px solid rgba(100,180,80,0.3); margin-bottom: 0.3rem;
}
.bloc-section { border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 0.9rem; margin-top: 1rem; }
.bloc-section-entete { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.bloc-section-entete .champ-label { margin: 0.2rem 0 0.3rem; }
.btn-retirer-section { min-height: 34px; padding: 0.15rem 0.7rem; font-size: 0.7rem; }
#btn-ajouter-section { margin-top: 0.8rem; }

/* ===== Carnet ===== */
.liste-carnet { max-width: 680px; margin: 0 auto; }
.carte-fiche { text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.carte-fiche:hover { border-color: rgba(100,180,80,0.45); background: rgba(80,160,60,0.08); }
.badge {
  display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px;
  font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge-recette { background: rgba(45,198,83,0.16); color: #7ec882; border: 1px solid rgba(45,198,83,0.35); }
.badge-note { background: rgba(245,166,35,0.14); color: #e8b923; border: 1px solid rgba(245,166,35,0.35); }
.badge-info { background: rgba(52,152,219,0.14); color: #6fa8dc; border: 1px solid rgba(52,152,219,0.35); }

/* ===== Login ===== */
.login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  width: 100%; max-width: 380px; text-align: center;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; padding: 2.2rem 1.8rem;
}
.login-card .leaf { font-size: 2.6rem; }
.login-card h1 { font-weight: normal; letter-spacing: 0.16em; text-transform: uppercase; color: #a8d5a2; margin-top: 0.4rem; }
.login-form { text-align: left; margin-top: 1.4rem; }
.login-form label:not(.check) {
  display: block; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: #6abf6a; margin: 0.9rem 0 0.3rem;
}
.login-form .btn-vert { width: 100%; }

/* ===== Bannière d'installation (PWA) ===== */
.banniere-install {
  position: fixed; left: 0.8rem; right: 0.8rem; z-index: 60;
  bottom: calc(0.8rem + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 0.7rem;
  background: linear-gradient(145deg, #16241a, #101a12);
  border: 1px solid rgba(100,180,80,0.4); border-radius: 14px;
  padding: 0.7rem 0.9rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}
.banniere-install .bi-ico { font-size: 1.4rem; }
.banniere-install .bi-texte { flex: 1; font-size: 0.8rem; color: #cfe8c8; line-height: 1.35; }
.banniere-install .bi-actions { display: flex; flex-direction: column; gap: 0.35rem; }
.banniere-install .bi-btn { margin: 0; min-height: 40px; padding: 0.3rem 0.9rem; font-size: 0.8rem; white-space: nowrap; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .page { padding: 0.8rem 0.7rem 0; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .brand span { display: none; }

  /* Navigation sur deux lignes : onglets pleine largeur, tous visibles */
  .topnav { flex-wrap: wrap; row-gap: 0.15rem; padding: 0.45rem 0.7rem; }
  .navlinks {
    order: 3; flex-basis: 100%; min-width: 0;
    justify-content: space-between; overflow-x: auto;
  }
  .navlinks a { padding: 0.35rem 0.45rem; font-size: 0.84rem; min-height: 40px; }
  .qui { font-size: 0.72rem; }

  /* Carte du jardin sur mobile : la grille défile, la barre de placement reste au pouce */
  .carte-plan { max-height: 70vh; }
  .gl-zone:hover { transform: none; }
  .bp-boutons { gap: 0.35rem; }
  .bp-btn { min-width: 42px; padding: 0.3rem 0.6rem; font-size: 0.8rem; }

  /* Feuilles ancrées en bas (zone du pouce) */
  .voile { align-items: flex-end; padding: 0; }
  .feuille {
    max-width: none; border-radius: 20px 20px 0 0; max-height: 86vh;
    padding-bottom: calc(1.6rem + env(safe-area-inset-bottom));
  }
  .stats { gap: 1rem; padding: 0.8rem 1rem; }
  .cl-actions { flex-direction: column; align-items: stretch; }
}
