/* ==========================================================================
   Cuisinée pour vous — feuille de style principale
   Palette alignée sur le logo : vert forêt, vert feuille, orange brûlé, pêche, crème
   ========================================================================== */

:root {
  --green-900: #1c300e;
  --green-800: #274313;
  --green-700: #3a5a1f;
  --green-600: #4f712c;
  --sage: #8fa86f;
  --sage-300: #bccda4;
  --sage-200: #d9e4c7;
  --sage-100: #edf2e3;
  --coral: #d0582a;
  --coral-700: #b2461c;
  --peach: #f1b48e;
  --peach-100: #fbe8da;
  --amber: #e9a23b;
  --amber-100: #fdf1dc;
  --blue-100: #e5eef9;
  --blue: #4b78b8;
  --cream: #faf6ef;
  --cream-200: #f3ece0;
  --paper: #fffdf9;
  --ink: #24311c;
  --ink-soft: #46523d;
  --muted: #727a69;
  --line: #e8e1d4;
  --white: #ffffff;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(36, 49, 28, .06), 0 2px 8px rgba(36, 49, 28, .05);
  --shadow: 0 6px 24px rgba(36, 49, 28, .09);
  --shadow-lg: 0 18px 50px rgba(36, 49, 28, .16);
  --container: 1200px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--coral); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; color: var(--green-800); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.icon { flex-shrink: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.accent { color: var(--coral); }
.hand { font-family: var(--font-hand); font-weight: 600; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 6px 16px rgba(208, 88, 42, .28); }
.btn-primary:hover { background: var(--coral-700); color: #fff; }
.btn-green { background: var(--green-800); color: #fff; }
.btn-green:hover { background: var(--green-900); color: #fff; }
.btn-outline { border-color: var(--green-800); color: var(--green-800); background: transparent; }
.btn-outline:hover { background: var(--green-800); color: #fff; }
.btn-soft { background: var(--sage-100); color: var(--green-800); }
.btn-soft:hover { background: var(--sage-200); color: var(--green-900); }
.btn-soft-coral { background: var(--peach-100); color: var(--coral-700); }
.btn-soft-coral:hover { background: var(--peach); color: var(--green-900); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--cream-200); color: var(--ink); }
.btn-danger { background: #fbe4df; color: #b3361f; }
.btn-danger:hover { background: #f5c9bf; color: #8f2a17; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-xs { padding: 5px 10px; font-size: .78rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

/* ---------- En-tête public ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .92); backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(36, 49, 28, .05); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green-800); flex-shrink: 0; }
.brand:hover { color: var(--green-800); }
.brand img { width: 64px; height: 48px; object-fit: contain; }
/* Logotype fidèle au logo : « CUISINÉE » en petites capitales serif, « POUR VOUS » espacé */
.brand-name { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.bn-main { font-family: var(--font-serif); font-weight: 600; font-size: 1.42rem; font-variant: small-caps; letter-spacing: .01em; }
.bn-sub { font-family: var(--font-sans); font-weight: 500; font-size: .62rem; letter-spacing: .34em; text-transform: uppercase; margin-top: 3px; padding-left: .34em; }
.footer-logo { width: 150px; height: auto; }
.main-nav { display: flex; gap: 4px; margin: 0 auto; }
.main-nav a { position: relative; padding: 8px 12px; font-size: .93rem; font-weight: 500; color: var(--ink-soft); border-radius: 8px; }
.main-nav a:hover { color: var(--green-800); }
.main-nav a.active { color: var(--green-800); font-weight: 600; }
.main-nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--green-800); border-radius: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-search { color: var(--ink-soft); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--green-800); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sage-200); color: var(--green-800); font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--green-800); }

.search-panel { display: none; border-top: 1px solid var(--line); background: var(--paper); padding: 14px 0; }
.search-panel.open { display: block; }

/* ---------- Messages flash ---------- */
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); right: 20px; z-index: 80; display: grid; gap: 10px; max-width: 380px; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; background: var(--white); box-shadow: var(--shadow); border-left: 4px solid var(--green-600); font-size: .92rem; animation: flash-in .35s ease; }
.flash-error { border-left-color: var(--coral); }
.flash-info { border-left-color: var(--blue); }
.flash button { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Héros d'accueil ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 120px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: 18px; }
.hero h1 .accent { display: block; }
.hero .lead { margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; border-radius: 200px 28px 28px 28px; box-shadow: var(--shadow-lg); }
.hero-badge { position: absolute; left: -24px; bottom: 32px; display: flex; gap: 12px; align-items: center; background: var(--white); padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); font-size: .88rem; max-width: 260px; }
.hero-badge .icon-bubble { background: var(--peach-100); color: var(--coral); }
.leaf-deco { position: absolute; pointer-events: none; opacity: .5; color: var(--sage); }

/* ---------- Cartes ---------- */
.card { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid rgba(232, 225, 212, .7); overflow: hidden; }
.card-body { padding: 22px; }
.icon-bubble { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-100); color: var(--green-800); flex-shrink: 0; }
.icon-bubble.coral { background: var(--peach-100); color: var(--coral); }
.icon-bubble.amber { background: var(--amber-100); color: var(--amber); }
.icon-bubble.blue { background: var(--blue-100); color: var(--blue); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: -90px; position: relative; z-index: 2; }
.pillar { transition: transform .25s, box-shadow .25s; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillar-img { position: relative; height: 190px; }
.pillar-img img { width: 100%; height: 100%; object-fit: cover; }
.pillar-img .icon-bubble { position: absolute; left: 20px; bottom: -24px; background: var(--white); box-shadow: var(--shadow-sm); width: 54px; height: 54px; }
.pillar .card-body { padding-top: 34px; }
.pillar h3 { font-size: 1.45rem; margin-bottom: 6px; }
.pillar p { color: var(--muted); font-size: .94rem; min-height: 48px; }

.why { display: grid; grid-template-columns: 220px repeat(4, 1fr); gap: 24px; align-items: center; }
.why-title { font-family: var(--font-hand); font-size: 2.6rem; line-height: 1; color: var(--green-800); transform: rotate(-6deg); }
.why-title::after { content: ""; display: block; width: 130px; height: 10px; margin-top: 6px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 10'%3E%3Cpath d='M2 8C40 2 90 1 128 5' stroke='%23d0582a' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
.why-item { text-align: center; }
.why-item .icon-bubble { margin: 0 auto 12px; width: 56px; height: 56px; background: var(--peach-100); color: var(--coral); }
.why-item:nth-child(even) .icon-bubble { background: var(--sage-100); color: var(--green-700); }
.why-item h4 { font-family: var(--font-sans); font-size: .98rem; color: var(--ink); margin-bottom: 4px; }
.why-item p { font-size: .86rem; color: var(--muted); margin: 0; }

/* ---------- Bandeau de page ---------- */
.page-hero { position: relative; min-height: 240px; display: flex; align-items: center; color: #fff; background: var(--green-800) center/cover no-repeat; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22, 58, 44, .88) 0%, rgba(22, 58, 44, .55) 55%, rgba(22, 58, 44, .1) 100%); }
.page-hero .container { position: relative; padding-top: 48px; padding-bottom: 48px; }
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: rgba(255, 255, 255, .88); margin: 0; max-width: 560px; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--coral); }

/* ---------- Recherche et filtres ---------- */
.toolbar { display: grid; gap: 18px; margin-bottom: 32px; }
.search-box { position: relative; }
.search-box input { width: 100%; padding: 14px 52px 14px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm); }
.search-box button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--green-800); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 16px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: .87rem; font-weight: 500; color: var(--ink-soft); }
.chip:hover { border-color: var(--green-700); color: var(--green-800); }
.chip.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }

