/* ============================================================
   ALAIN BERRY — Site vitrine
   Thème : BD belge / Ligne claire (hommage à Hergé)
   Style : traits nets, cases, couleurs vives, typo comics
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --ink: #1a1a2e;
  --paper: #fbf7ef;
  --paper-alt: #fff8e7;
  --red: #d62828;
  --yellow: #f4a300;
  --blue: #1d6fbf;
  --green: #2a9d3f;
  --panel: #ffffff;
  --line: #1a1a2e;
  --line-w: 3px;
  --shadow: 6px 6px 0 var(--line);
  --font-display: 'Trebuchet MS', 'Comic Sans MS', 'Arial Black', sans-serif;
  --font-body: Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Lien d'évitement (accessibilité) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 10px 16px;
  z-index: 100;
  border: var(--line-w) solid var(--line);
}
.skip-link:focus { left: 0; }

/* Texte visible uniquement pour les lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header / Nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--red);
  border-bottom: var(--line-w) solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 1px;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: var(--line-w) solid var(--line);
  box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 8px 10px;
  border: var(--line-w) solid transparent;
  letter-spacing: .5px;
}
.nav a:hover { background: var(--line); }

.nav-toggle {
  display: none;
  background: none;
  border: var(--line-w) solid var(--paper);
  color: var(--paper);
  font-size: 1.4rem;
  padding: 2px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 60px 0;
  background:
    radial-gradient(circle at 90% 10%, var(--yellow) 25%, transparent 26%),
    radial-gradient(circle at 8% 85%, var(--green) 22%, transparent 23%),
    var(--paper);
  border-bottom: var(--line-w) solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-tag {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--red);
  font-size: .9rem;
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--yellow);
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 34ch;
  margin-bottom: 26px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-panel {
  background: var(--panel);
  border: var(--line-w) solid var(--line);
  box-shadow: var(--shadow);
  padding: 12px;
  transform: rotate(1.3deg);
}
.hero-panel .panel-img { border: var(--line-w) solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  text-decoration: none;
  border: var(--line-w) solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
  transition: transform .08s, box-shadow .08s;
  cursor: pointer;
}
.btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--line); }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-outline { background: var(--paper); color: var(--ink); }
.btn-small { padding: 8px 14px; font-size: .8rem; }
.btn-lg { font-size: 1.1rem; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-alt); border-top: var(--line-w) solid var(--line); border-bottom: var(--line-w) solid var(--line); }

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.section-title::after {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--red) 0 24px, var(--line) 24px 28px, var(--blue) 28px 52px, var(--line) 52px 56px, var(--green) 56px 80px, var(--line) 80px 84px);
  margin: 8px auto 0;
}

.sub-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  margin: 40px 0 16px;
  color: var(--red);
}

/* ---------- Panels / cases ---------- */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.case {
  background: var(--panel);
  border: var(--line-w) solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}
.case h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--blue);
  border-bottom: var(--line-w) solid var(--line);
  padding-bottom: 6px;
}

/* ---------- Œuvres ---------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.card { background: var(--panel); border: var(--line-w) solid var(--line); box-shadow: var(--shadow); }

.book-cover-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: var(--line-w) solid var(--line);
  display: block;
}

.book-body { padding: 18px; }
.book-title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: 4px; }
.book-role { font-family: var(--font-display); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--red); margin-bottom: 10px; }
.book-body p:not(.book-role) { margin-bottom: 14px; font-size: .95rem; }

.collab-list {
  list-style: none;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.collab-list li {
  background: var(--panel);
  border: var(--line-w) solid var(--line);
  padding: 10px 14px;
  box-shadow: 3px 3px 0 rgba(26,26,46,.25);
}

/* ---------- Galerie ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.gallery-item {
  background: var(--panel);
  border: var(--line-w) solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
}
.gallery-item img { border: var(--line-w) solid var(--line); }
.gallery-item figcaption {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
  padding: 8px 4px 2px;
}

/* ---------- Liens ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.link-card {
  background: var(--panel);
  border: var(--line-w) solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform .08s, box-shadow .08s;
}
.link-card:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--line); }
.link-icon { font-size: 2rem; }
.link-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; color: var(--blue); }
.link-desc { font-size: .9rem; }

/* ---------- Contact ---------- */
.contact-intro {
  text-align: center;
  max-width: 48ch;
  margin: 0 auto 24px;
}
#contact .btn-lg { display: block; margin: 0 auto; width: fit-content; }

/* ---------- Footer ---------- */
.footer {
  background: var(--line);
  color: var(--paper);
  padding: 22px 0;
  border-top: var(--line-w) solid var(--red);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .9rem;
}
.footer-tag { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--yellow); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--red);
    border-top: var(--line-w) solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 20px; border-bottom: var(--line-w) solid rgba(251,247,239,.3); }
  .nav-toggle { display: block; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
