/* =============================================================
   Nuumite — Thème glassmorphism "liquid glass" (style Apple)
   Plusieurs palettes globales (data-theme) + couleur par service.
   ============================================================= */

:root {
  --bg-1: #0b1020;
  --bg-2: #101a33;
  --text: #f4f6ff;
  --text-soft: rgba(244, 246, 255, 0.72);
  --text-faint: rgba(244, 246, 255, 0.5);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-hover: rgba(255, 255, 255, 0.3);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.28);

  --overlay: rgba(255, 255, 255, 0.06);
  --overlay-strong: rgba(255, 255, 255, 0.16);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text-grad-1: #ffffff;
  --text-grad-2: #cfd6ff;

  --accent: #5ac8fa;
  --accent-2: #af52de;
  --accent-3: #30d158;
  --danger: #ff453a;
  --warning: #ffd60a;
  --info: #64d2ff;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Palette "Océan" (bleu profond) --- */
html[data-theme="ocean"] {
  --bg-1: #04141f;
  --bg-2: #063146;
  --accent: #3fc1ff;
  --accent-2: #4dd0e1;
  --accent-3: #2dd4bf;
  --info: #4dd0e1;
  --warning: #ffd166;
}

/* --- Palette "Émeraude" (vert / teal) --- */
html[data-theme="emerald"] {
  --bg-1: #03150f;
  --bg-2: #0a2e22;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --accent-3: #4ade80;
  --info: #22d3ee;
  --warning: #fbbf24;
}

/* --- Palette "Flamme" (violet / fuchsia) --- */
html[data-theme="flame"] {
  --bg-1: #1a0f1f;
  --bg-2: #2d1740;
  --accent: #d471ff;
  --accent-2: #ff5f8f;
  --accent-3: #ff9f0a;
  --info: #8b7bff;
  --warning: #ffd60a;
}

/* --- Palette "Aurore" (défaut, bleu/violet/gold) --- */
html[data-theme="aurora"] {
  --bg-1: #0b1020;
  --bg-2: #101a33;
  --accent: #5ac8fa;
  --accent-2: #af52de;
  --accent-3: #30d158;
  --info: #64d2ff;
  --warning: #ffd60a;
}

html[data-theme="coral"] {
  --bg-1: #1f1218;
  --bg-2: #38202b;
  --accent: #ff806e;
  --accent-2: #ffb15c;
  --accent-3: #ed6682;
  --info: #ff9c84;
  --warning: #ffd166;
}

html[data-theme="citrus"] {
  --bg-1: #17190d;
  --bg-2: #303318;
  --accent: #d4d94e;
  --accent-2: #70cf82;
  --accent-3: #f1b84b;
  --info: #a2d66b;
  --warning: #f1b84b;
}

html[data-theme="ruby"] {
  --bg-1: #210f19;
  --bg-2: #3b1827;
  --accent: #ff6b88;
  --accent-2: #e789bd;
  --accent-3: #ff9b73;
  --info: #d789d6;
  --warning: #ffd166;
}

html[data-theme="saffron"] {
  --bg-1: #1d170d;
  --bg-2: #382a14;
  --accent: #ffc266;
  --accent-2: #ef8e55;
  --accent-3: #d8d05a;
  --info: #8fc7db;
  --warning: #ffe08a;
}

html[data-theme="jade"] {
  --bg-1: #091b19;
  --bg-2: #103630;
  --accent: #42d6b1;
  --accent-2: #9bd970;
  --accent-3: #57b8d4;
  --info: #67cbe0;
  --warning: #e5d66a;
}

html[data-theme="azure"] {
  --bg-1: #101729;
  --bg-2: #1d3050;
  --accent: #70aaff;
  --accent-2: #55d0c0;
  --accent-3: #f0bd66;
  --info: #8ecbff;
  --warning: #ffd166;
}

