/* ===================================================
   GLOBAL CSS - Lissac Lille Blog Optique
   Santé visuelle & bien-être - 2026
   =================================================== */

/* === RESET & BOX MODEL === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1e1b4b;
  background-color: #f8f7ff;
  line-height: 1.65;
  overflow-x: hidden;
}

/* === MEDIA ANTI-OVERFLOW === */
img, video, iframe, embed, object, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  max-width: 100%;
}

/* === TABLEAUX RESPONSIVE === */
.table-responsive,
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(49,46,129,0.08);
}

.table-responsive table,
.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  background-color: #ffffff;
}

.table-responsive th,
.table-wrapper th {
  background-color: #312e81;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 14px 18px;
  text-align: left;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-responsive td,
.table-wrapper td {
  padding: 13px 18px;
  font-size: 0.9rem;
  color: #2d2b5e;
  border-bottom: 1px solid #ede9fe;
  vertical-align: middle;
}

.table-responsive tr:last-child td,
.table-wrapper tr:last-child td {
  border-bottom: none;
}

.table-responsive tr:nth-child(even) td,
.table-wrapper tr:nth-child(even) td {
  background-color: #f5f3ff;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: #312e81;
  transition: color 0.2s ease;
}

a:hover {
  color: #4f46e5;
}

strong, b {
  font-weight: 700;
}

/* === LAYOUT UTILITIES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

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

.section {
  padding: 72px 0;
}

.section--sm {
  padding: 48px 0;
}

.section--lg {
  padding: 96px 0;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  letter-spacing: 0.01em;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 3px;
}

.btn--primary {
  background-color: #312e81;
  color: #ffffff;
  border-color: #312e81;
}

.btn--primary:hover {
  background-color: #3730a3;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--accent {
  background-color: #34d399;
  color: #1a1a2e;
  border-color: #34d399;
}

.btn--accent:hover {
  background-color: #2ec48a;
  color: #1a1a2e;
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: #312e81;
  border-color: #312e81;
}

.btn--outline:hover {
  background-color: #312e81;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn--outline-light {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255,255,255,0.5);
}

.btn--outline-light:hover {
  background-color: rgba(255,255,255,0.1);
  color: #ffffff;
  border-color: #ffffff;
}

/* === BADGES / TAGS === */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--primary {
  background-color: #ede9fe;
  color: #312e81;
}

.badge--accent {
  background-color: #d1fae5;
  color: #065f46;
}

.badge--light {
  background-color: rgba(255,255,255,0.15);
  color: #ffffff;
}

/* === CARDS ARTICLE === */
.article-card {
  background-color: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(49,46,129,0.07);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.article-card:hover {
  box-shadow: 0 8px 28px rgba(49,46,129,0.14);
  transform: translateY(-3px);
}

.article-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.article-card__body {
  padding: 20px 22px 24px;
}

.article-card__category {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #312e81;
  background-color: #ede9fe;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.article-card__category:hover {
  background-color: #312e81;
  color: #ffffff;
}

.article-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1b4b;
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-card__title a {
  color: #1e1b4b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-card__title a:hover {
  color: #312e81;
}

.article-card__excerpt {
  font-size: 0.88rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 16px;
}

.article-card__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: #9ca3af;
}

.article-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-card__meta svg {
  flex-shrink: 0;
}

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

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e0f8;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: #1e1b4b;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #312e81;
  box-shadow: 0 0 0 3px rgba(49,46,129,0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #b0aac8;
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* === SKIP TO CONTENT === */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 24px;
  background-color: #312e81;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
  outline: 2px solid #34d399;
}

/* === SECTION TITLES === */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34d399;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e1b4b;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  max-width: 560px;
  line-height: 1.65;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: #312e81;
  background-color: #ffffff;
  border: 2px solid #e5e0f8;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination a:hover {
  background-color: #312e81;
  color: #ffffff;
  border-color: #312e81;
}

.pagination .current {
  background-color: #312e81;
  color: #ffffff;
  border-color: #312e81;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f0eeff;
}
::-webkit-scrollbar-thumb {
  background: #a5b4fc;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #312e81;
}

/* === SELECTION === */
::selection {
  background-color: #a5b4fc;
  color: #1e1b4b;
}

/* === FOCUS GLOBAL === */
:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

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

  .section {
    padding: 56px 0;
  }

  .section--sm {
    padding: 36px 0;
  }

  .section--lg {
    padding: 72px 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .article-card__title {
    font-size: 1rem;
  }

  .pagination {
    gap: 6px;
    padding: 32px 0;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

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

  .section {
    padding: 40px 0;
  }

  .section--sm {
    padding: 28px 0;
  }

  .section--lg {
    padding: 52px 0;
  }

  .section-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .section-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .section-label {
    font-size: 0.75rem;
  }

  .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .article-card {
    border-radius: 12px;
  }

  .article-card__body {
    padding: 16px 18px 20px;
  }

  .article-card__title {
    font-size: 0.98rem;
  }

  .article-card__excerpt {
    font-size: 0.85rem;
  }

  .article-card__meta {
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }

  .article-card__meta-item {
    gap: 4px;
  }

  .pagination {
    gap: 5px;
    padding: 28px 0;
    flex-wrap: wrap;
  }

  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    font-size: 0.95rem;
    padding: 10px 14px;
  }

  .form-textarea {
    min-height: 120px;
  }

  .form-label {
    font-size: 0.85rem;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .table-responsive th,
  .table-wrapper th {
    font-size: 0.8rem;
    padding: 12px 14px;
  }

  .table-responsive td,
  .table-wrapper td {
    font-size: 0.85rem;
    padding: 10px 14px;
  }

  .badge {
    font-size: 0.73rem;
    padding: 3px 10px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
  }

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

  .section {
    padding: 28px 0;
  }

  .section--sm {
    padding: 20px 0;
  }

  .section--lg {
    padding: 36px 0;
  }

  .section-title {
    font-size: 1.3rem;
    line-height: 1.25;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .section-label {
    font-size: 0.7rem;
    letter-spacing: 0.07em;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .article-card {
    border-radius: 10px;
  }

  .article-card__body {
    padding: 14px 14px 18px;
  }

  .article-card__title {
    font-size: 0.95rem;
  }

  .article-card__excerpt {
    font-size: 0.82rem;
  }

  .article-card__meta {
    gap: 8px;
    font-size: 0.75rem;
  }

  .article-card__category {
    font-size: 0.72rem;
    padding: 2px 8px;
  }

  .pagination {
    gap: 4px;
    padding: 20px 0;
  }

  .pagination a,
  .pagination span {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .form-input,
  .form-textarea,
  .form-select {
    font-size: 0.9rem;
    padding: 9px 12px;
    border-radius: 8px;
  }

  .form-textarea {
    min-height: 100px;
  }

  .form-label {
    font-size: 0.82rem;
  }

  .form-group {
    margin-bottom: 14px;
  }

  .table-responsive th,
  .table-wrapper th {
    font-size: 0.75rem;
    padding: 10px 12px;
  }

  .table-responsive td,
  .table-wrapper td {
    font-size: 0.8rem;
    padding: 9px 12px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .skip-to-content {
    left: 12px;
    font-size: 0.82rem;
    padding: 8px 14px;
  }
}