/* =========================================================
   InfoProject Software — Feuille de style principale
   Thème « holographique orange / gris foncé »
   (pages publiques via layout.php + console admin)
   Les tokens de police et la palette commune viennent de
   theme.css, chargé avant ce fichier.
   ========================================================= */

:root {
  --bg: #15140f;
  --bg-soft: #1a1813;
  --bg-card: rgba(24, 22, 17, 0.96);
  --bg-card-2: rgba(20, 18, 14, 0.97);
  --line: rgba(255, 170, 100, 0.16);
  --line-strong: rgba(255, 170, 100, 0.32);
  --rim: rgba(255, 170, 100, 0.24);
  --text: #ece6dd;
  --muted: #9c9488;
  --accent: #ff7a1a;
  --accent-2: #ff4d2e;
  --accent-3: #ffb347;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 122, 26, 0.14), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(255, 77, 46, 0.12), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(255, 179, 71, 0.08), transparent 32%),
    linear-gradient(180deg, #131109 0%, #17140e 45%, #1a1712 100%);
}

/* Grille discrète (le mouvement vient du canvas fx-net) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 150, 80, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 150, 80, 0.03) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 82%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

h1, h2, h3, .page-title, .section-title {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.container { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px) saturate(1.1);
  background: rgba(20, 18, 14, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-shell, .footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-shell { min-height: 4.3rem; }

.brand, .footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  color: #1a0f04;
  background: var(--flare);
  box-shadow: 0 0 18px var(--glow-o);
}
.brand-icon .svg-icon { stroke: #1a0f04; }

.svg-icon {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svg-fill { fill: currentColor; stroke: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 600;
}

.site-nav a {
  color: var(--muted);
  padding: 1.3rem 0;
  position: relative;
  transition: color 180ms ease;
}
.site-nav a:hover { color: #fff; }

.site-nav a.active { color: #fff; }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--flare);
  box-shadow: 0 0 16px var(--glow-o);
}

.page-main { position: relative; padding: 2.8rem 0 3.4rem; }

/* ---------- Panneaux en verre (surface commune) ---------- */
.page-hero,
.detail-hero,
.admin-panel,
.project-card,
.detail-panel,
.admin-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--rim);
  border-radius: 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.page-hero::before,
.detail-hero::before,
.admin-panel::before,
.admin-card::before,
.detail-panel::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 122, 26, 0.14), transparent 26%),
    radial-gradient(circle at left center, rgba(255, 77, 46, 0.1), transparent 28%);
  pointer-events: none;
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: 50%;
  width: 420px;
  height: 420px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.22), rgba(255, 122, 26, 0.05) 38%, transparent 64%);
  filter: blur(12px);
  pointer-events: none;
}

.page-hero > *,
.detail-hero > *,
.admin-panel > *,
.admin-card > *,
.detail-panel > *,
.project-card > * {
  position: relative;
  z-index: 1;
}

.page-hero, .detail-hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.3rem;
  margin-bottom: 1.6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  width: fit-content;
  padding: 0 0.8rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--amber);
  border: 1px solid var(--rim);
  background: rgba(255, 122, 26, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
}

.page-title {
  margin: 1rem 0 0.7rem;
  max-width: 16ch;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 0.98;
  color: #fff;
  text-shadow: 0 0 28px rgba(255, 122, 26, 0.18);
}

.page-description {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Grille & cartes projet ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.project-card {
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.5), 0 0 34px rgba(255, 122, 26, 0.22);
}

/* reflet holographique au survol */
.project-card::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 55%;
  height: 220%;
  z-index: 2;
  background: linear-gradient(105deg, transparent, rgba(255, 220, 180, 0.14), transparent);
  transform: rotate(8deg);
  opacity: 0;
  transition: none;
  pointer-events: none;
}
.project-card:hover::after {
  animation: card-sheen 0.9s ease;
}
@keyframes card-sheen {
  0% { left: -50%; opacity: 0; }
  30% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.project-card-link { display: block; }

.project-card-media {
  height: 220px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(60, 40, 20, 0.35), rgba(20, 16, 12, 0.15)),
    rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--line);
}
.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Teinte chaude pour l'harmonie avec le thème ; les vraies couleurs
     reviennent au survol pour ne pas dénaturer les captures. */
  filter: sepia(0.55) saturate(1.9) hue-rotate(-12deg) brightness(0.98);
  transition: transform 260ms ease, filter 260ms ease;
}
.project-card:hover .project-card-media img {
  transform: scale(1.04);
  filter: saturate(1.06);
}

