/* ============================================
   PressePapier — feuille de style
   Identité : cartoon goofy moderne, ombres solides
   décalées, bordures épaisses, pastel sur crème.
   ============================================ */

/* === 1. Tokens (variables) === */
:root {
  /* Palette */
  --violet: #7B8CFF;
  --bleu:   #74B9FF;
  --jaune:  #FFD166;
  --vert:   #55EFC4;
  --bg:     #F7F8FC;
  --text:   #1E1E2E;
  --surface: #FFFFFF;

  /* Typographie */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  /* Rayons */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Bordures */
  --b: 2.5px solid var(--text);
  --b-light: 1.5px solid var(--text);

  /* Ombres signature (solides, décalées) */
  --shadow-xs: 2px 2px 0 var(--text);
  --shadow-sm: 4px 4px 0 var(--text);
  --shadow-md: 6px 6px 0 var(--text);
  --shadow-lg: 10px 10px 0 var(--text);

  /* Espacements */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 56px;
  --space-7: 80px;

  /* Layout */
  --container: 1200px;
}

/* === 2. Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}
p { margin: 0 0 var(--space-3); }

/* === 3. Layout & utils === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.section { padding: var(--space-7) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: var(--space-5);
}

/* === 4. Composants réutilisables === */

/* Bouton cartoon */
.btn-cartoon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn-cartoon:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.btn-cartoon:active { transform: translate(2px, 2px); box-shadow: var(--shadow-xs); }
.btn-cartoon.primary  { background: var(--violet); color: var(--surface); }
.btn-cartoon.accent   { background: var(--jaune); }
.btn-cartoon.success  { background: var(--vert); }

/* Capsule (info bar pills) */
.capsule {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 18px;
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 0.95rem;
}
.capsule .emoji { font-size: 1.15rem; }

/* Card cartoon générique */
.card-cartoon {
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-cartoon:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lg);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: var(--b-light);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface);
  white-space: nowrap;
}
.badge.b-violet { background: var(--violet); color: var(--surface); }
.badge.b-bleu   { background: var(--bleu); color: var(--surface); }
.badge.b-jaune  { background: var(--jaune); }
.badge.b-vert   { background: var(--vert); }

/* === 5. Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--b-light);
  padding: var(--space-3) 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--jaune);
  border: var(--b);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-xs);
  font-size: 1.1rem;
}
.site-header nav {
  display: flex;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 0.95rem;
}

/* === 6. Hero === */
.hero {
  position: relative;
  padding: var(--space-7) 0 var(--space-6);
  background:
    radial-gradient(ellipse at 80% 0%, rgba(255,209,102,0.4), transparent 60%),
    radial-gradient(ellipse at 0% 60%, rgba(123,140,255,0.35), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(85,239,196,0.35), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: var(--b-light);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-xs);
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  margin: 0 0 var(--space-3);
}
.hero-title .hl {
  background: var(--jaune);
  padding: 0 8px;
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-xs);
  display: inline-block;
}
.hero-tagline {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  max-width: 46ch;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: var(--space-4);
}
.cta-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.hero-mascot {
  position: relative;
  display: grid;
  place-items: center;
}
.hero-mascot svg {
  width: min(360px, 100%);
  height: auto;
  filter: drop-shadow(8px 10px 0 var(--text));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

/* === 7. Info bar === */
.info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  padding: var(--space-4) 0;
  border-top: var(--b-light);
  border-bottom: var(--b-light);
  background: var(--surface);
}

/* === 8. Articles grid === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}
.article-card { display: flex; flex-direction: column; }
.article-card-image {
  aspect-ratio: 16 / 9;
  border-bottom: var(--b);
  background-size: cover;
  background-position: center;
  position: relative;
}
.article-card-image .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4rem;
  color: var(--text);
  opacity: 0.85;
}
.article-card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.article-card-source { font-size: 0.75rem; font-weight: 700; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
.article-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-title a { color: var(--text); }
.article-card-title a:hover { text-decoration-color: var(--violet); }
.article-card-summary {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-importance {
  background: var(--jaune);
  border: var(--b-light);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-importance strong { font-weight: 800; }
.article-card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: var(--b-light);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem;
}
.article-card-footer a { font-weight: 700; }

/* === 8b. Featured grid (Top 4 dernières actus) === */
/* Layout : 1 grande card à gauche + colonne de 3 cards horizontales à droite */
.featured-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-3);
  align-items: stretch;
}
.featured-main { display: flex; }
.featured-main > .article-card { flex: 1; }
.featured-main .article-card-image { aspect-ratio: 2 / 1; }
.featured-main .article-card-title { font-size: clamp(1.3rem, 2vw, 1.65rem); -webkit-line-clamp: 2; }
.featured-main .article-card-summary { font-size: 0.95rem; -webkit-line-clamp: 2; }
.featured-main .article-card-body { padding: var(--space-3) var(--space-4); gap: 10px; }