/* --- Mode clair (s'applique par-dessus n'importe quel thème) --- */
html[data-mode="light"] {
  --bg-1: #eef2fb;
  --bg-2: #dfe7f6;
  --text: #1a2233;
  --text-soft: rgba(26, 34, 51, 0.72);
  --text-faint: rgba(26, 34, 51, 0.5);

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(26, 34, 51, 0.12);
  --glass-border-hover: rgba(26, 34, 51, 0.3);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  --overlay: rgba(26, 34, 51, 0.04);
  --overlay-strong: rgba(26, 34, 51, 0.1);
  --hover-bg: rgba(26, 34, 51, 0.06);
  --surface-2: rgba(255, 255, 255, 0.65);
  --border-subtle: rgba(26, 34, 51, 0.08);
  --text-grad-1: #202a40;
  --text-grad-2: #5a6a8c;

  --shadow: 0 20px 60px rgba(30, 40, 70, 0.18);
}

html[data-mode="light"] .blob { opacity: 0.3; }

html[data-mode="light"] .flash-success { color: #0f7a3d; }
html[data-mode="light"] .flash-error   { color: #b3261e; }
html[data-mode="light"] .flash-info    { color: #0f5d8a; }
html[data-mode="light"] .pill          { color: #0f7a3d; background: rgba(15, 122, 61, 0.1); border-color: rgba(15, 122, 61, 0.35); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2) 60%, color-mix(in srgb, var(--accent-2) 22%, var(--bg-1)));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.6s ease;
}

/* -------------------- Fond animé (blobs) -------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  filter: blur(60px);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-a { width: 45vmax; height: 45vmax; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 70%, #3a7bd5), transparent 70%); top: -15vmax; left: -10vmax; animation: drift-a 26s ease-in-out infinite; }
.blob-b { width: 38vmax; height: 38vmax; background: radial-gradient(circle at 60% 40%, color-mix(in srgb, var(--accent-2) 75%, #af52de), transparent 70%); bottom: -12vmax; right: -8vmax; animation: drift-b 32s ease-in-out infinite; }
.blob-c { width: 30vmax; height: 30vmax; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent-3) 70%, #30d158), transparent 70%); top: 35%; left: 55%; animation: drift-c 38s ease-in-out infinite; opacity: 0.4; }
.blob-d { width: 24vmax; height: 24vmax; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--warning) 75%, #ff9f0a), transparent 70%); top: 12%; right: 20%; animation: drift-b 44s ease-in-out infinite reverse; opacity: 0.35; }

@keyframes drift-a { 0%,100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes drift-b { 0%,100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-7vmax, 5vmax) scale(1.1); } }
@keyframes drift-c { 0%,100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(5vmax, -6vmax) scale(1.2); } }

/* -------------------- Verre -------------------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), var(--glass-highlight);
  border-radius: var(--radius);
}

/* -------------------- Navigation -------------------- */
.nav {
  position: sticky;
  top: 14px;
  margin: 14px auto 0;
  max-width: 1160px;
  border-radius: 999px;
  padding: 8px 12px;
  z-index: 20;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 6px 10px;
  border-radius: 999px;
}

.brand-mark {
  color: var(--accent);
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 90%, transparent);
  font-size: 1.25rem;
}

.brand-mark.big { font-size: 2.6rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links > a:not(.btn) {
  color: var(--text-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.nav-links > a:not(.btn):hover {
  background: var(--hover-bg);
  color: var(--text);
  border-color: var(--glass-border);
}

.nav-links > a.is-active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent-2) 10%, transparent));
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--glass-border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.nav-links > a:not(.btn) { position: relative; }
.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.nav-links > a.is-active::after { transform: scaleX(1); }

/* -------------------- Boutons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, white), color-mix(in srgb, var(--accent-2) 85%, white));
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 38%, transparent);
}

.btn-primary:hover { box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 55%, transparent); }

.btn-ghost {
  background: var(--glass-bg-strong);
  border-color: var(--glass-border);
}

.btn-ghost:hover { border-color: var(--glass-border-hover); background: var(--overlay-strong); }

.btn-block { width: 100%; }
.btn-tiny { padding: 5px 10px; font-size: 0.8rem; }

.btn-danger:hover { background: rgba(255, 69, 58, 0.25); border-color: rgba(255, 69, 58, 0.5); }

/* -------------------- Structure -------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  flex: 1;
}

.section { margin-top: 40px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }

.category-title {
  margin: 26px 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Mini-thème par catégorie --- */
.cat-theme {
  --cat-c: var(--accent);
  position: relative;
  margin-top: 22px;
  padding: 16px 16px 8px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--cat-c) 22%, var(--glass-border));
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--cat-c) 13%, transparent), transparent 55%),
    linear-gradient(160deg, var(--surface-2), color-mix(in srgb, var(--text) 2%, transparent));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.cat-theme:hover {
  border-color: color-mix(in srgb, var(--cat-c) 42%, var(--glass-border));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08),
              0 0 30px color-mix(in srgb, var(--cat-c) 12%, transparent);
}

