/* FoxySofts — Maquette 2026 — palette inspirée du logo (orange #fc9c54 / violet #9c54cc) */
:root {
  --bg: #14111c;
  --bg-soft: #1d1830;
  --card: #241f38;
  --border: #3a3154;
  --text: #f2eefb;
  --muted: #a79ec4;
  --accent: #fc9c54;
  --accent-2: #9c54cc;
  --accent-2-light: #c9a0f0;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent-2-light); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px 24px; }
.section-title { font-size: 1.7rem; margin: 0 0 18px; border-left: 4px solid var(--accent); padding-left: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { text-align: right; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 17, 28, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.2rem; }
.brand-logo { height: 44px; width: auto; border-radius: 9px; box-shadow: 0 2px 10px rgba(156, 84, 204, .35); }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem;
}
.main-nav a:hover { color: var(--text); background: var(--bg-soft); }
.main-nav a.active { color: #fff; background: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); font-size: 1.2rem; border-radius: 8px; padding: 4px 10px; cursor: pointer; }

/* Hero */
.hero {
  background: radial-gradient(1000px 420px at 50% -10%, rgba(252, 156, 84, .18), transparent),
              radial-gradient(900px 380px at 78% 0%, rgba(156, 84, 204, .38), transparent),
              linear-gradient(180deg, rgba(156, 84, 204, .14), transparent 55%),
              var(--bg-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero-inner { padding: 64px 20px 56px; }
.hero-logo-wrap {
  display: inline-block; background: #ffffff; border-radius: 18px; padding: 16px 30px;
  box-shadow: 0 10px 40px rgba(156, 84, 204, .45), 0 2px 12px rgba(252, 156, 84, .25);
}
.hero-title-img { height: 120px; width: auto; display: block; }
.hero-tagline { font-size: 1.15rem; color: var(--accent); font-weight: 600; margin: 14px 0 6px; }
.hero-text { max-width: 720px; margin: 0 auto 22px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Boutons */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; font-size: .95rem;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.btn.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }

/* Cartes */
.card {
  background: linear-gradient(160deg, rgba(156, 84, 204, .13), transparent 45%), var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.news-card { padding: 18px; }
.news-card h3 { margin: 0 0 6px; font-size: 1.1rem; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.project-card img { width: 100%; height: 160px; object-fit: cover; display: block; background: #000; }
.project-body { padding: 14px 16px 18px; }
.project-body h3 { margin: 8px 0 4px; }
.project-body p { margin: 6px 0 0; font-size: .92rem; color: var(--muted); }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(156, 84, 204, .18); color: var(--accent-2-light); border: 1px solid rgba(156, 84, 204, .5);
  padding: 3px 9px; border-radius: 999px;
}

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.project-card.hidden { display: none; }

/* Téléchargements */
.dl-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.input {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 10px 14px; font-size: .95rem; min-width: 220px; flex: 1;
}
.input:focus { outline: 2px solid var(--accent-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.dl-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--card); }
.dl-table th, .dl-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dl-table th { background: var(--bg-soft); position: sticky; top: 0; }
.dl-table tr.hidden { display: none; }
.dl-table tr:hover td { background: rgba(255, 255, 255, .03); }

/* Galerie */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); display: block; }
.gallery-item img { width: 100%; height: 150px; object-fit: cover; display: block; transition: transform .25s; }
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff;
  font-size: 1.6rem; cursor: pointer;
}

/* Formulaire */
.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; font-size: 1.2rem; color: var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin-top: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form textarea { resize: vertical; }

.timeline { list-style: none; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--accent); margin-bottom: 6px; }

.flash {
  background: rgba(46, 204, 113, .12); border: 1px solid rgba(46, 204, 113, .5); color: #7bed9f;
  padding: 12px 16px; border-radius: 10px; margin-top: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 56px;
  background: linear-gradient(180deg, var(--bg-soft), rgba(156, 84, 204, .16)), var(--bg-soft);
}
.footer-inner { padding: 28px 20px; text-align: center; color: var(--muted); font-size: .9rem; }
.footer-inner a { color: var(--accent-2-light); text-decoration: none; }

/* Archives TMS */
.tms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.tms-card img { width: 100%; height: 120px; object-fit: cover; display: block; background: #000; }
.tms-card .project-body { padding: 10px 12px 14px; }
.tms-card h3 { font-size: .98rem; margin: 0 0 4px; }
.tms-card-src { min-height: 90px; display: flex; align-items: center; }
.tms-card .btn { margin-top: 6px; }
code { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .9em; }

/* Responsive */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 10px;
  }
  .main-nav.open { display: flex; }
  .hero-inner { padding: 44px 20px 40px; }
}

/* ---------- Site 2026 : admin + paypal ---------- */
.paypal-link { color: var(--muted); font-size: .85rem; }
.paypal-link:hover { color: var(--accent-2-light); }
.footer-links { display: flex; gap: 8px; justify-content: center; align-items: center; }
.hero-donate { margin-top: 18px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--accent); }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 860px) { .admin-cols { grid-template-columns: 1fr; } }

