/* =====================================================
   ISP Martino - Global CSS v5.1
   Blog passion pêche - Couleurs plates uniquement
   ===================================================== */

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f4f7f4;
  color: #1a2e1a;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Media Anti-Overflow --- */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  max-width: 100%;
}

/* --- Skip to content accessibility --- */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 20px;
  background-color: #ffc107;
  color: #1a2e1a;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.3;
  color: #1a2e1a;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

p {
  overflow-wrap: break-word;
  word-break: break-word;
}

a {
  color: #4a6741;
  transition: color 0.2s;
}

a:hover {
  color: #1a2e1a;
}

a:focus-visible {
  outline: 2px solid #ffc107;
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- Containers --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background-color: #ffc107;
  color: #1a2e1a;
  border-color: #ffc107;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #e6ac00;
  border-color: #e6ac00;
  color: #1a2e1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: #4a6741;
  border-color: #4a6741;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #4a6741;
  color: #fff;
  transform: translateY(-2px);
}

.btn-dark {
  background-color: #1a2e1a;
  color: #fff;
  border-color: #1a2e1a;
}

.btn-dark:hover,
.btn-dark:focus {
  background-color: #2d4a2d;
  border-color: #2d4a2d;
  color: #fff;
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  color: #1a2e1a;
  margin-bottom: 8px;
}

.section-subtitle {
  color: #5a7a5a;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.section-header {
  margin-bottom: 48px;
}

/* --- Cards --- */
.card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e0ead0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 46, 26, 0.10);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 20px;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-green {
  background-color: #e8f0e8;
  color: #2d4a2d;
}

.badge-yellow {
  background-color: #fff3cd;
  color: #856404;
}

/* --- Tables --- */
table {
  max-width: 100%;
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

.table-responsive,
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #e0ead0;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e0ead0;
  overflow-wrap: break-word;
}

th {
  background-color: #1a2e1a;
  color: #fff;
  font-weight: 600;
}

tr:hover td {
  background-color: #f4f7f4;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #1a2e1a;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d0e0d0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: #1a2e1a;
  background-color: #fff;
  transition: border-color 0.2s;
  max-width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #4a6741;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}

/* --- Tag chips --- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background-color: #e8f0e8;
  color: #2d4a2d;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.tag:hover {
  background-color: #4a6741;
  color: #fff;
}

/* --- Article meta --- */
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #7a9a7a;
}

.article-meta time {
  color: #7a9a7a;
}

.read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7a9a7a;
  font-size: 0.82rem;
}

/* --- Progress bars CSS --- */
.progress-bar-wrap {
  background-color: #e0ead0;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  width: 100%;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 20px;
  background-color: #4a6741;
  transition: width 0.6s ease;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.mt-8  { margin-top: 8px; }
.mb-8  { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Responsive Global --- */
@media (max-width: 768px) {
  body { overflow-x: hidden; }

  .container { padding: 0 16px; }
  .container-narrow { padding: 0 16px; }

  .section { padding: 48px 0; }
  .section-title { font-size: 1.6rem; }
  .section-subtitle { font-size: 0.96rem; }
  .section-header { margin-bottom: 32px; }

  .grid, [class*='grid'] {
    grid-template-columns: 1fr !important;
  }

  table { font-size: 0.82rem; }
  th, td { padding: 10px 12px; }

  .btn { padding: 10px 18px; font-size: 0.9rem; }

  .article-meta { gap: 10px; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .section { padding: 36px 0; }
  .section-title { font-size: 1.4rem; }
  .btn { width: 100%; justify-content: center; }
}