/* MightyDad — thème comic. Tokens tirés de docs/design.md. */

:root {
  --bg:        #0c0c0c;
  --panel:     #141414;
  --panel-2:   #161616;
  --border:    #262626;
  --border-2:  #3a3a3a;
  --gold:      #f6b81c;
  --gold-hi:   #ffd35a;
  --gold-sh:   #b5820c;
  --red:       #d81f26;
  --red-deep:  #8f1416;
  --cream:     #f4ede0;
  --ink:       #3a0a0b;
  --text-2:    #c9c0b2;
  --text-3:    #9c9284;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }

/* --- Logo « MD » lettré comic ------------------------------------------ */
.logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 38px;
  color: var(--gold);
  -webkit-text-stroke: 2px var(--red-deep);
  text-shadow: 2px 2px 0 var(--red-deep);
  transform: skew(-6deg);
  display: inline-block;
  letter-spacing: -1px;
}
/* Logo-image : on annule le lettrage texte (skew, contour) hérité de .logo. */
.logo:has(img) { transform: none; -webkit-text-stroke: 0; text-shadow: none; }
.logo img { display: block; height: 46px; width: auto; }

/* --- En-tête ------------------------------------------------------------ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  color: var(--cream);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); }

/* --- Zone BD ------------------------------------------------------------ */
.bd-main { flex: 1; padding: 30px 40px; max-width: 900px; margin: 0 auto; width: 100%; }

.bd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.bd-date, .bd-history {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  color: var(--cream);
}
.bd-history:hover { border-color: var(--gold); color: var(--gold); }
.bd-title-block { text-align: center; flex: 1; min-width: 220px; }
.bd-day {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  font-size: 15px;
}
.bd-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(22px, 4vw, 32px);
  margin: 4px 0 0;
}
.bd-caption {
  text-align: center;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 auto 22px;
  max-width: 620px;
}

/* Cadre de planche : crème, bordure noire épaisse (design.md) */
.bd-frame {
  margin: 0;
  background: var(--cream);
  border: 6px solid #111;
  border-radius: 8px;
  padding: 14px;
}
.bd-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #111;
  border-radius: 4px;
}

/* --- Boutons ------------------------------------------------------------ */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 10px;
  box-shadow: 0 5px 0 var(--gold-sh);
  font-size: 15px;
}
.btn-primary:hover { background: var(--gold-hi); color: var(--ink); }

.btn-secondary {
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  color: var(--cream);
  font-weight: 800;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 14px;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-secondary.is-disabled { opacity: .35; pointer-events: none; }

.bd-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; }

/* --- Partage ------------------------------------------------------------ */
.bd-share {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-top: 26px;
  text-align: center;
}
.bd-share-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 14px;
}
.bd-share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bd-share-btns a {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #e8e0d2;
}
.bd-share-btns a:hover { border-color: var(--gold); color: var(--gold); }

/* --- Page vide ---------------------------------------------------------- */
.bd-empty { text-align: center; padding: 60px 20px; }
.bd-empty h1 { font-family: 'Fredoka', sans-serif; text-transform: uppercase; }
.bd-empty p { color: var(--text-2); margin: 14px 0 26px; }

/* --- Accueil : hero ----------------------------------------------------- */
.hero {
  position: relative;
  background: radial-gradient(circle at 70% 40%, #e0262c 0%, #a01519 55%, #5c0d10 100%);
  overflow: hidden;
  padding: 40px 40px 0;   /* pas de padding bas : le buste touche la bordure */
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 72% 45%,
              rgba(255,255,255,.05) 0deg 6deg, transparent 6deg 12deg);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: stretch; gap: 30px; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
}
.hero-text {
  flex: 0 1 380px; min-width: 280px; max-width: 460px;
  display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 40px;   /* compense le padding-bas retiré du hero */
}
.hero-title {
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-style: italic;
  line-height: .82; margin: 0; letter-spacing: -2px;
}
.hero-title .l1 {
  display: block; color: var(--cream);
  font-size: clamp(48px, 10vw, 88px);
  -webkit-text-stroke: 2px #2a0708; text-shadow: 4px 4px 0 #2a0708;
}
.hero-title .l2 {
  display: block; color: var(--gold);
  font-size: clamp(64px, 13vw, 120px);
  -webkit-text-stroke: 3px #2a0708; text-shadow: 5px 5px 0 #2a0708;
}
.hero-title { margin: 0 0 4px; }
.hero-title img { display: block; width: min(460px, 100%); height: auto; }
.hero-tag {
  font-weight: 800; font-size: clamp(16px, 2.4vw, 22px);
  text-transform: uppercase; letter-spacing: .5px;
  margin: 24px 0 30px; max-width: 440px; line-height: 1.35;
}
.hero-emblem {
  flex: 1 1 560px; display: flex; align-items: flex-end; justify-content: center;
  align-self: stretch;
}
/* ↓↓↓ LE LEVIER pour grossir le personnage : max-width (jusqu'à ~780 px net) ↓↓↓ */
.hero-emblem img {
  width: 100%; max-width: 700px; height: auto; display: block;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.5));
}