.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.bar-label { width: 90px; color: var(--muted); }
.bar { height: 14px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 4px; min-width: 2px; }
.bar-dl { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-n { width: 40px; text-align: right; color: var(--muted); }

form[style*="inline"] { display: inline; }

/* ---------- Site 2026 v2 : news images, page projet, zoom survol ---------- */
.news-card { padding: 0; overflow: hidden; transition: transform .2s, border-color .2s; position: relative; }
.news-card:hover { transform: scale(1.02); border-color: var(--accent-2); z-index: 5; }
.news-card .news-body { padding: 18px; }
.news-img { display: block; width: 100%; height: 150px; object-fit: cover; background: #000; } /* vignette : image remplissant la hauteur (non contrainte) */
/* card news : début du texte sur 4 lignes (le texte complet apparaît en zoom au survol) */
.news-card .news-content {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .92rem; line-height: 1.55; color: var(--muted);
}
/* panneau zoom au survol d'une actualité : texte complet */
.news-preview {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.95);
  z-index: 300; display: none; width: min(640px, 90vw); max-height: 82vh; overflow: auto;
  background: var(--card); border: 1px solid var(--accent-2); border-radius: 14px;
  padding: 20px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .65);
  transition: transform .15s; cursor: auto; /* roulette souris active pour scroller le texte complet */
}
.news-preview.show { display: block; transform: translate(-50%, -50%) scale(1); }
.news-preview h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--text); }
.news-preview-img { width: 100%; max-height: 220px; object-fit: contain; background: #000; border-radius: 8px; margin-bottom: 12px; }
.news-preview-body { font-size: .92rem; line-height: 1.65; color: var(--text); }
.news-preview-body img { max-width: 100%; height: auto; }
.news-preview-body p { margin: 8px 0; }
/* corps de news importés du site d'origine (center, img, newsbas) */
.news-content center, .news-preview-body center { display: block; text-align: center; }
.news-content img, .news-preview-body img { max-width: 100%; height: auto; }
.news-content iframe, .news-preview-body iframe { max-width: 100%; }

.project-card { display: block; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s; }
.project-card:hover { transform: translateY(-3px); border-color: var(--accent-2); }

.project-hero { display: flex; gap: 26px; align-items: flex-start; margin-bottom: 26px; flex-wrap: wrap; }
.project-hero-img { max-width: 320px; width: 100%; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.project-content { padding: 24px; font-size: .95rem; line-height: 1.7; }
.project-content img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; margin: 8px 10px 8px 0; background: #000; }
.project-content h1, .project-content h2, .project-content h3, .project-content h4, .project-content h5 { color: var(--text); margin: 16px 0 6px; }
.project-content a { color: var(--accent-2-light); }
.project-content table { border-collapse: collapse; margin: 10px 0; }
.project-content td { padding: 2px 8px; vertical-align: top; }
.project-content center { display: block; text-align: center; }

/* aperçu image complète au survol */
.img-preview {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 300; display: none; background: #fff; padding: 10px; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); pointer-events: none;
}
.img-preview.show { display: block; }
.img-preview img { max-width: min(560px, 82vw); max-height: 78vh; display: block; border-radius: 8px; }

/* descriptions TMS : retours à la ligne conservés */
.tms-desc { white-space: normal; line-height: 1.5; font-size: .88rem; }

/* liens vignette/titre des cards TMS vers fiche dédiée */
.card-img-link { display: block; }
.card-img-link img { transition: transform .2s; }
.card-img-link:hover img { transform: scale(1.03); }
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: var(--accent-2-light); }

/* description tronquée à 4 lignes sur les cards avec fiche dédiée (utilitaires TMS) */
.clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* formulaire admin : fieldsets + galerie screenshots projet */
.admin-fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.admin-fieldset legend { color: var(--accent-2-light); font-size: .9rem; padding: 0 6px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 18px 0; }
.shot-grid img { width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #000; cursor: zoom-in; }

/* ---------- Éditeur Quill (admin) ---------- */
.quill-editor { background: #fff; color: #111; border-radius: 10px; min-height: 320px; font-weight: 400; }
.quill-editor .ql-editor { font-weight: 400; } /* le label du formulaire admin est en semi-gras : ne pas hériter */
.quill-editor .ql-toolbar { border-radius: 10px 10px 0 0; border-color: var(--border); background: #f4f2fa; }
.quill-editor .ql-container { border-radius: 0 0 10px 10px; border-color: var(--border); font-size: .95rem; }
.quill-editor .ql-editor { min-height: 300px; }

/* ---------- Rendu du contenu riche côté public ---------- */
.project-content p { margin: 8px 0; }
.project-content .ql-align-center, .project-content [style*="text-align: center"] { text-align: center; }
.project-content .ql-align-right, .project-content [style*="text-align: right"] { text-align: right; }
.project-content .ql-align-justify, .project-content [style*="text-align: justify"] { text-align: justify; }
.project-content ul, .project-content ol { margin: 8px 0; padding-left: 24px; }
.project-content blockquote { border-left: 3px solid var(--accent-2); margin: 10px 0; padding: 4px 14px; color: var(--muted); }
.project-content u { text-decoration: underline; }