.project-card-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card-copy { padding: 1.25rem; }

.project-card-type {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.project-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  min-height: 4.8em;
}

.project-card-meta {
  margin-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--rim);
  background: rgba(255, 122, 26, 0.06);
}

.status-published { color: #ffd27a; }
.status-in_development { color: #ff9e4d; }
.status-coming_soon { color: #ff6a4d; }
.status-draft { color: #b8b0a4; }

.project-card-cta {
  font-family: var(--font-display);
  font-weight: 600;
  color: #ffd9bf;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.86rem;
}

/* ---------- Fiche projet ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
}
.detail-panel { min-height: 100%; padding: 1.4rem; }

.detail-image {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--rim);
  background: rgba(255, 255, 255, 0.03);
}
.detail-image img {
  display: block;
  width: 100%;
  height: auto;
  filter: sepia(0.35) saturate(1.5) hue-rotate(-10deg);
}

.detail-content h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.02;
  color: #fff;
}
.detail-content p,
.detail-content li,
.meta-list {
  color: var(--muted);
  line-height: 1.8;
}
.meta-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.4rem 0;
  font-family: var(--font-display);
}
.meta-list strong { color: var(--text); }

/* Panneaux « Configuration requise » et « Notes de version » (fiche projet) */
.info-panel-section { margin-top: 1.2rem; }
.info-panel { padding: 1.6rem 1.8rem; }
.info-panel-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}
.info-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--amber);
}
.info-icon .svg-icon { width: 22px; height: 22px; }
.req-list { margin: 0; padding-left: 1.3rem; color: var(--muted); line-height: 1.8; }
.req-list li { margin: 0.3rem 0; }
.req-list strong { color: var(--text); }
.version-entry { margin-bottom: 1.3rem; }
.version-entry:last-child { margin-bottom: 0; }
.version-head {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.version-head strong { color: var(--orange); }
.version-date { color: var(--muted); font-weight: 400; }
.version-entry ul { margin: 0; padding-left: 1.3rem; color: var(--muted); line-height: 1.7; }
.version-entry li { margin: 0.25rem 0; }

/* Jauge de progression du développement (fiche projet publique) */
.progress-meter { margin: 1.3rem 0 0.2rem; }
.progress-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}
.progress-meter-head span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.progress-meter-head strong {
  color: #fff;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.progress-meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--rim);
  overflow: hidden;
}
.progress-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--flare);
  box-shadow: 0 0 14px var(--glow-o);
  transition: width 0.6s ease;
}

/* ---------- Galerie de captures (fiche + admin) ---------- */
.detail-gallery { margin-top: 1.4rem; }
.detail-gallery-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.6rem; color: #fff; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery-item {
  display: block;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--rim);
  background: rgba(255, 255, 255, 0.03);
}
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-delete {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  color: #ffb1a1;
  background: rgba(255, 77, 46, 0.12);
  cursor: pointer;
}
.gallery-delete input { width: auto; min-height: 0; }
.gallery-selected {
  margin: 0.4rem 0 0;
  color: var(--amber);
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.gallery-selected:empty { display: none; }

.detail-gallery a.gallery-item { cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 8, 5, 0.9);
  backdrop-filter: blur(10px);
}
.lightbox.is-open { display: flex; }

.lightbox-stage {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--rim);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 122, 26, 0.18);
}
.lightbox-counter {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--amber);
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid var(--rim);
  background: rgba(255, 122, 26, 0.1);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.lightbox-close {
  position: absolute;
  top: clamp(0.8rem, 3vw, 1.6rem);
  right: clamp(0.8rem, 3vw, 1.6rem);
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.1rem;
}
.lightbox-nav {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 2rem;
  flex: none;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 122, 26, 0.22);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .lightbox-nav { width: 2.6rem; height: 2.6rem; font-size: 1.5rem; }
}

/* ---------- Boutons ---------- */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.3rem;
  border-radius: 12px;
  border: 1px solid var(--rim);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 200ms ease, background 180ms ease;
}
.button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 122, 26, 0.22);
}

.button-primary {
  color: #1a0f04;
  background: var(--flare);
  border-color: transparent;
  box-shadow: 0 12px 28px var(--glow-o);
}
.button-primary:hover {
  border-color: transparent;
  box-shadow: 0 14px 36px rgba(255, 122, 26, 0.55);
}