/* ---------- Grilles de contenus ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.item-card { display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.item-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.item-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-200); }
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.item-card:hover .thumb img { transform: scale(1.05); }
.item-card .tag { position: absolute; left: 12px; bottom: 12px; padding: 4px 11px; border-radius: 999px; background: var(--sage-200); color: var(--green-800); font-size: .75rem; font-weight: 600; }
.item-card .tag.coral { background: var(--peach-100); color: var(--coral-700); }
.item-card .card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.item-card h3 { font-size: 1.15rem; margin: 0; }
.item-card h3 a { color: var(--green-800); }
.item-card p { font-size: .9rem; color: var(--muted); margin: 0; }
.item-card .price { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--green-800); }
.item-card .card-foot { margin-top: auto; padding-top: 6px; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.pagination .current { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .icon-bubble { margin: 0 auto 14px; width: 64px; height: 64px; }

/* ---------- Détail recette / formation ---------- */
.detail-top { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.detail-top img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.detail-meta { display: flex; gap: 22px; flex-wrap: wrap; margin: 16px 0 20px; color: var(--ink-soft); font-size: .92rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: 7px; }
.detail-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; margin-top: 44px; }
.ingredients li { padding: 9px 0; border-bottom: 1px dashed var(--line); list-style: none; display: flex; gap: 10px; }
.ingredients li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); margin-top: 9px; flex-shrink: 0; }
.ingredients, .steps { padding: 0; margin: 0; }
.steps { counter-reset: step; }
.steps li { list-style: none; position: relative; padding: 0 0 18px 48px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--green-800); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.tip { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--sage-100); color: var(--green-900); font-size: .93rem; margin-top: 12px; }
.tip .icon { color: var(--green-700); margin-top: 2px; }