.cat-theme .category-title {
  margin: 4px 2px 14px;
  color: color-mix(in srgb, var(--cat-c) 60%, var(--text));
}

.cat-dot {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cat-c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cat-c) 18%, transparent),
              0 0 12px color-mix(in srgb, var(--cat-c) 60%, transparent);
}

.cat-theme .service-card {
  border-color: color-mix(in srgb, var(--cat-c) 18%, var(--glass-border));
}

.cat-theme .service-grid { margin-bottom: 10px; }

.section-note { color: var(--text-faint); font-size: 0.85rem; }

.muted { color: var(--text-soft); }
.small { font-size: 0.82rem; }

/* -------------------- Héros / accueil -------------------- */
.hero { margin-top: 34px; }

.hero-glass { padding: 40px 44px; position: relative; overflow: hidden; }

.hero-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
              radial-gradient(50% 100% at 100% 100%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 60%);
  pointer-events: none;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.14);
  border: 1px solid rgba(48, 209, 88, 0.35);
  color: #7fffa8;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 26px 0 14px;
  max-width: 900px;
  line-height: 1.12;
  background: linear-gradient(120deg, #fff, #cfd6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy { color: var(--text-soft); font-size: 1.02rem; max-width: 760px; line-height: 1.7; }
.hero-copy p { margin: 0 0 13px; }
.hero-copy p:last-child { margin-bottom: 0; }
.hero-copy .hero-emphasis { color: var(--text); font-size: 1.08rem; font-weight: 500; }
.hero-copy .hero-closing { margin-top: 20px; color: var(--text); }

.hero-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* -------------------- Horloge -------------------- */
.clock { text-align: right; }

.clock-time {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #fff, color-mix(in srgb, var(--accent) 55%, white));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 40%, transparent);
  line-height: 1;
}

.clock-date { color: var(--text-soft); margin-top: 8px; font-size: 1.05rem; font-weight: 600; }

.clock.compact { text-align: left; }
.clock.compact .clock-time { font-size: 1.8rem; }

/* -------------------- Cartes services -------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.service-card {
  --svc-c: var(--accent);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.18s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--svc-c) 55%, var(--glass-border-hover));
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow), var(--glass-highlight),
              0 0 24px color-mix(in srgb, var(--svc-c) 28%, transparent);
}

.service-card.locked { cursor: pointer; opacity: 0.7; }
.service-card.locked:hover { transform: translateY(-4px); opacity: 1; }

.service-card.soon { cursor: default; }
.service-card.soon:hover { transform: translateY(-4px); }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: none;
  font-size: 1.7rem;
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--svc-c) 30%, rgba(255,255,255,0.08)), color-mix(in srgb, var(--svc-c) 10%, rgba(255,255,255,0.02)));
  border: 1px solid color-mix(in srgb, var(--svc-c) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 6px 16px color-mix(in srgb, var(--svc-c) 22%, transparent);
}

.service-body { flex: 1; min-width: 0; }

.service-name { font-size: 1.05rem; font-weight: 700; }

.service-desc {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.service-status {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--svc-c) 12%, rgba(255,255,255,0.02));
  border: 1px solid color-mix(in srgb, var(--svc-c) 26%, transparent);
  color: color-mix(in srgb, var(--svc-c) 80%, white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.service-card.soon .service-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--svc-c);
  box-shadow: 0 0 8px var(--svc-c);
}

.service-arrow { color: var(--svc-c); font-size: 1.2rem; }
.service-arrow.lock { color: var(--text-faint); }

/* -------------------- Actualités -------------------- */
.garden-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.home-article-grid { grid-auto-rows: 1fr; }

.garden-card { min-width: 0; min-height: 190px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.garden-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.garden-category { color: var(--accent); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; }
.garden-feed { color: var(--text-faint); font-size: 0.76rem; text-decoration: none; white-space: nowrap; }
.garden-feed:hover { color: var(--accent); }
.garden-article { display: block; color: inherit; text-decoration: none; }
.garden-article h3 { margin: 0 0 9px; font-size: 1.1rem; line-height: 1.35; }
.garden-article:hover h3 { color: var(--accent); }
.garden-article p, .garden-empty { margin: 0; color: var(--text-soft); font-size: 0.9rem; line-height: 1.55; }
.garden-date { margin-top: auto; color: var(--text-faint); font-size: 0.78rem; }
.garden-card.is-empty .garden-empty { margin-top: auto; }

.blog-reader-layer { position: fixed; inset: 0; z-index: 1000; visibility: hidden; }
.blog-reader-layer.is-open { visibility: visible; }
.blog-reader-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(5, 9, 18, 0.66); opacity: 0; transition: opacity 0.24s ease; }
.blog-reader-layer.is-open .blog-reader-backdrop { opacity: 1; }
.blog-reader-drawer { position: absolute; inset: 0 0 0 auto; width: min(720px, 62vw); min-width: 440px; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 0 34px 48px; background: var(--bg-1); color: var(--text); border-left: 1px solid var(--glass-border); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.24); transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1); }
.blog-reader-layer.is-open .blog-reader-drawer { transform: translateX(0); }
.blog-reader-toolbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; min-height: 68px; margin: 0 -34px 26px; padding: 0 28px 0 34px; background: var(--bg-1); border-bottom: 1px solid var(--glass-border); color: var(--text-soft); font-size: 0.85rem; }
.blog-reader-actions { display: flex; align-items: center; gap: 10px; }
.blog-reader-return { color: var(--accent); font-size: 0.82rem; text-decoration: none; white-space: nowrap; }
.blog-reader-return:hover { color: var(--text); }
.blog-reader-close { display: grid; place-items: center; width: 40px; aspect-ratio: 1; border: 1px solid var(--glass-border); border-radius: 6px; background: transparent; color: var(--text); font-size: 1.6rem; cursor: pointer; }
.blog-reader-close:hover { background: var(--overlay-strong); }
.blog-reader-content { max-width: 66ch; min-height: 60vh; margin: 0 auto; }
.blog-article-head { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.blog-article-category { margin: 0 0 10px; color: var(--accent); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.blog-article-head h1 { margin: 0 0 12px; font-size: 1.8rem; line-height: 1.25; }
.blog-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-faint); font-size: 0.82rem; }
.blog-article-meta a { color: var(--accent); }
.blog-article-body { color: var(--text); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.blog-article-body p { margin: 0 0 1.2em; white-space: pre-line; }
.blog-article-body p:last-child { margin-bottom: 0; }
.blog-article-image { margin: 1.5rem 0; }
.blog-article-image img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
.blog-reader-error { color: var(--text-soft); }

.about-page { margin-top: 34px; }
.about-intro { padding: 42px 44px; overflow: hidden; position: relative; }
.about-intro::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -150px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  filter: blur(8px);
  pointer-events: none;
}
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.about-card { padding: 24px; min-height: 220px; }
.about-index { color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; }
.about-card h2 { margin-top: 34px; font-size: 1.15rem; line-height: 1.25; }
.about-card p { margin-top: 12px; color: var(--text-soft); line-height: 1.65; font-size: 0.92rem; }

