/* ============================================================
   WEBMODERNE — Feuille de style centrale
   Refonte "Agentic Professional" — Avril 2026
   Mobile-First Architecture
   ============================================================ */

/* === VARIABLES === */
:root {
  --bg-color: #05051a;
  --bg-surface: rgba(10, 10, 45, 0.7);
  --accent-color: #db1a1a;
  --accent-glow: rgba(219, 26, 26, 0.3);
  --text-color: #ffffff;
  --text-dim: #c0c0d8;
  --text-muted: #6a6a8a;
  --code-bg: rgba(13, 13, 58, 0.8);
  --border-color: #1a1a4a;
  --border-light: #2a2a7a;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  --shadow-glow: 0 0 30px var(--accent-glow);
  --shadow-ui: 0 8px 32px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 960px;
}

/* === RESET & BASE === */
* { box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 50% 0%, #0a0a5a 0%, transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, 30px 30px;
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

a:hover {
  filter: brightness(1.2);
}

/* === LAYOUT === */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px; /* Reduced for mobile */
}

/* === HEADER === */
.header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(5, 5, 26, 0.9);
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.brand-name {
  color: var(--text-color);
  font-family: var(--font-mono);
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav {
  display: none; /* Mobile first: hidden */
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #090935;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.nav.active {
  display: flex;
}

.nav a {
  color: var(--text-dim);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.9em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
}

.nav a:last-child { border: none; }

.nav-toggle {
  display: block;
  background: none;
  border: 1px solid var(--accent-color);
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

/* === PAGE INTRO === */
.page-intro {
  padding: 40px 0 30px;
  margin-bottom: 30px;
}

.page-intro h1 {
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 1.8em;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

.page-intro p {
  color: var(--text-dim);
  font-size: 1.1em;
  margin: 0;
}

/* === ARTICLE CARDS (Refined Padding) === */
.value-prop, .feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 30px 0;
}

.card {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  padding: 30px; /* Increased padding */
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  box-shadow: var(--shadow-ui);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card-icon {
  font-size: 2.5em;
}

.card h4 {
  color: var(--accent-color);
  font-family: var(--font-mono);
  margin: 0;
  font-size: 1.25em;
}

.card:hover {
  border-color: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.card p {
  color: var(--text-dim);
  font-size: 0.95em;
  margin: 0;
  line-height: 1.6;
}

/* === POST LISTS === */
.post-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.post-item {
  background: var(--bg-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-ui);
}

.post-item:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* Disable hover on "Voir tous" link item */
.post-item.no-hover:hover {
  border: none;
  background: none;
  backdrop-filter: none;
  transform: none;
  box-shadow: none;
}

.post-banner-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.post-item:hover .post-banner-thumb {
  border-bottom-color: var(--accent-color);
}

.post-item-content {
  padding: 20px;
}

.post-item h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 1.2em;
}

.post-item h4 a { color: #fff; }

.post-item h4 a:hover { color: var(--accent-color); }

.post-item .date {
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.post-item .summary {
  color: var(--text-dim);
  font-size: 0.95em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0;
}

.pagination a, .pagination span {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-dim);
  border-radius: 4px;
}

.pagination a.active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* === MOBILE REDUCTIONS === */
@media (max-width: 767px) {
  .page-intro h1 { font-size: 1.5em; }
  .page-intro p { font-size: 1em; }
  .post-item h4 { font-size: 1.05em; }
  .card h4 { font-size: 1.1em; }
  .card-icon { font-size: 2em; }

  /* Article content */
  .post-content h1 { font-size: 1.5em; }
  .post-content h2 { font-size: 1.4em; margin: 30px 0 15px; }
  .post-content h3 { font-size: 1.2em; }

  /* Featured article */
  .featured-article h2 { font-size: 1.3em; }

  .flash-alert { font-size: 0.75em; padding: 6px 14px; }
}

/* === DESKTOP ENHANCEMENTS === */
@media (min-width: 768px) {
  .container { padding: 0 30px; }
  
  .logo { height: 42px; }
  .brand-name { font-size: 1.3em; }
  
  .nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    border: none;
    gap: 8px;
  }
  
  .nav a {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.8em;
    border-bottom: none;
  }
  
  .nav a:hover, .nav a.active {
    background: rgba(219, 26, 26, 0.1);
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
  }
  
  .nav-toggle { display: none; }
  
  .page-intro { padding: 60px 0 40px; }
  .page-intro h1 { font-size: 2.8em; }
  
  .value-prop { grid-template-columns: repeat(3, 1fr); }
  
  .post-list { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
}

/* === ARTICLE CONTENT === */
.article-banner {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 30px 0;
}

.post-content h2 {
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 1.8em;
  margin: 40px 0 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.footer {
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.flash-alert {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(219, 26, 26, 0.08);
  border: 1px solid rgba(219, 26, 26, 0.3);
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.flash-tag {
  background: var(--accent-color);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
}
