/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #ffffff;
  --bg-2:      #f7f7f5;
  --bg-3:      #f0f0ed;
  --text:      #1a1a1a;
  --text-2:    #555550;
  --text-3:    #888880;
  --accent:    #2563eb;
  --accent-bg: #eff6ff;
  --border:    #e5e5e0;
  --border-2:  #d0d0c8;
  --radius:    6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #141414;
    --bg-2:      #1e1e1e;
    --bg-3:      #282828;
    --text:      #f0f0ed;
    --text-2:    #a8a8a0;
    --text-3:    #666660;
    --accent:    #60a5fa;
    --accent-bg: #1e3a5f;
    --border:    #2a2a2a;
    --border-2:  #3a3a3a;
  }
}

html { font-size: 16px; }
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ── Layout ── */
.site { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ── */
header {
  border-bottom: 1.5px solid var(--text);
  padding: 1.25rem 0 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.logo-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  font-family: Georgia, serif;
  line-height: 1.2;
}
.logo-name span { color: var(--accent); }
.logo-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 3px;
  font-family: sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  font-family: sans-serif;
  color: var(--text-2);
  align-items: center;
  flex-wrap: wrap;
}
nav a:hover { color: var(--accent); }

.btn-subscribe {
  font-size: 0.78rem;
  font-family: sans-serif;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn-subscribe:hover { background: var(--bg-3); }

/* ── Ticker ── */
.ticker {
  background: var(--accent-bg);
  border-radius: var(--radius);
  padding: 7px 14px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-family: sans-serif;
  overflow: hidden;
}
.ticker-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.ticker-text {
  color: var(--accent);
  white-space: nowrap;
  animation: scroll-left 40s linear infinite;
}
@keyframes scroll-left {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Tags & Meta ── */
.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-family: sans-serif;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  color: var(--text-2);
}

.tag {
  font-size: 0.68rem;
  font-family: sans-serif;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta {
  font-size: 0.72rem;
  font-family: sans-serif;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.hero-main .tag { margin-bottom: 8px; display: block; }
.hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}
.hero-excerpt {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 12px;
}

.hero-side { display: flex; flex-direction: column; gap: 0; }
.side-article {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.side-article:last-child { border-bottom: none; }
.side-article .tag { display: block; margin-bottom: 4px; }
.side-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

/* ── Section head ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section-head .label {
  font-size: 0.7rem;
  font-family: sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.section-head .see-all {
  font-size: 0.72rem;
  font-family: sans-serif;
  color: var(--accent);
}

/* ── Articles grid ── */
.articles-section { padding: 1.5rem 0; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-card { border-top: 2px solid var(--border-2); padding-top: 10px; }
.article-card .tag { display: block; margin-bottom: 5px; }
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}
.card-excerpt {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 8px;
}

/* ── Videos ── */
.videos-section {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--border);
}
.videos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.video-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-overlay {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37,99,235,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-overlay svg { width: 16px; height: 16px; fill: white; margin-left: 2px; }
.video-info { padding: 8px 10px 10px; }
.video-title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  font-family: sans-serif;
}
.video-meta {
  font-size: 0.68rem;
  color: var(--text-3);
  font-family: sans-serif;
}

/* ── Newsletter bar ── */
.nl-bar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.nl-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 3px;
  font-family: sans-serif;
}
.nl-sub {
  font-size: 0.78rem;
  color: var(--text-2);
  font-family: sans-serif;
}
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nl-form input {
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 7px 12px;
  font-size: 0.8rem;
  width: 210px;
  background: var(--bg);
  color: var(--text);
  font-family: sans-serif;
}
.nl-form button {
  padding: 7px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: sans-serif;
}
.nl-form button:hover { opacity: 0.88; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
footer span, footer a {
  font-size: 0.72rem;
  font-family: sans-serif;
  color: var(--text-3);
}
.footer-links { display: flex; gap: 1rem; }

/* ── Loading & empty ── */
.loading {
  text-align: center;
  padding: 3rem;
  font-family: sans-serif;
  color: var(--text-3);
  font-size: 0.9rem;
}

/* ── Modal abonnement ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: 10px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  border: 1px solid var(--border);
}
.modal h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.modal p  { font-size: 0.82rem; color: var(--text-2); margin-bottom: 1rem; font-family: sans-serif; }
.modal input {
  width: 100%;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  font-family: sans-serif;
  margin-bottom: 10px;
}
.modal-btns { display: flex; gap: 8px; }
.modal-btns button {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: sans-serif;
}
.btn-confirm { background: var(--accent); color: white; border: none; }
.btn-cancel  { background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2); }
.modal-msg { font-size: 0.8rem; font-family: sans-serif; color: var(--accent); margin-top: 8px; display: none; }


/* ─────────────────────────────────────────
   RESPONSIVE DESIGN (Adaptation tous écrans)
   ───────────────────────────────────────── */

/* Tablettes (entre 700px et 900px) */
@media (max-width: 900px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { gap: 1.5rem; }
}

/* Mobiles standards (moins de 700px) */
@media (max-width: 700px) {
  header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  nav { gap: 1rem; margin-top: 0.5rem; }
  
  .hero { grid-template-columns: 1fr; }
  .hero-side { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
  
  .articles-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Petits mobiles (moins de 480px) */
@media (max-width: 480px) {
  .videos-grid { grid-template-columns: 1fr; }
  
  /* Adaptation de la barre newsletter pour petit écran */
  .nl-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .nl-form { flex-direction: column; width: 100%; }
  .nl-form input { width: 100%; }
  .nl-form button { width: 100%; }

  /* Centrage du footer sur petits écrans */
  footer { flex-direction: column; text-align: center; gap: 1rem; }
  .footer-links { justify-content: center; width: 100%; }
}