.featured-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.featured-small {
  display: grid;
  grid-template-columns: 130px 1fr;
  flex: 1;
}
.featured-small .featured-small-image {
  display: block;
  border-right: var(--b);
  background: var(--bg);
  position: relative;
}
.featured-small .article-card-image {
  aspect-ratio: auto;
  height: 100%;
  border-bottom: none;
}
.featured-small-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}
.featured-small .article-card-source {
  display: block;
  margin-bottom: 2px;
}
.featured-small .article-card-title {
  font-size: 0.98rem;
  line-height: 1.25;
  margin: 0 0 4px;
  -webkit-line-clamp: 2;
}
.featured-small .article-card-summary {
  font-size: 0.85rem;
  -webkit-line-clamp: 2;
  margin: 0;
}

@media (max-width: 880px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-main .article-card-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .featured-small { grid-template-columns: 100px 1fr; }
  .featured-small .article-card-title { font-size: 0.95rem; }
  .featured-small .article-card-summary { display: none; }
}

/* === 9. Scan rapide (scroll horizontal) === */
.scan-section { background: var(--bleu); padding: var(--space-6) 0; border-block: var(--b); }
.scan-section .section-title { color: var(--surface); }
.scan-scroll {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  -webkit-overflow-scrolling: touch;
}
.scan-scroll::-webkit-scrollbar { height: 8px; }
.scan-scroll::-webkit-scrollbar-thumb { background: var(--text); border-radius: var(--r-pill); }
.scan-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3);
  display: flex; flex-direction: column; gap: 10px;
}
.scan-card-source { font-size: 0.75rem; font-weight: 700; opacity: 0.6; text-transform: uppercase; }
.scan-card-title { font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 0; }
.scan-card-title a { color: var(--text); }

/* === 10. Newsletter === */
.newsletter {
  background: var(--jaune);
  border-block: var(--b);
  padding: var(--space-7) 0;
}
.newsletter-card {
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: var(--space-2);
}
.newsletter-card p { font-size: 1.05rem; opacity: 0.8; margin-bottom: var(--space-4); }
.newsletter-form {
  display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  font: inherit;
  border: var(--b);
  border-radius: var(--r-pill);
  background: var(--bg);
  outline: none;
  transition: box-shadow .15s ease;
}
.newsletter-form input[type="email"]:focus { box-shadow: var(--shadow-sm); }
.newsletter-success {
  margin-top: var(--space-3);
  padding: 10px 16px;
  background: var(--vert);
  border: var(--b-light);
  border-radius: var(--r-pill);
  font-weight: 600;
  display: none;
}
.newsletter-success.show { display: inline-block; }

/* === 11. Tendances (cloud de tags) === */
.tags-cloud {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3);
  justify-content: center;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: var(--b);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tag-chip:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.tag-chip.c1 { background: var(--violet); color: var(--surface); }
.tag-chip.c2 { background: var(--bleu);   color: var(--surface); }
.tag-chip.c3 { background: var(--jaune); }
.tag-chip.c4 { background: var(--vert); }
.tag-count { font-size: 0.75rem; opacity: 0.65; font-weight: 600; }

/* === 12. Footer === */
.site-footer {
  background: var(--text);
  color: var(--bg);
  padding: var(--space-6) 0 var(--space-4);
  border-top: var(--b);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}
.site-footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-bottom: var(--space-2);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 6px; }
.site-footer a { color: var(--bg); opacity: 0.85; }
.site-footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1.5px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* === 13. Page article === */
.article-hero {
  padding: var(--space-6) 0 var(--space-4);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(123,140,255,0.3), transparent 55%),
    var(--bg);
}
.article-hero .container { max-width: 820px; }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-3);
  font-weight: 700;
  font-size: 0.9rem;
}
.article-meta-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.article-title-big {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 var(--space-3);
}
.article-cover {
  margin-top: var(--space-4);
  border: var(--b);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}
.article-body { max-width: 820px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-7); }
.article-block {
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}
.article-block h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: var(--space-2);
}
.article-block.importance {
  background: var(--jaune);
}
.article-block.importance h2 { opacity: 0.7; }
.article-block.importance p { font-size: 1.15rem; font-weight: 500; margin: 0; }
.article-key-points { padding-left: 24px; margin: 0; }
.article-key-points li { margin-bottom: 8px; }
.article-source-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--space-3);
  font-weight: 700;
}

/* === 14. Empty state === */
.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  background: var(--surface);
  border: var(--b);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

/* === 15. Responsive === */
@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-tagline { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .hero-mascot { order: -1; }
  .hero-mascot svg { width: min(220px, 60%); }
  .site-footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .section { padding: var(--space-6) 0; }
  .articles-grid { grid-template-columns: 1fr; }
  .scan-card { flex-basis: 240px; }
  .newsletter-card { padding: var(--space-4); }
  .site-header nav { display: none; }
  .article-hero { padding-top: var(--space-4); }
}
