/*
 * Presse-Repasser.fr — Custom CSS
 * Palette 5 : Cyan #0891b2 / Teal #0e7490 / Rose #ec4899
 * Font 4 : Poppins (headings) / Source Sans 3 (body)
 * Complément à TailwindCSS CDN (chargé dans head.html)
 */

/* ====================================================
   BASE
   ==================================================== */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Focus accessible — outline visible sur tous les éléments interactifs */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Transitions globales */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Skip-to-content accessible */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #0e7490;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid white;
}


/* ====================================================
   TYPOGRAPHIE — ARTICLE PROSE
   ==================================================== */

.article-prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155; /* slate-700 */
}

.article-prose h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a; /* slate-900 */
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9; /* slate-100 */
}

.article-prose h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b; /* slate-800 */
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-prose h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #0e7490; /* secondary */
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-prose p {
  margin-bottom: 1.5rem;
  color: #475569; /* slate-600 */
}

.article-prose ul,
.article-prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-prose ul {
  list-style-type: none;
  padding-left: 0;
}

.article-prose ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: #475569;
}

.article-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background-color: #0891b2; /* primary */
  border-radius: 50%;
}

.article-prose ol {
  list-style-type: decimal;
  color: #475569;
}

.article-prose ol li {
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.article-prose strong {
  font-weight: 600;
  color: #1e293b; /* slate-800 */
}

.article-prose em {
  font-style: italic;
  color: #64748b; /* slate-500 */
}

.article-prose a {
  color: #0891b2; /* primary */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.article-prose a:hover {
  color: #0e7490; /* secondary */
  text-decoration-thickness: 2px;
}

/* Blockquote / conseil -->
.article-prose blockquote {
  border-left: 3px solid #0891b2;
  background: #f0f9ff; /* sky-50 */
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: normal;
}

.article-prose blockquote p {
  margin: 0;
  color: #0e4a5c;
  font-size: 0.9375rem;
}

.article-prose blockquote strong {
  color: #0e7490;
}

/* Images dans les articles */
.article-prose img {
  border-radius: 0.75rem;
  margin: 1.75rem 0;
  max-width: 100%;
  height: auto;
}

/* Tables */
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  overflow-x: auto;
  display: block;
}

.article-prose thead {
  border-bottom: 2px solid #e2e8f0; /* slate-200 */
}

.article-prose th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #0f172a;
  background: #f8fafc;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  font-size: 0.9375rem;
}

.article-prose tbody tr:hover {
  background: #f8fafc;
}

@media (max-width: 640px) {
  .article-prose th,
  .article-prose td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Code inline */
.article-prose code {
  background: #f1f5f9;
  color: #0e7490;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}


/* ====================================================
   CARTES — EFFETS HOVER
   ==================================================== */

/* Assure que les images dans les cards sont fluides */
.group .aspect-video img {
  transition: transform 0.4s ease;
}

.group:hover .aspect-video img {
  transform: scale(1.03);
}


/* ====================================================
   HEADER
   ==================================================== */

.site-header {
  border-bottom: 1px solid rgba(241, 245, 249, 0.8); /* slate-100 */
}

/* Classe utilitaire bg-primary/8 simulée (Tailwind JIT peut ne pas la générer via CDN) */
.bg-primary-soft {
  background-color: rgba(8, 145, 178, 0.08);
}


/* ====================================================
   PAGINATION (template interne Hugo)
   ==================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #f1f5f9;
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination .active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.625rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination a {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pagination a:hover {
  background: #f1f5f9;
  color: #0e7490;
  border-color: #0891b2;
}

.pagination .active {
  color: white;
  background: #0e7490;
  border: 1px solid #0e7490;
  font-weight: 600;
}

.pagination .disabled {
  opacity: 0.35;
  pointer-events: none;
}


/* ====================================================
   UTILITAIRES LINE-CLAMP
   ==================================================== */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* ====================================================
   PRINT
   ==================================================== */

@media print {
  header,
  footer,
  nav,
  .pagination { display: none !important; }

  .article-prose {
    max-width: 100%;
    font-size: 11pt;
    line-height: 1.6;
  }
}
