/*
  Mo3dli : mise en page des articles et des pages d'information
  (guides, à propos, contact, confidentialité). À charger après site.css.
  Coder : BEN MAAD ALAA EDDINE
*/

body {
  margin: 0;
  background-color: #0c0f15;
  color: #ababab;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
}

.article-main {
  padding: 40px 16px 64px;
}

.article {
  max-width: 820px;
  margin: 0 auto;
}

/* Le bloc de texte est déjà centré par .article */
.article .page-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Fil d'Ariane */
.breadcrumb {
  margin: 0 0 18px;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  color: #7d7d7d;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb li + li::before {
  content: "›";
  margin: 0 6px 0 2px;
  color: #ff0037;
}
[dir="rtl"] .breadcrumb li + li::before {
  content: "‹";
  margin: 0 2px 0 6px;
}
.breadcrumb a {
  color: #ababab;
  text-decoration: none;
}
.breadcrumb a:hover,
.breadcrumb a:focus {
  color: #ffffff;
  text-decoration: underline;
}

/* Titre et métadonnées */
.article-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 34px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.3;
}
.article-meta {
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1e2530;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #7d7d7d;
}
.article-meta time,
.article-meta .author {
  color: #ababab;
}
.article-meta a {
  color: #2ecc71;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-meta a:hover,
.article-meta a:focus {
  color: #ffffff;
}
.lead {
  font-size: 18px;
  line-height: 1.75;
  color: #e3e5e8;
}

/* Sommaire */
.toc {
  margin: 0 0 28px;
  padding: 16px 20px;
  border: 1px solid #1e2530;
  border-radius: 8px;
  background-color: #11161f;
}
.toc__title {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.page-content .toc ol {
  margin: 0;
}

/* Résumé en arabe sur les pages françaises */
.summary-ar {
  margin: 40px 0 0;
  padding: 20px 24px;
  border-right: 4px solid #2ecc71;
  border-radius: 8px;
  background-color: #11161f;
  text-align: right;
  font-size: 17px;
  line-height: 2;
}
.page-content .summary-ar h2 {
  margin-top: 0;
  text-align: right;
}
.page-content .summary-ar h2::after {
  margin-left: auto;
}

/* Encadrés en RTL : la bordure passe à droite */
[dir="rtl"] .note-box,
.page-content [dir="rtl"] .note-box {
  border-left: 0;
  border-right: 4px solid #ff0037;
}
[dir="rtl"] .page-content h2::after {
  margin-left: auto;
}
[dir="rtl"] .article-title,
[dir="rtl"] .article-meta {
  text-align: right;
}
[dir="rtl"] .article-title {
  letter-spacing: 0;
}
[dir="rtl"] .page-content .data-table th,
[dir="rtl"] .page-content .data-table td {
  text-align: right;
}
[dir="rtl"] .page-content .data-table .num {
  text-align: left;
}
[dir="rtl"] .data-table caption {
  text-align: right;
}

/* Liste des guides */
.guide-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.page-content .guide-list {
  padding-left: 0;
}
.guide-card {
  margin: 0;
}
.guide-card a,
.page-content .guide-card a {
  display: block;
  padding: 18px 20px;
  border: 1px solid #1e2530;
  border-radius: 8px;
  background-color: #11161f;
  color: #d6d9de;
  text-decoration: none;
  transition: 0.25s;
}
.guide-card a:hover,
.guide-card a:focus {
  border-color: #ff0037;
  color: #ffffff;
}
.guide-card__title {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.guide-card__meta {
  display: block;
  margin-bottom: 6px;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  color: #7d7d7d;
}
.guide-card__excerpt {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: #ababab;
}
.lang-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid #2ecc71;
  border-radius: 10px;
  font-size: 12px;
  color: #2ecc71;
}

@media (min-width: 768px) {
  .guide-list--grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Page 404 */
.error-code {
  margin: 0;
  color: #ff0037;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-size: 88px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 4px;
}

/* Liste de contacts */
.contact-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
.page-content .contact-list {
  padding-left: 0;
}
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 12px 0;
  border-bottom: 1px solid #1e2530;
}
.contact-list__label {
  min-width: 110px;
  color: #ffffff;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 600;
}

@media (max-width: 767px) {
  .article-main {
    padding: 28px 16px 48px;
  }
  .article-title {
    font-size: 26px;
  }
  .lead {
    font-size: 17px;
  }
  .summary-ar {
    padding: 16px 18px;
  }
}

/* Tableaux du score T (4 colonnes) : une carte par filière sur téléphone */
@media (max-width: 600px) {
  .data-table--wide,
  .data-table--wide tbody,
  .data-table--wide tr,
  .data-table--wide td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .data-table--wide caption {
    display: block;
  }
  .data-table--wide thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .data-table--wide tr {
    margin-bottom: 10px;
    padding: 10px 14px;
    border: 1px solid #1e2530;
    border-radius: 8px;
  }
  .page-content .data-table.data-table--wide td,
  [dir="rtl"] .page-content .data-table.data-table--wide td {
    padding: 3px 0;
    border: 0;
    text-align: start;
    white-space: normal;
  }
  .data-table--wide td:first-child {
    margin-bottom: 4px;
    color: #ffffff;
    font-weight: 600;
  }
  .data-table--wide td:nth-child(n+2)::before {
    color: #7d7d7d;
    font-size: 13px;
  }
  .data-table--wide td:nth-child(2)::before { content: "Formule : "; }
  .data-table--wide td:nth-child(3)::before { content: "Score T : "; }
  .data-table--wide td:nth-child(4)::before { content: "Avec 7 % : "; }
  [lang="ar"] .data-table--wide td:nth-child(2)::before { content: "الصيغة: "; }
  [lang="ar"] .data-table--wide td:nth-child(3)::before { content: "مجموع النقاط: "; }
  [lang="ar"] .data-table--wide td:nth-child(4)::before { content: "مع 7%: "; }
}
