/* ============================================================
   GEST'IMMO — Styles du blog + de l'administration
   (chargé après styles.css : réutilise ses variables)
   ============================================================ */

/* ---------- Liste d'articles ---------- */
.blog-list { padding: 64px 0 96px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card__media { display: block; aspect-ratio: 16/10; background: var(--mist); overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.blog-card:hover .blog-card__media img { transform: scale(1.05); }
.blog-card__ph { display: flex; align-items: center; justify-content: center; height: 100%;
  font-family: var(--f-display); font-weight: 700; letter-spacing: .04em; color: var(--blue-200);
  background: linear-gradient(135deg, var(--blue-50), var(--mist)); }
.blog-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__cat { align-self: flex-start; font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--blue); background: var(--blue-50); padding: 4px 10px; border-radius: var(--r-pill); }
.blog-card__title { font-family: var(--f-display); font-size: 20px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.blog-card__title a { color: var(--ink); }
.blog-card__title a:hover { color: var(--blue); }
.blog-card__excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0; flex: 1; }
.blog-card__meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-2);
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.blog-pager { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 48px; font-size: 14px; }
.blog-pager a { color: var(--blue); font-weight: 600; }
.blog-pager span { color: var(--muted); }
.blog-empty { text-align: center; padding: 60px 20px; max-width: 540px; margin: 0 auto; }
.blog-empty h2 { font-family: var(--f-display); margin: 0 0 10px; }
.blog-empty p { color: var(--muted); margin: 0 0 24px; }

/* ---------- Article ---------- */
.article .wrap-narrow { max-width: 760px; }
.article-hero { padding: 40px 0 8px; }
.article-hero .crumb { margin-bottom: 18px; }
.article-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1; letter-spacing: -.02em; color: var(--ink); margin: 14px 0 0; }
.article-lead { font-size: 19px; line-height: 1.6; color: var(--muted); margin: 18px 0 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; font-size: 13.5px; color: var(--muted-2); }
.article-meta span { position: relative; }
.article-meta span + span::before { content: "·"; position: absolute; left: -11px; }
.article-cover { margin: 32px 0 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.article-cover img { width: 100%; display: block; }

.article-body { font-size: 17.5px; line-height: 1.75; color: var(--ink-soft); margin-top: 36px; }
.article-body > *:first-child { margin-top: 0; }
.article-body h2 { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1.25;
  letter-spacing: -.01em; color: var(--ink); margin: 44px 0 14px; }
.article-body h3 { font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--ink); margin: 34px 0 12px; }
.article-body p { margin: 0 0 20px; }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.article-body li { padding-left: 4px; }
.article-body blockquote { margin: 28px 0; padding: 8px 22px; border-left: 3px solid var(--blue);
  background: var(--blue-50); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink-soft); font-style: italic; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.article-figure { margin: 28px 0; }
.article-figure img { width: 100%; display: block; border-radius: var(--r-lg); }
.article-body pre { background: var(--blue-ink); color: #e6edf6; padding: 18px 20px; border-radius: var(--r-md);
  overflow: auto; font-family: var(--f-mono); font-size: 13.5px; margin: 0 0 20px; }
.article-body code { font-family: var(--f-mono); font-size: .9em; background: var(--mist); padding: 1px 6px; border-radius: 4px; }
.article-body pre code { background: none; padding: 0; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 36px 0; }