.button-danger {
  background: rgba(255, 77, 46, 0.14);
  border-color: rgba(255, 77, 46, 0.3);
  color: #ffb1a1;
}
.button-danger:hover {
  border-color: rgba(255, 77, 46, 0.55);
  box-shadow: 0 0 20px rgba(255, 77, 46, 0.25);
}

/* ---------- Console admin ---------- */
.admin-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.2rem;
  align-items: start;
}
.admin-panel { position: sticky; top: 5.6rem; padding: 1.2rem; }

.admin-menu a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}
.admin-menu a.active,
.admin-menu a:hover {
  background: rgba(255, 122, 26, 0.1);
  color: #fff;
}

.admin-card { padding: 1.25rem; }
.admin-card h1, .admin-card h2 { margin-top: 0; color: #fff; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.stat-box {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--rim);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  font-family: var(--font-display);
}
.stat-box span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; }
.stat-box strong { display: block; margin-top: 0.4rem; font-size: 1.7rem; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- Formulaires ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field, .field-wide { display: grid; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }

label {
  color: #f0e6d8;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--rim);
  border-radius: 12px;
  background: rgba(10, 9, 6, 0.85);
  color: var(--text);
  padding: 0.9rem 1rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.14);
}
textarea { min-height: 180px; resize: vertical; }

small { color: var(--muted); }

/* ---------- Tableau ---------- */
.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(10, 9, 6, 0.5);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
th {
  font-family: var(--font-display);
  color: #f0e6d8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

/* ---------- Messages flash ---------- */
.flash {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rim);
  background: rgba(255, 255, 255, 0.03);
}
.flash-error {
  border-color: rgba(255, 77, 46, 0.3);
  color: #ffb8a8;
  background: rgba(255, 77, 46, 0.08);
}
.flash-success {
  border-color: rgba(255, 179, 71, 0.3);
  color: #ffd9a0;
  background: rgba(255, 179, 71, 0.08);
}

.login-shell { max-width: 520px; margin: 4rem auto; }

/* ---------- Pied de page ---------- */
.site-footer { position: relative; }
.footer-shell {
  min-height: 5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-display);
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--amber);
  transition: color 160ms ease;
}
.footer-legal a:hover { color: #fff; }

/* ---------- Pages légales (prose) ---------- */
.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}
.legal-content h2 {
  font-size: 1.35rem;
  color: #fff;
  margin: 1.9rem 0 0.6rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--amber);
  margin: 1.2rem 0 0.4rem;
}
.legal-content p,
.legal-content li {
  color: var(--muted);
  line-height: 1.75;
}
.legal-content p { margin: 0.6rem 0; }
.legal-content ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.4rem;
}
.legal-content li { margin: 0.35rem 0; }
.legal-content strong { color: var(--text); }
.legal-content a {
  color: var(--orange);
  text-decoration: underline;
}
.legal-content a:hover { color: var(--amber); }

/* Article de blog */
.article-cover { max-width: 900px; margin: 0 auto 1.4rem; }
.article-body { margin: 0 auto; }
.article-project {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  color: var(--muted);
}
.article-project a { color: var(--orange); text-decoration: underline; }
.article-project a:hover { color: var(--amber); }

/* Commentaires — côté public */
.post-comments { max-width: 900px; margin: 2rem auto 0; }
.comments-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0 0 1rem; }
.comment-list { display: grid; gap: 0.9rem; margin-bottom: 1.6rem; }
.comment {
  padding: 1rem 1.2rem;
  border: 1px solid var(--rim);
  border-radius: 14px;
  background: var(--bg-card);
}
.comment-head {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
}
.comment-head strong { color: #fff; }
.comment-head span { color: var(--muted); font-size: 0.82rem; }
.comment-body { color: var(--muted); line-height: 1.65; }
.comments-form-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 1.6rem 0 0.4rem; }
.comment-form { margin-top: 0.8rem; }