/* --- Accueil : sections ------------------------------------------------- */
.about, .latest, .community { padding: 52px 40px; border-bottom: 1px solid #222; }
.about { background: #111; }
.about-text { max-width: 620px; margin: 0 auto; }
.about h2, .latest h2, .community h2 {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  text-transform: uppercase; color: var(--gold); margin: 0 0 18px;
}
.about p { color: var(--text-2); line-height: 1.7; }

.latest { background: var(--bg); text-align: center; }
.latest h2 { color: var(--cream); }
.latest-card {
  display: flex; gap: 30px; align-items: center; text-align: left;
  max-width: 900px; margin: 0 auto; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px; flex-wrap: wrap;
}
.latest-img { flex: 1; min-width: 280px; }
.latest-img img {
  width: 100%; height: auto; border-radius: 10px;
  border: 4px solid #111; background: var(--cream); display: block;
}
.latest-body { flex: 1; min-width: 260px; }
.latest-day { color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: 1px; }
.latest-body h3 {
  font-family: 'Fredoka', sans-serif; text-transform: uppercase;
  font-size: 24px; margin: 8px 0 12px;
}
.latest-body p { color: var(--text-2); line-height: 1.6; margin: 0 0 20px; }
.latest-empty { color: var(--text-2); }

.community { background: linear-gradient(135deg, #e0262c, #8f1416); border-bottom: 0; }
.community h2 { color: var(--cream); text-shadow: 3px 3px 0 #4d0a0c; margin-bottom: 4px; }
.community-sub { color: #ffe9c9; font-weight: 600; margin: 0 0 26px; }
.community-cards { display: flex; gap: 20px; flex-wrap: wrap; max-width: 760px; }
.community-card {
  flex: 1; min-width: 280px; display: flex; gap: 14px; align-items: center;
  background: rgba(0,0,0,.35); padding: 16px 20px; border-radius: 12px; color: var(--cream);
}
.community-card:hover { background: rgba(0,0,0,.5); color: var(--cream); }
.cc-icon {
  width: 46px; height: 46px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
}
.cc-yt { background: #ff0000; }
.cc-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }

/* --- Archive ------------------------------------------------------------ */
.archive-main { max-width: 1100px; margin: 0 auto; padding: 34px 40px; }
.archive-title {
  font-family: 'Fredoka', sans-serif; text-transform: uppercase; text-align: center; margin: 0 0 28px;
}
.archive-empty { text-align: center; color: var(--text-2); }
.archive-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.archive-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; color: var(--cream); display: flex; flex-direction: column;
}
.archive-card:hover { border-color: var(--gold); color: var(--cream); transform: translateY(-2px); }
.archive-thumb { background: var(--cream); aspect-ratio: 3 / 2; }
.archive-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archive-meta { padding: 12px 14px; }
.archive-day { display: block; color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: 1px; }
.archive-name { display: block; font-weight: 600; font-size: 14px; margin-top: 2px; }

/* --- Pages de contenu --------------------------------------------------- */
.page { max-width: 720px; margin: 0 auto; padding: 34px 40px; }
.page-content h1 {
  font-family: 'Fredoka', sans-serif; text-transform: uppercase; color: var(--gold); margin: 0 0 20px;
}
.page-content h2 { font-family: 'Fredoka', sans-serif; font-size: 20px; margin: 26px 0 8px; }
.page-content p, .page-content li { color: var(--text-2); line-height: 1.7; }
.page-content ul { padding-left: 20px; }
.page-content a { text-decoration: underline; }

/* --- Pied de page ------------------------------------------------------- */
.site-footer {
  border-top: 3px solid var(--gold);
  padding: 36px 40px 28px;
  display: flex; gap: 40px; flex-wrap: wrap;
}
.foot-col { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 10px; }
.foot-brand { flex: 1.3; min-width: 200px; gap: 12px; }
.foot-brand .logo { font-size: 34px; }
.foot-brand p { color: var(--text-3); font-size: 13px; line-height: 1.6; margin: 0; }
.foot-col h4 {
  color: var(--cream); font-size: 14px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; margin: 0 0 4px;
}
.foot-col a { color: var(--text-3); font-size: 14px; }
.foot-col a:hover { color: var(--gold); }
.socials { display: flex; gap: 14px; }
.socials a { color: var(--gold); font-weight: 700; }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 640px) {
  .site-header, .bd-main, .hero, .about, .latest, .community,
  .archive-main, .page, .site-footer { padding-left: 18px; padding-right: 18px; }
  .site-nav { gap: 16px; }
  .bd-pager { flex-direction: column; }
  .bd-pager .btn-secondary { text-align: center; }
  .hero-text { padding-bottom: 0; }
  .hero-emblem { width: 100%; }
  .hero-emblem img { max-width: 400px; margin: 0 auto; }
  .hero-title img { width: min(320px, 100%); }
  .latest-card { flex-direction: column; }
}