.article-cta { margin: 56px 0 0; padding: 32px; background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-xl); text-align: center; }
.article-cta h3 { font-family: var(--f-display); margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.article-cta p { color: var(--muted); margin: 0 0 18px; }
.article-back { margin: 40px 0 80px; }
.article-back a { color: var(--blue); font-weight: 600; }

/* ---------- Administration ---------- */
.admin-body { background: var(--bone-2); min-height: 100vh; }
.admin-bar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.admin-bar__in { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 24px; }
.admin-bar__brand { color: #fff; font-weight: 700; font-family: var(--f-display); }
.admin-bar__nav { display: flex; gap: 18px; flex: 1; }
.admin-bar__nav a { color: rgba(255,255,255,.78); font-size: 14px; }
.admin-bar__nav a:hover, .admin-bar__nav a.is-active { color: #fff; }
.admin-bar__user { font-size: 13px; color: rgba(255,255,255,.7); }
.admin-bar__user a { color: #fff; text-decoration: underline; }

.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-head h1 { font-family: var(--f-display); font-size: 28px; margin: 0; color: var(--ink); }
.admin-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.admin-empty { background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--r-xl); padding: 60px 20px; text-align: center; }
.admin-empty p { color: var(--muted); margin: 0 0 18px; }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.admin-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2);
  background: var(--bone); padding: 14px 18px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table strong { color: var(--ink); display: block; }
.admin-slug { color: var(--muted-2); font-size: 12.5px; font-family: var(--f-mono); }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); }
.badge-pub { background: #e6f7ec; color: #1a8a4f; }
.badge-draft { background: var(--mist); color: var(--muted); }
.admin-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-actions a { color: var(--blue); font-size: 13.5px; }
.admin-actions form { display: inline; }
.link-danger { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13.5px; padding: 0; font-family: inherit; }
.link-danger:hover { text-decoration: underline; }

/* Connexion */
.admin-auth { max-width: 380px; margin: 8vh auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); padding: 36px 34px; }
.admin-auth__brand img { height: 30px; margin-bottom: 18px; }
.admin-auth h1 { font-family: var(--f-display); font-size: 24px; margin: 0 0 6px; color: var(--ink); }
.admin-auth__sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.admin-auth form { display: flex; flex-direction: column; gap: 16px; }
.admin-auth__foot { margin: 20px 0 0; text-align: center; font-size: 13px; }
.admin-auth label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }

.admin-alert { padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 20px; }
.admin-alert.ok { background: #e6f7ec; color: #1a8a4f; }
.admin-alert.ko { background: var(--red-tint); color: var(--red-600); }

/* Champs communs */
.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-size: 13px; font-weight: 500; color: var(--muted); }
.editor input[type=text], .editor input[type=file], .editor textarea, .editor select,
.admin-auth input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: inherit; font-size: 14.5px; color: var(--ink); background: var(--bone); }
.editor textarea { resize: vertical; }
.editor input:focus, .editor textarea:focus, .editor select:focus,
.admin-auth input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px var(--blue-50); }

/* Éditeur */
.editor-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.editor-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 20px; }
.editor-box h3 { font-family: var(--f-display); font-size: 15px; margin: 0 0 14px; color: var(--ink); }
.editor-cover { width: 100%; border-radius: var(--r-md); margin-bottom: 12px; display: block; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--bone); border: 1px solid var(--line); border-bottom: none; border-radius: var(--r-md) var(--r-md) 0 0; align-items: center; }
.editor-toolbar button { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 10px; font-size: 13px; cursor: pointer; color: var(--ink-soft); font-family: inherit; }
.editor-toolbar button:hover { border-color: var(--blue); color: var(--blue); }
.editor-toolbar__hint { font-size: 12px; color: var(--muted-2); margin-left: auto; }
.editor-body { border-radius: 0 0 var(--r-md) var(--r-md) !important; font-size: 15px !important; line-height: 1.6; min-height: 380px; }
.editor-preview-wrap { margin-top: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 24px 8px; }
.editor-preview-wrap > summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--ink); font-family: var(--f-display); }
.install-log { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.install-log li { padding: 10px 14px; border-radius: var(--r-md); font-size: 14px; }
.install-log li.ok { background: #e6f7ec; color: #1a8a4f; }
.install-log li.ko { background: var(--red-tint); color: var(--red-600); }
.install-next { background: var(--bone); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; font-size: 14px; }
.install-next ol { margin: 10px 0 0; padding-left: 18px; }

@media (max-width: 980px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .admin-bar__in { gap: 12px; }
  .admin-bar__nav { gap: 12px; }
  .admin-table thead { display: none; }
  .admin-table td { display: block; border: none; padding: 6px 16px; }
  .admin-table tr { display: block; border-bottom: 1px solid var(--line); padding: 12px 0; }
}