@media (max-width: 680px) {
  .garden-grid { grid-template-columns: 1fr; }
  .about-intro { padding: 30px 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { min-height: 0; }
  .blog-reader-drawer { width: 100%; min-width: 0; padding: 0 20px 36px; }
  .blog-reader-toolbar { margin: 0 -20px 22px; padding: 0 16px 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-reader-backdrop, .blog-reader-drawer { transition: none; }
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.news-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.18s, border-color 0.2s; }
.news-card:hover { transform: translateY(-3px); border-color: var(--glass-border-hover); }
.news-card .news-title { margin: 0; }
.category-card-link { color: inherit; text-decoration: none; }
.category-open { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; color: var(--accent); font-size: 0.86rem; font-weight: 650; text-decoration: none; }
.category-open:hover { color: var(--text); }
.category-intro { max-width: 72ch; margin: -4px 0 20px; color: var(--text-soft); line-height: 1.6; }
.garden-category-link { text-decoration: none; }
.garden-category-link:hover { color: var(--text); }

.news-meta { display: flex; justify-content: space-between; gap: 10px; }

.news-source {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-date { color: var(--text-faint); font-size: 0.78rem; }

.news-title { font-size: 1.02rem; line-height: 1.4; }

.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--accent); }

.news-desc { display: -webkit-box; min-height: 4.5em; max-height: 4.5em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; color: var(--text-soft); font-size: 0.88rem; line-height: 1.5; }

/* -------------------- Auth -------------------- */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding-top: 34px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 36px;
}

