/* ============================================================
   SECONDARTS.COM — 2026 Rebuild (Light theme)
   Prof d'arts plastiques + future collection jeux vidéo
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light palette — gallery white with creative accents */
  --bg-deep:      #f6f5f1;
  --bg-surface:   #eceae4;
  --bg-card:      #ffffff;
  --bg-card-hover:#faf9f7;

  --accent:       #6c5ce7;
  --accent-glow:  #5a4bd4;
  --accent-alt:   #1a9e8f;
  --accent-warm:  #d4548a;

  --text:         #3a3640;
  --text-muted:   #7d7888;
  --text-heading: #1e1a2a;

  --border:       #ddd9d2;
  --border-light: #e8e5de;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  --max-w: 1100px;
  --gap:   clamp(1rem, 3vw, 2.5rem);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent-glow); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-alt); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 245, 241, .9);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  height: 28px;
  width: auto;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -.02em;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: .4rem .7rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--text-heading);
  background: rgba(108, 92, 231, .08);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 3.5rem;
    left: 0; right: 0;
    background: rgba(246, 245, 241, .97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: .5rem .75rem;
    gap: 1px;
  }

  .nav-links.open { display: flex; }
  .nav-links a { padding: .55rem .85rem; }
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%; left: 50%;
  width: 60vw; height: 60vw;
  max-width: 600px; max-height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(108,92,231,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-logo {
  height: 48px;
  width: auto;
  margin: 0 auto 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--text-heading);
  margin-bottom: 1rem;
  position: relative;
}

.hero h1 .accent { color: var(--accent); }
.hero h1 .accent-alt { color: var(--accent-alt); }

.hero-sub {
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}

.hero-tags span {
  display: inline-block;
  padding: .25rem .65rem;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .2s, color .2s;
}

.hero-tags span:hover {
  border-color: var(--accent);
  color: var(--text-heading);
}

/* --- Section layout --- */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -.02em;
  margin-bottom: .4rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 500px;
  margin-inline: auto;
  font-size: .88rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: .5rem;
}

/* --- Card grid — COMPACT tiles --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(108, 92, 231, .08);
}

.card-thumb {
  aspect-ratio: 5 / 4;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb .placeholder-icon {
  font-size: 1.5rem;
  opacity: .45;
}

.card-body {
  padding: .6rem .75rem .7rem;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: .2rem;
  line-height: 1.3;
}

.card-body p {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.card-tag {
  display: inline-block;
  margin-top: .4rem;
  padding: .15rem .45rem;
  font-size: .6rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.card-tag.art      { background: rgba(108,92,231,.1);  color: var(--accent); }
.card-tag.gaming   { background: rgba(26,158,143,.1);  color: var(--accent-alt);  }
.card-tag.theory   { background: rgba(212,84,138,.1);  color: var(--accent-warm); }

/* --- Art movements timeline — compact --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: .65rem;
}

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .85rem .7rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
}

.timeline-item:hover {
  border-color: var(--accent-warm);
  transform: translateY(-2px);
}

.timeline-item .period {
  font-family: var(--font-display);
  font-size: .62rem;
  font-weight: 600;
  color: var(--accent-warm);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-heading);
}

/* --- Theories / text content --- */
.prose {
  max-width: 680px;
  margin-inline: auto;
  font-size: .92rem;
  line-height: 1.75;
  color: var(--text);
}

.prose p + p {
  margin-top: 1rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Présentation (about) --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 680px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-stat {
  text-align: center;
  padding: 1rem;
}

.about-stat .number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.about-stat .label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

/* --- Jeux vidéo (coming soon) --- */
.coming-soon-banner {
  background: linear-gradient(135deg, rgba(26,158,143,.05), rgba(108,92,231,.05));
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}

.coming-soon-banner h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: .4rem;
}

.coming-soon-banner p {
  font-size: .85rem;
  color: var(--text-muted);
  max-width: 440px;
  margin-inline: auto;
}

.coming-soon-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: .3rem .85rem;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent-alt);
  border: 1px solid rgba(26,158,143,.3);
  border-radius: 999px;
}

/* --- Liens (links) grid --- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .75rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .7rem .85rem;
  transition: border-color .2s, transform .2s;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.link-card .link-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  background: rgba(108,92,231,.07);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
}

.link-card .link-info h4 {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-heading);
}

.link-card .link-info p {
  font-size: .68rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-heading);
}

.footer-brand span { color: var(--accent); }

.site-footer p {
  font-size: .75rem;
  color: var(--text-muted);
}

.footer-contact { margin-top: .35rem; }

.footer-contact a {
  font-size: .78rem;
  color: var(--accent-glow);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .timeline-item, .link-card { transition: none; }
  .card:hover, .timeline-item:hover { transform: none; }
}

/* --- Print --- */
@media print {
  .site-nav, .hero::before { display: none; }
  body { background: #fff; color: #111; }
  .section + .section { border-top-color: #ccc; }
}

/* --- Clickable card links --- */
a.card {
  color: inherit;
  text-decoration: none;
  display: block;
}

a.card:hover {
  color: inherit;
}

/* --- Legacy PHP content wrapper --- */
.legacy-content {
  color: var(--text);
}

.legacy-content img {
  border-radius: var(--radius-sm);
}

.legacy-content a {
  color: var(--accent-glow);
}

.legacy-content table {
  border-collapse: collapse;
  width: 100%;
}

.legacy-content td,
.legacy-content th {
  padding: .5rem;
  vertical-align: top;
}

/* Override old inline styles in legacy pages */
.legacy-content font {
  color: var(--text) !important;
}

.legacy-content .style1,
.legacy-content .style2,
.legacy-content .style3,
.legacy-content .style4,
.legacy-content .style5,
.legacy-content .style6,
.legacy-content .style7,
.legacy-content .style8,
.legacy-content .style9,
.legacy-content .style10 {
  font-family: var(--font-body) !important;
  color: var(--text) !important;
}