/* ---------- Prestations ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px 26px; overflow: visible; }
.plan.featured { border: 2px solid var(--coral); box-shadow: var(--shadow); }
.plan .ribbon { position: absolute; top: -13px; left: 26px; background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan h3 { margin-bottom: 6px; }
.plan .price { font-family: var(--font-serif); font-size: 2.3rem; font-weight: 600; color: var(--green-800); line-height: 1; margin: 14px 0 4px; }
.plan .price small { font-family: var(--font-sans); font-size: .85rem; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 9px; font-size: .92rem; }
.plan li { display: flex; gap: 9px; }
.plan li .icon { color: var(--green-600); margin-top: 3px; }
.plan .btn { margin-top: auto; }
.sap-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--blue-100); color: var(--blue); }

.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: proc; }
.process-step { position: relative; padding: 24px 20px 20px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); counter-increment: proc; }
.process-step::before { content: counter(proc, decimal-leading-zero); font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--peach); display: block; line-height: 1; margin-bottom: 8px; }
.process-step h4 { font-family: var(--font-sans); font-size: .98rem; color: var(--ink); margin-bottom: 4px; }
.process-step p { font-size: .86rem; color: var(--muted); margin: 0; }

.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.audience .card-body { display: flex; gap: 14px; }
.audience h4 { font-family: var(--font-sans); font-size: 1rem; color: var(--ink); margin: 0 0 4px; }
.audience p { font-size: .87rem; color: var(--muted); margin: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3.2; object-fit: cover; }

.band { background: var(--green-800); color: #fff; border-radius: var(--radius-lg); padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.band h2 { color: #fff; margin: 0 0 6px; }
.band p { color: rgba(255, 255, 255, .8); margin: 0; }

/* ---------- À propos ---------- */
.stats-row { display: grid; gap: 18px; }
.stat-line { display: flex; gap: 14px; align-items: center; }
.stat-line strong { display: block; font-family: var(--font-serif); font-size: 1.6rem; color: var(--green-800); line-height: 1.1; }
.stat-line span { font-size: .85rem; color: var(--muted); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { text-align: center; padding: 28px 20px; }
.value .icon-bubble { margin: 0 auto 14px; width: 58px; height: 58px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose a { text-decoration: underline; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label, .label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--coral); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  transition: border-color .2s, box-shadow .2s; font-size: .95rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 0; border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-100); }
.field .hint { font-size: .78rem; color: var(--muted); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--coral); }
.field .error { font-size: .8rem; color: var(--coral-700); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--green-800); width: 16px; height: 16px; }
.password-wrap { position: relative; }
.password-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 28px; }
.contact-list { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.contact-list li { display: flex; gap: 14px; }
.contact-list strong { display: block; font-size: .9rem; }
.contact-list span { color: var(--muted); font-size: .9rem; white-space: pre-line; }
.map { border: 0; width: 100%; height: 300px; border-radius: var(--radius); }

/* ---------- Authentification ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 20px; background: linear-gradient(rgba(250, 246, 239, .55), rgba(250, 246, 239, .7)), var(--auth-image, url("https://images.unsplash.com/photo-1498837167922-ddd27525d352?w=1600&q=60")) center/cover; }
.auth-card { width: 100%; max-width: 460px; padding: 38px; }
.auth-card h1 { font-size: 2rem; }
.auth-card h1::first-letter { color: var(--coral); }
.auth-card .form-stack { display: grid; gap: 16px; margin-top: 24px; }
.btn-google { background: #fff; color: #3c4043; border: 1px solid #dadce0; gap: 12px; padding: 12px 22px; font-weight: 600; }
.btn-google:hover { background: #f8f9fa; color: #202124; border-color: #c6c9cc; box-shadow: 0 1px 3px rgba(60, 64, 67, .2); }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { text-align: center; font-size: .9rem; color: var(--muted); margin-top: 20px; }
.auth-foot a { color: var(--coral); font-weight: 600; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); margin-top: 40px; position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 36px; }
.footer-top h4 { font-family: var(--font-sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 14px; }
.footer-top ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.footer-top ul a { color: var(--ink-soft); }
.footer-top ul a:hover { color: var(--coral); }
.footer-tagline { font-size: .9rem; color: var(--muted); margin: 14px 0 18px; max-width: 280px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--green-800); color: #fff; transition: background .2s, transform .2s; }
.socials a:hover { background: var(--coral); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.footer-bottom .words { font-family: var(--font-hand); font-size: 1.25rem; color: var(--green-700); }

/* ---------- Chatbot ---------- */
.chatbot-toggle { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; background: var(--green-800); color: #fff; box-shadow: var(--shadow-lg); display: grid; place-items: center; transition: transform .2s, background .2s; }
.chatbot-toggle:hover { transform: scale(1.06); background: var(--green-900); }
.chatbot-toggle .dot { position: absolute; top: 8px; right: 8px; width: 13px; height: 13px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
.chatbot { position: fixed; right: 22px; bottom: 96px; z-index: 91; width: 380px; max-width: calc(100vw - 32px); height: 580px; max-height: calc(100vh - 120px); background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.chatbot.open { display: flex; animation: chat-in .25s ease; }
@keyframes chat-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.chatbot-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chatbot-head img { width: 46px; height: 35px; object-fit: contain; }
.chatbot-head strong { font-family: var(--font-serif); color: var(--green-800); font-size: 1.05rem; line-height: 1; display: block; }
.chatbot-head small { color: var(--green-600); font-size: .75rem; display: flex; align-items: center; gap: 5px; }
.chatbot-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4caf50; }
.chatbot-head button { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; }
.chatbot-head button:hover { background: var(--cream-200); }
.chatbot-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, var(--paper), var(--cream)); }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.45; animation: flash-in .25s ease; }
.msg-bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-user { align-self: flex-end; background: var(--green-800); color: #fff; border-bottom-right-radius: 4px; }
.msg a.msg-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: var(--peach-100); color: var(--coral-700); font-size: .82rem; font-weight: 600; }
.quick-replies { display: grid; gap: 8px; align-self: stretch; }
.quick-replies button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--sage-200); background: var(--sage-100); color: var(--green-800); font-size: .87rem; font-weight: 500; cursor: pointer; transition: background .2s; }
.quick-replies button:hover { background: var(--sage-200); }
.typing { display: inline-flex; gap: 4px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chatbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--paper); }
.chatbot-form input { flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-size: .9rem; }
.chatbot-form input:focus { outline: 0; border-color: var(--sage); }
.chatbot-form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--green-800); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* ---------- Badges, tableaux, divers ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--sage-100); color: var(--green-700); }
.badge-coral { background: var(--peach-100); color: var(--coral-700); }
.badge-amber { background: var(--amber-100); color: #a76a10; }
.badge-blue { background: var(--blue-100); color: var(--blue); }
.badge-muted { background: var(--cream-200); color: var(--muted); }

.error-page { text-align: center; padding: 100px 20px; }
.error-page .code { font-family: var(--font-serif); font-size: 6rem; color: var(--peach); line-height: 1; }

/* ==========================================================================
   Espaces client et administration (structure commune)
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--green-800); color: rgba(255, 255, 255, .85); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; padding: 0 8px 22px; }
.sidebar .brand-name { color: #fff; }
.sidebar .bn-main { font-size: 1.2rem; }
.sidebar .brand img { width: 58px; height: 46px; background: #fff; border-radius: 12px; padding: 4px 5px; }
.side-nav { display: grid; gap: 2px; }
.side-nav .group-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .45); padding: 16px 12px 6px; }
.side-nav a, .side-nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .82); font-size: .9rem; font-weight: 500; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.active { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.side-nav .count { margin-left: auto; background: var(--coral); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.sidebar-quote { margin: 18px 6px 10px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-family: var(--font-serif); font-size: .92rem; color: #fff; }
.app-main { min-width: 0; background: var(--cream); }
.app-topbar { display: flex; align-items: center; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.app-topbar .spacer { flex: 1; }
.app-topbar .nav-toggle { display: none; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.topbar-user small { display: block; color: var(--muted); font-size: .75rem; }
.bell { position: relative; color: var(--ink-soft); padding: 8px; border-radius: 50%; display: grid; place-items: center; }
.bell:hover { background: var(--cream-200); }
.bell .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; background: var(--coral); border-radius: 50%; border: 2px solid var(--paper); }
.app-content { padding: 30px 32px 48px; max-width: 1280px; }
.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-title h1 { font-size: 1.85rem; margin: 0 0 4px; }
.page-title p { color: var(--muted); margin: 0; font-size: .93rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.kpi.tint-coral { background: var(--peach-100); border-color: #f8d6c8; }
.kpi.tint-green { background: var(--sage-100); border-color: var(--sage-200); }
.kpi.tint-amber { background: var(--amber-100); border-color: #f6e0b8; }
.kpi.tint-blue { background: var(--blue-100); border-color: #d2e0f2; }
.kpi .kpi-label { font-size: .84rem; color: var(--ink-soft); }
.kpi .kpi-value { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--green-800); line-height: 1; }
.kpi .kpi-foot { font-size: .78rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.kpi .kpi-foot a { font-weight: 600; }
.trend-up { color: var(--green-600); font-weight: 600; }
.trend-down { color: var(--coral-700); font-weight: 600; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1.08rem; margin: 0; font-family: var(--font-serif); }
.panel-body { padding: 20px; }
.panel + .panel, .panel-gap { margin-top: 20px; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 10px 16px; background: var(--cream); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(233, 241, 229, .35); }
.table .thumb-sm { width: 52px; height: 42px; border-radius: 8px; object-fit: cover; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table a.row-title { font-weight: 600; color: var(--ink); }
.table a.row-title:hover { color: var(--coral); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user small { display: block; color: var(--muted); font-size: .78rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters select { width: auto; min-width: 160px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .88rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-size: .9rem; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--green-800); border-color: var(--green-800); font-weight: 600; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list strong { display: block; font-size: .92rem; }
.list small { color: var(--muted); font-size: .8rem; }
.list img { width: 56px; height: 48px; object-fit: cover; border-radius: 10px; }
.list .unread { background: rgba(253, 234, 225, .45); }

.chart { width: 100%; height: 240px; }
.chart text { font-size: 11px; fill: var(--muted); font-family: var(--font-sans); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .86rem; }
.bar-row .bar { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: var(--cream-200); overflow: hidden; }
.bar-row .bar span { display: block; height: 100%; background: var(--green-600); border-radius: 6px; }
.bar-row:nth-child(3n+2) .bar span { background: var(--coral); }
.bar-row:nth-child(3n) .bar span { background: var(--sage); }

.thread { display: grid; gap: 14px; }
.bubble { max-width: 75%; padding: 14px 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); }
.bubble.staff { background: var(--sage-100); border-color: var(--sage-200); }
.bubble.mine { margin-left: auto; background: var(--peach-100); border-color: #f8d6c8; }
.bubble small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 4px; }
.bubble p { margin: 0; white-space: pre-line; font-size: .92rem; overflow-wrap: anywhere; }
.bubble.is-new { animation: flash-in .3s ease; }

/* Messagerie directe */
[hidden] { display: none !important; }
.convo-thread { align-content: start; max-height: min(60vh, 560px); min-height: 220px; overflow-y: auto; background: linear-gradient(180deg, var(--paper), var(--cream)); scroll-behavior: smooth; }
.convo-form { display: flex; gap: 10px; align-items: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.convo-form textarea { flex: 1; resize: vertical; min-height: 48px; max-height: 200px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: .95rem; }
.convo-form textarea:focus { outline: 0; border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-100); }
.convo-closed { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--cream-200); color: var(--ink-soft); font-size: .92rem; }
.convo-closed .icon { margin-top: 2px; color: var(--muted); }
.convo-hint { font-size: .78rem; padding: 0 20px 14px; margin: 0; }
.reply-tabs { justify-content: flex-start; gap: 6px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.reply-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; color: var(--muted); margin-bottom: -1px; }
.reply-tab:hover { color: var(--green-800); }
.reply-tab.active { color: var(--green-800); border-bottom-color: var(--coral); }
/* Éditeur de contenus */
.content-editor { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.content-nav { position: sticky; top: 84px; display: grid; gap: 2px; padding: 10px; }
.content-nav > a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-soft); font-size: .9rem; font-weight: 500; }
.content-nav > a:hover { background: var(--cream); color: var(--green-800); }
.content-nav > a.active { background: var(--sage-100); color: var(--green-800); font-weight: 600; }
.content-nav-help { display: grid; gap: 6px; margin-top: 10px; padding: 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.content-nav-help strong { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.content-nav-help a { color: var(--green-700); }
.content-section:first-child { margin-top: 0; }
.content-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 14px 0; margin-top: 10px; background: linear-gradient(transparent, var(--cream) 30%); }
.repeater { display: grid; gap: 12px; }
.repeater-items { display: grid; gap: 12px; }
.repeater-row { border: 1px solid var(--line); border-radius: 14px; background: var(--cream); padding: 12px 14px 16px; }
.repeater-bar { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.repeater-bar strong { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--green-800); color: #fff; font-size: .78rem; }
.repeater-bar .spacer { flex: 1; }
.repeater [data-add] { justify-self: start; }
.image-picker { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.image-picker img { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; background: var(--cream-200); border: 1px solid var(--line); }
.image-picker-controls { display: grid; gap: 8px; }
.icon-select { display: flex; gap: 10px; align-items: center; }
.icon-select [data-icon-preview] { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-100); color: var(--green-800); flex-shrink: 0; }
.icon-select select { flex: 1; }

/* Bouton WhatsApp flottant */
.wa-float { position: fixed; bottom: 22px; z-index: 89; display: flex; align-items: center; gap: 10px; }
.wa-float.right { right: 22px; flex-direction: row-reverse; }
.wa-float.right.with-chat { bottom: 96px; right: 26px; }
.wa-float.left { left: 22px; }
.wa-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 28px rgba(37, 211, 102, .38); transition: transform .2s; flex-shrink: 0; }
.wa-btn:hover { transform: scale(1.07); color: #fff; }
.wa-btn svg { width: 30px; height: 30px; }
.wa-bubble { max-width: 230px; padding: 10px 14px; border-radius: 14px; background: var(--white); color: var(--ink); font-size: .85rem; font-weight: 500; box-shadow: var(--shadow); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; pointer-events: none; }
.wa-float.show-bubble .wa-bubble, .wa-float:hover .wa-bubble { opacity: 1; transform: none; pointer-events: auto; }
.app-shell ~ .wa-float.right.with-chat { bottom: 22px; }

/* Factures */
.file-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: var(--cream-200); color: var(--ink-soft); white-space: nowrap; }
.file-chip.pdf { background: var(--peach-100); color: var(--coral-700); }
.file-chip.excel { background: var(--sage-100); color: var(--green-700); }
.file-chip-lg { padding: 7px 12px; font-size: .84rem; border-radius: 10px; transition: transform .15s, box-shadow .15s; }
.file-chip-lg:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.file-chip-lg small { font-weight: 500; opacity: .75; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 18px; text-align: center; border: 2px dashed var(--sage-300); border-radius: 14px; background: var(--sage-100); color: var(--green-700); transition: background .2s, border-color .2s; }
.dropzone.is-over { background: var(--sage-200); border-color: var(--green-600); }
.dropzone p { margin: 0; color: var(--ink); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.file-list li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-size: .88rem; }
.file-list li .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li.is-invalid { border-color: var(--coral); color: var(--coral-700); }
.invoice-calendar { display: grid; gap: 26px; }
.invoice-month-title { display: flex; align-items: baseline; gap: 12px; font-size: 1.25rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--sage-200); }
.invoice-month-title small { font-family: var(--font-sans); font-size: .8rem; font-weight: 500; color: var(--muted); }
.invoice-list { display: grid; gap: 12px; }
.invoice-card { display: flex; gap: 18px; align-items: flex-start; padding: 16px 18px; }
.invoice-card > .grow { flex: 1; min-width: 0; }
.invoice-card.is-unseen { border-color: var(--peach); box-shadow: 0 0 0 3px var(--peach-100); }
.invoice-date { display: grid; justify-items: center; min-width: 56px; padding: 8px 6px; border-radius: 12px; background: var(--green-800); color: #fff; line-height: 1.1; }
.invoice-date strong { font-family: var(--font-serif); font-size: 1.45rem; }
.invoice-date span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.invoice-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invoice-note { margin: 8px 0 0; font-size: .88rem; color: var(--ink-soft); white-space: pre-line; }
.invoice-files { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.invoice-side { display: grid; justify-items: end; gap: 8px; text-align: right; }
.invoice-amount { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--green-800); white-space: nowrap; }
#client_id { width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .92rem; }
#client_id option { padding: 7px 8px; border-radius: 6px; }

.form-panel { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.form-panel .panel-body { display: grid; gap: 16px; }
.image-preview { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: var(--cream-200); }
.def-list { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: .9rem; margin: 0; }
.def-list dt { color: var(--muted); }
.def-list dd { margin: 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.media-item { border-radius: 12px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.media-item .media-meta { padding: 8px 10px; font-size: .74rem; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.copy-input { width: 100%; font-size: .72rem; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--cream); }

.profile-card { text-align: center; }
.profile-card .avatar { margin: 0 auto 10px; }
.mini-recipes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-recipes a { font-size: .82rem; font-weight: 600; color: var(--ink); }
.mini-recipes img { aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 6px; width: 100%; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--paper); padding: 12px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open a { padding: 12px; }
  .main-nav.open a.active::after { display: none; }
  .header-actions { margin-left: auto; }
  .why { grid-template-columns: repeat(2, 1fr); }
  .why-title { grid-column: 1 / -1; text-align: center; transform: none; }
  .why-title::after { margin: 6px auto 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .form-panel { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .content-editor { grid-template-columns: 1fr; }
  .content-nav { position: static; display: flex; flex-wrap: wrap; }
  .content-nav-help { display: none; }
  .image-picker { grid-template-columns: 1fr; }
  .wa-bubble { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 100; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .app-topbar .nav-toggle { display: inline-grid; }
  .app-topbar { padding: 12px 16px; }
  .app-content { padding: 22px 16px 40px; }
  .hero-grid, .detail-top, .detail-body, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-bottom: 110px; }
  .hero-media img { border-radius: 120px 24px 24px 24px; }
  .hero-badge { left: 12px; }
  .grid-3, .grid-4, .pillars, .audience, .values, .dash-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .convo-form { flex-direction: column; align-items: stretch; padding: 12px; }
  .invoice-card { flex-wrap: wrap; gap: 12px; }
  .invoice-side { grid-auto-flow: column; justify-items: start; align-items: center; width: 100%; }
  .convo-thread { max-height: 62vh; }
  .reply-tab { font-size: .92rem; padding: 10px 8px; }
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }
  .header-actions .btn-outline, .header-actions .header-search, .user-chip .chip-label { display: none; }
  .user-chip { padding: 3px; }
  .header-inner { gap: 12px; }
  .bn-main { font-size: 1.22rem; }
  .brand img { width: 54px; height: 40px; }
  .grid-2, .grid-3, .grid-4, .pillars, .audience, .values, .process, .form-grid, .kpis, .dash-grid-3, .footer-top, .why { grid-template-columns: 1fr; }
  .pillars { margin-top: -70px; }
  .band { padding: 30px 22px; }
  .auth-card { padding: 28px 22px; }
  .flash-stack { left: 16px; right: 16px; max-width: none; }
  .chatbot { right: 16px; bottom: 90px; height: 70vh; }
  .chatbot-toggle { right: 16px; bottom: 16px; }
  .def-list { grid-template-columns: 1fr; gap: 2px 0; }
  .def-list dd { margin-bottom: 10px; }
  .mini-recipes { grid-template-columns: repeat(2, 1fr); }
  .bubble { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