.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 { font-size: 1.6rem; margin: 10px 0 6px; }
.auth-head p { font-size: 0.9rem; }

.auth-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 10px; text-align: center; }

/* -------------------- Formulaires -------------------- */
.form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.field-label { font-size: 0.85rem; font-weight: 600; color: var(--text-soft); }

.field-hint { font-size: 0.76rem; color: var(--text-faint); }

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--overlay);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input::placeholder { color: var(--text-faint); }

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  background: var(--overlay-strong);
}

select.input { appearance: none; }
.small-input { padding: 6px 10px; font-size: 0.82rem; width: auto; }

.form-row { display: flex; gap: 14px; flex-wrap: wrap; }

.checks { align-items: center; gap: 18px; }

.check, .mini-check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 0.88rem; cursor: pointer; }

.check input, .mini-check input { accent-color: var(--accent); width: 16px; height: 16px; }

.mini-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; max-width: 340px; }
.mini-check { font-size: 0.8rem; }

.inline-form { display: inline-block; }

/* -------------------- Page d'un service -------------------- */
.svc-hero {
  --svc-c: var(--accent);
  margin-top: 24px;
  padding: 34px 38px;
  position: relative;
  overflow: hidden;
}

.svc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--svc-c) 24%, transparent), transparent 60%);
  pointer-events: none;
}

.svc-hero-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
}

.svc-icon.big {
  width: 78px;
  height: 78px;
  font-size: 2.5rem;
  border-radius: 22px;
}

.svc-hero-info { flex: 1; min-width: 220px; }

.svc-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--svc-c);
  margin-bottom: 10px;
}

.svc-name { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }

.svc-tagline { color: var(--text-soft); margin-top: 6px; font-size: 1.05rem; }

.svc-details { position: relative; color: var(--text-soft); margin-top: 18px; line-height: 1.6; max-width: 760px; }

.svc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--svc-c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--svc-c) 40%, transparent);
  color: color-mix(in srgb, var(--svc-c) 75%, white);
}

.svc-pill.locked { color: var(--text-soft); }

.svc-actions { position: relative; display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.btn.disabled { opacity: 0.7; cursor: default; }

.svc-locked-note { margin-top: 16px; }

.svc-features { padding: 26px 32px; margin-top: 6px; }

.svc-feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px 22px;
}

.svc-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.94rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.svc-check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--svc-c) 25%, transparent);
  color: var(--svc-c);
  border: 1px solid color-mix(in srgb, var(--svc-c) 45%, transparent);
}

/* -------------------- Page de personnalisation ------------- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.theme-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.theme-option input { position: absolute; opacity: 0; pointer-events: none; }

.theme-option:hover { border-color: var(--glass-border-hover); background: var(--hover-bg); }

.theme-option.active {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--glass-border));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 20%, transparent);
}

.theme-option-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--opt-c) 70%, white), transparent 70%),
    linear-gradient(145deg, color-mix(in srgb, var(--opt-c) 90%, #fff), var(--opt-c) 55%, color-mix(in srgb, var(--opt-c) 55%, #000));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 6px 16px color-mix(in srgb, var(--opt-c) 35%, transparent);
}

.theme-option-name { font-size: 0.85rem; font-weight: 600; color: var(--text-soft); }
.theme-option.active .theme-option-name { color: var(--text); }

.perso-cat { margin-bottom: 14px; }
.perso-cat .color-row { flex-wrap: wrap; }
.perso-cat .field-hint { margin-left: auto; }

.perso-cat .field-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perso-sep {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 22px 0;
}

.theme-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* -------------------- Recherche de services ------------------- */
.svc-searchbar {
  margin: 18px 0 6px;
  max-width: 460px;
}

.svc-searchbar .input {
  border-radius: 999px;
  padding: 11px 18px;
}