/* Commentaires — modération (admin) */
.moderation-list { display: grid; gap: 0.9rem; margin-top: 1rem; }
.moderation-item {
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}
.moderation-item.is-pending {
  border-color: rgba(255, 106, 77, 0.4);
  background: rgba(255, 106, 77, 0.06);
}
.moderation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
}
.moderation-meta strong { color: #fff; }
.mod-email, .mod-date { color: var(--muted); }
.moderation-meta a { color: var(--amber); }
.moderation-body { color: var(--text); line-height: 1.6; }

/* =========================================================
   Console admin — composants du formulaire de projet
   ========================================================= */

/* Utilitaire piloté par JS (jamais appliqué sans JS) */
.is-hidden { display: none !important; }

/* Écran de choix du type */
.type-chooser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.type-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--rim);
  background:
    linear-gradient(180deg, rgba(255, 122, 26, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 200ms ease;
}
.type-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(255, 122, 26, 0.22);
}
.type-card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 122, 26, 0.28), rgba(255, 179, 71, 0.28));
  margin-bottom: 0.4rem;
}
.type-card-icon .svg-icon {
  width: 24px;
  height: 24px;
  stroke: #ffd9bf;
  stroke-width: 1.8;
}
.type-card strong { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.type-card-hint { color: var(--muted); font-size: 0.9rem; }

.type-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.6rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd9bf;
  background: rgba(255, 122, 26, 0.14);
  border: 1px solid var(--rim);
}

.form-section-title {
  margin: 1.8rem 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.form-section-hint { margin-bottom: 0.9rem; }

/* Contrôle Fichier / URL */
.link-control .seg {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: rgba(10, 9, 6, 0.6);
  border: 1px solid var(--rim);
  width: fit-content;
}
.seg-opt {
  min-height: 2.1rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  width: auto;
}
.seg-opt.is-active { background: rgba(255, 122, 26, 0.2); color: #fff; }
.link-pane small { font-size: 0.85rem; }

.checkbox-field { gap: 0.6rem; align-content: start; }
.checkbox-line { display: flex; gap: 0.5rem; align-items: center; }
.checkbox-line input { width: auto; min-height: 0; }

.current-image { margin-top: 1rem; }
.current-image-preview { margin-top: 0.7rem; max-width: 280px; }

.form-advanced {
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}
.form-advanced > summary {
  cursor: pointer;
  padding: 0.7rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: #f0e6d8;
  list-style: none;
}
.form-advanced > summary::before { content: "▸ "; color: var(--muted); }
.form-advanced[open] > summary::before { content: "▾ "; }
.form-advanced small { font-size: 0.85rem; }

/* Barre d'outils du tableau */
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.table-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.table-filters input,
.table-filters select { min-height: 2.6rem; padding: 0.4rem 0.8rem; width: auto; }
.table-filters input[type="search"] { min-width: 220px; }
.table-empty-note { margin-top: 1rem; color: var(--muted); }

.cell-thumb { width: 56px; }
.row-thumb {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--rim);
}
.row-thumb-empty { background: rgba(255, 255, 255, 0.05); }

/* Tableau de dump (page Maintenance) : compact, défilable */
table.dump { font-size: 0.8rem; }
table.dump th,
table.dump td { white-space: nowrap; padding: 0.5rem 0.7rem; }
table.dump th {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0;
}

/* Graphique des visites (barres CSS, sans JS ni librairie) */
.visits-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: 14px 8px 6px;
  border: 1px solid var(--rim);
  border-radius: 14px;
  background: rgba(10, 9, 6, 0.4);
  margin: 0.6rem 0 1rem;
  overflow-x: auto;
}
.vc-col {
  flex: 1 1 0;
  min-width: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.vc-bar {
  width: 100%;
  max-width: 28px;
  min-height: 2px;
  border-radius: 6px 6px 0 0;
  background: var(--flare);
  box-shadow: 0 0 12px var(--glow-o);
  transition: filter 160ms ease;
}
.vc-col:hover .vc-bar { filter: brightness(1.15); }
.vc-val {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.vc-label {
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .project-grid,
  .detail-grid,
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid, .admin-shell { grid-template-columns: 1fr; }
  .admin-panel { position: static; }
}

@media (max-width: 860px) {
  .footer-shell {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.8rem 0;
  }

  /* Menu hamburger : la barre reste en ligne, la nav devient un panneau déroulant */
  .nav-burger { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 1.1rem 0.9rem;
    background: rgba(20, 18, 14, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 0.85rem 0.2rem; }
  .site-nav a.active::after { display: none; }

  .page-main { padding-top: 1.4rem; }
  .page-hero, .detail-hero { min-height: auto; padding: 1.5rem; }
  .page-hero::after, .detail-hero::after { width: 220px; height: 220px; right: -15%; }

  .table-toolbar { flex-direction: column; align-items: stretch; }
  .table-filters input[type="search"] { min-width: 0; flex: 1; }
}