/* -------------------- Clés Wi-Fi ------------------------------ */
.wifi-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.wifi-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wifi-card.off { opacity: 0.6; }

.wifi-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wifi-card-head .svc-pill { font-size: 0.72rem; padding: 5px 10px; }

.wifi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wifi-row .small { min-width: 88px; }

.wifi-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--overlay);
  border: 1px solid var(--glass-border);
  color: var(--accent);
}

.wifi-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.banner code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }

/* -------------------- Formulaire admin : couleur -------------------- */
.color-row { display: flex; align-items: center; gap: 12px; }

.color-pick {
  width: 46px !important;
  height: 46px;
  padding: 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--glass-border);
}

.color-pick::-webkit-color-swatch-wrapper { padding: 2px; }
.color-pick::-webkit-color-swatch { border: none; border-radius: 8px; }
.color-pick::-moz-color-swatch { border: none; border-radius: 8px; }

textarea.input { min-height: 60px; resize: vertical; font-family: var(--font); line-height: 1.5; }

.markdown-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 7px; border: 1px solid var(--glass-border); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--overlay); }
.markdown-tool, .markdown-preview-toggle { display: inline-grid; place-items: center; min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-soft); font: 600 0.84rem var(--font); cursor: pointer; }
.markdown-tool:hover, .markdown-preview-toggle:hover { border-color: var(--glass-border); background: var(--overlay-strong); color: var(--text); }
.markdown-italic { font-style: italic; }
.markdown-heading, .markdown-code { font-size: 0.72rem; }
.markdown-divider { width: 1px; height: 22px; margin: 0 3px; background: var(--glass-border); }
.markdown-toolbar-spacer { flex: 1; }
.markdown-preview-toggle { min-width: auto; padding: 0 12px; border-color: var(--glass-border); }
.markdown-preview-toggle[aria-pressed="true"] { background: var(--accent); color: #10161c; }
.blog-editor { min-height: 360px !important; border-top-left-radius: 0; border-top-right-radius: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: 0.9rem !important; }
.markdown-preview { min-height: 360px; padding: 16px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); background: var(--overlay); }
.markdown-preview h1, .markdown-preview h2, .markdown-preview h3, .markdown-preview h4, .markdown-preview h5, .markdown-preview h6 { margin: 1.1em 0 0.5em; line-height: 1.3; }
.markdown-preview h1:first-child, .markdown-preview h2:first-child, .markdown-preview h3:first-child { margin-top: 0; }
.markdown-preview pre { overflow-x: auto; padding: 12px; border-radius: 5px; background: var(--overlay-strong); }
.markdown-preview code { padding: 0.1em 0.3em; border-radius: 3px; background: var(--overlay-strong); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.markdown-preview pre code { padding: 0; background: transparent; }
.markdown-preview blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid var(--accent); color: var(--text-soft); }
.markdown-preview li { margin: 0.3em 0; }
.markdown-preview hr { border: 0; border-top: 1px solid var(--glass-border); }
.markdown-preview img { max-width: 100%; }
.blog-article-body h1, .blog-article-body h2, .blog-article-body h3, .blog-article-body h4, .blog-article-body h5, .blog-article-body h6 { margin: 1.4em 0 0.55em; line-height: 1.3; }
.blog-article-body h1:first-child, .blog-article-body h2:first-child, .blog-article-body h3:first-child { margin-top: 0; }
.blog-article-body ul, .blog-article-body ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.blog-article-body blockquote { margin: 0 0 1.2em; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--text-soft); }
.blog-article-body pre { overflow-x: auto; padding: 14px; border-radius: var(--radius-sm); background: var(--overlay-strong); }
.blog-article-body code { padding: 0.1em 0.3em; border-radius: 3px; background: var(--overlay-strong); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.blog-article-body pre code { padding: 0; background: transparent; }
.blog-article-body hr { margin: 1.5em 0; border: 0; border-top: 1px solid var(--glass-border); }
.blog-article-body a { color: var(--accent); }

/* -------------------- Flashes -------------------- */
.flashes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border-left-width: 4px;
  border-left-style: solid;
}

.flash-success { border-left-color: var(--accent-3); color: #a5f7bd; }
.flash-error   { border-left-color: var(--danger); color: #ffb3ae; }
.flash-info    { border-left-color: var(--info); color: #bfe9ff; }

/* -------------------- Bannières -------------------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-top: 24px; font-size: 0.92rem; }
.banner a { color: var(--accent); }
.banner-info { border: 1px solid rgba(100, 210, 255, 0.4); }

/* -------------------- Tableau de bord -------------------- */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }

.page-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }

.empty-state { padding: 32px; text-align: center; color: var(--text-soft); }

/* -------------------- Admin -------------------- */
.admin-layout { display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; gap: 20px; align-items: start; margin-top: 20px; }

.admin-panel { padding: 24px; }

.admin-tabs { display: flex; gap: 10px; margin: 15px 0 25px; flex-wrap: wrap; }
.admin-list-panel { padding: 24px; }
.admin-list-head, .admin-editor-heading, .admin-editor-actions, .admin-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-list-head { margin-bottom: 16px; }
.admin-list-head .panel-title { margin: 0; }
.admin-editor-page { width: 100%; max-width: none; padding: 18px clamp(16px, 3vw, 48px) 24px; display: flex; }
.admin-editor-shell { display: flex; flex: 1; flex-direction: column; gap: 18px; min-width: 0; min-height: calc(100vh - 190px); }
.admin-editor-heading { flex: 0 0 auto; }
.admin-editor-heading .page-title { margin-bottom: 4px; }
.admin-editor-actions { justify-content: flex-end; flex-wrap: wrap; }
.blog-editor-form { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; }
.blog-editor-meta { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 12px 18px; }
.blog-editor-meta .field { margin: 0; }
.blog-editor-excerpt { grid-column: 1 / -1; }
.blog-editor-content { display: flex; flex: 1; flex-direction: column; min-height: 0; margin: 0; }
.blog-editor { flex: 1; min-height: clamp(360px, 52vh, 900px) !important; resize: vertical; }
.blog-editor-content .markdown-preview { flex: 1; min-height: clamp(360px, 52vh, 900px); overflow: auto; }
.blog-editor-hints { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 8px; }
.blog-editor-footer { flex: 0 0 auto; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.blog-publish-field { min-width: 180px; margin: 0 auto 0 0; }
.service-editor-form { padding: clamp(20px, 3vw, 36px); }
.service-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.service-editor-grid .field { margin: 0; }
.service-editor-wide { grid-column: 1 / -1; }
.service-editor-checks { margin: 20px 0; }
.service-editor-shell { max-width: 1160px; margin-right: auto; margin-left: auto; }
.service-editor-shell .admin-editor-footer { padding-top: 16px; border-top: 1px solid var(--border-subtle); }

.panel-title { font-size: 1.1rem; margin-bottom: 16px; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-faint);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--glass-border);
}

.table td { padding: 12px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }

.table tr:last-child td { border-bottom: none; }

.table-actions { text-align: right; white-space: nowrap; }
.table-actions form { display: inline-block; margin-left: 4px; }
.table-icon { font-size: 1.3rem; }
.role-form { display: inline-block; }
.service-form { display: block; }

/* -------------------- Footer -------------------- */
.footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 26px 20px;
  color: var(--text-faint);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-editor-page { padding: 16px 14px 22px; }
  .admin-editor-shell { min-height: auto; }
  .admin-editor-heading { align-items: flex-start; }
  .admin-editor-actions { justify-content: flex-start; }
  .blog-editor-meta, .service-editor-grid { grid-template-columns: 1fr; }
  .blog-editor-excerpt, .service-editor-wide { grid-column: auto; }
  .blog-editor { min-height: 52vh !important; }
  .blog-editor-content .markdown-preview { min-height: 52vh; }
  .admin-list-panel { padding: 18px; }
}

@media (max-width: 560px) {
  .admin-list-head, .admin-editor-heading { align-items: flex-start; flex-direction: column; }
  .admin-editor-footer { align-items: stretch; flex-direction: column; }
  .blog-publish-field { width: 100%; margin: 0; }
  .hero-glass { padding: 28px 22px; }
  .clock { text-align: left; margin-top: 16px; }
  .nav-links .btn { padding: 8px 12px; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .blob-a, .blob-b, .blob-c, .blob-d { animation: none; }
  * { transition: none !important; }
}
