/* Articles du blog (src/lib/article.ts) : en-tête lisible, colonne de texte à 720 px, sommaire, cartes et boutons du site.
   Couleurs et coins repris du reste du site : bleu #252f61, orange #e8482f, jaune #fbbb1c, coins à 16 px et plus. */

.esl-article {
  --bleu: #252f61;
  --encre: #1d2347;
  --texte: #2c3459;
  --discret: #5d6587;
  --fond: #f3f5fa;
  --trait: #e1e6f1;
  --orange: #e8482f;
  --jaune: #fbbb1c;
  font-family: "Montserrat", sans-serif;
  color: var(--texte);
  padding: 56px 20px 24px;
  background: #fff;
}

/* En-tête : catégorie, titre, date et temps de lecture à gauche ; photo à droite */
.esl-article__tete { max-width: 1044px; margin: 0 auto 64px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: center; }
.esl-article__categorie { display: inline-block; margin: 0 0 22px; padding: 8px 14px; border-radius: 11px; background: #fdeeea; color: #b8351d; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: background-color 160ms ease; }
.esl-article__titre { margin: 0 0 22px; font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; color: var(--bleu); text-wrap: balance; text-transform: none; }
.esl-article__meta { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--discret); }
.esl-article__couverture { margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--fond); box-shadow: 0 30px 60px -32px rgba(37, 47, 97, 0.45); }
.esl-article__couverture img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Corps : sommaire collant à gauche, texte à droite */
.esl-article__corps { max-width: 1044px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 720px); gap: 64px; justify-content: center; align-items: start; }
.esl-article__corps--seul { grid-template-columns: minmax(0, 720px); }
.esl-article__sommaire { position: sticky; top: 132px; padding: 24px 22px; border-radius: 20px; background: var(--fond); }
.esl-article__sommaire-titre { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bleu); }
.esl-article__sommaire ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: partie; }
.esl-article__sommaire li { counter-increment: partie; }
.esl-article__sommaire a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--texte); text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.esl-article__sommaire a::before { content: counter(partie); font-weight: 700; color: var(--orange); }

/* Texte */
.esl-article__texte { font-size: 18px; line-height: 1.75; }
.esl-article__texte > :first-child { margin-top: 0; }
.esl-article__texte p { margin: 0 0 22px; }
.esl-article__texte h2 { margin: 56px 0 18px; font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -0.005em; color: var(--bleu); text-transform: none; text-wrap: balance; scroll-margin-top: 140px; }
.esl-article__texte h2::before { content: ""; display: block; width: 44px; height: 4px; margin-bottom: 16px; border-radius: 2px; background: linear-gradient(90deg, var(--orange), var(--jaune)); }
.esl-article__texte h3 { margin: 36px 0 12px; font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--bleu); text-transform: none; }
.esl-article__texte h4 { margin: 28px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--bleu); }
.esl-article__texte strong { font-weight: 700; color: var(--encre); }
.esl-article__texte a { color: var(--bleu); font-weight: 600; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.esl-article__texte ul, .esl-article__texte ol { margin: 0 0 24px; padding-left: 1.4em; }
.esl-article__texte li { margin: 0 0 8px; padding-left: 4px; }
.esl-article__texte li::marker { color: var(--orange); font-weight: 700; }
.esl-article__texte blockquote { margin: 32px 0; padding: 22px 26px; border-radius: 20px; background: var(--fond); font-size: 19px; line-height: 1.6; color: var(--bleu); }
.esl-article__texte blockquote p:last-child { margin-bottom: 0; }

/* Images */
.esl-article__texte img { display: block; max-width: 100%; height: auto; margin: 32px auto; border-radius: 20px; }
.esl-article__figure { margin: 32px 0; }
.esl-article__figure img { margin: 0 auto; }

/* Tableaux : défilent dans leur cadre au lieu de faire défiler la page */
.esl-article__texte table { display: block; width: 100%; max-width: 100%; margin: 32px 0; overflow-x: auto; border-collapse: collapse; font-size: 16px; line-height: 1.5; border: 1px solid var(--trait); border-radius: 16px; }
.esl-article__texte th { padding: 14px 16px; background: var(--bleu); color: #fff; font-weight: 700; text-align: left; white-space: nowrap; }
.esl-article__texte td { padding: 14px 16px; border-top: 1px solid var(--trait); vertical-align: top; }
.esl-article__texte tbody tr:nth-child(even) td { background: var(--fond); }

/* Mots-clés et encadrés écrits par les auteurs */
.esl-article__texte .keyword { font-weight: 700; color: var(--encre); text-decoration: underline; text-decoration-color: var(--jaune); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.esl-article__texte .tip, .esl-article__texte .note, .esl-article__texte .important, .esl-article__texte .example, .esl-article__texte .case-study, .esl-article__texte .innovation, .esl-article__texte .faq, .esl-article__texte .panel-type, .esl-article__texte .material-section { margin: 28px 0; padding: 22px 26px; border-radius: 20px; background: var(--fond); font-size: 17px; line-height: 1.65; }
.esl-article__texte .important { background: #fdeeea; }
.esl-article__texte .example, .esl-article__texte .case-study { background: #fff7e0; }
.esl-article__texte .tip *:first-child, .esl-article__texte .note *:first-child, .esl-article__texte .important *:first-child, .esl-article__texte .example *:first-child, .esl-article__texte .case-study *:first-child, .esl-article__texte .innovation *:first-child, .esl-article__texte .faq *:first-child, .esl-article__texte .panel-type *:first-child, .esl-article__texte .material-section > :first-child { margin-top: 0; }
.esl-article__texte .tip > :last-child, .esl-article__texte .note > :last-child, .esl-article__texte .important > :last-child, .esl-article__texte .example > :last-child, .esl-article__texte .case-study > :last-child, .esl-article__texte .material-section > :last-child { margin-bottom: 0; }
.esl-article__texte .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.esl-article__texte .pros, .esl-article__texte .cons { padding: 16px 18px; border-radius: 16px; background: #fff; }
.esl-article__texte .pros h4 { margin-top: 0; color: #1a7f45; }
.esl-article__texte .cons h4 { margin-top: 0; color: #b8351d; }
.esl-article__texte .pros ul, .esl-article__texte .cons ul { margin: 0; font-size: 16px; }
.esl-article__texte .eco-rating { color: var(--orange); letter-spacing: 0.1em; }

/* Précédent / suivant */
.esl-article__navigation { max-width: 1044px; margin: 72px auto 0; }
.esl-article__navigation .elementor-post-navigation { display: flex; justify-content: space-between; gap: 16px; }
.esl-article__navigation .elementor-post-navigation__separator-wrapper { display: none; }
.esl-article__navigation .elementor-post-navigation__link a { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 16px; background: var(--fond); font-size: 15px; font-weight: 600; color: var(--bleu); text-decoration: none; transition: background-color 160ms ease; }
.esl-article__navigation .elementor-post-navigation__link a svg { width: 12px; height: 12px; fill: var(--orange); }
.esl-article__navigation .elementor-post-navigation__link a, .esl-article__navigation .post-navigation__prev--label, .esl-article__navigation .post-navigation__next--label { color: var(--bleu) !important; }
.elementor-location-single { background: #f3f5fa; }

/* Autres actualités : titre et cartes du site */
.elementor-element.elementor-element-54e1fde0 { padding: 56px max(20px, calc((100% - 1044px) / 2)) 64px; background: #f3f5fa; }
.elementor-element.elementor-element-54e1fde0 .elementor-element-5ed885e0 .elementor-heading-title { font-family: "Montserrat", sans-serif; font-size: 30px; font-weight: 800; line-height: 1.2; text-transform: none; color: #252f61; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-classic .elementor-post, .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__card { overflow: hidden; padding: 0; border: 0; border-radius: 24px; background: #fff; box-shadow: 0 2px 8px rgba(37, 47, 97, 0.06), 0 24px 48px -28px rgba(37, 47, 97, 0.35); transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 200ms cubic-bezier(0.23, 1, 0.32, 1); }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__thumbnail { aspect-ratio: 4 / 3; padding: 0; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__text { padding: 22px 24px 26px; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__title, .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__title a { font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.35; color: #252f61; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__excerpt p { font-family: "Montserrat", sans-serif; font-size: 15px; line-height: 1.6; color: #5d6587; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-post__read-more { font-family: "Montserrat", sans-serif; font-size: 14px; font-weight: 700; color: #e8482f; }

:focus-visible { outline-offset: 3px; }
.esl-article a:focus-visible { outline: 3px solid var(--jaune); }

@media (hover: hover) and (pointer: fine) {
  .esl-article__categorie:hover { background: #fbd9d1; }
  .esl-article__sommaire a:hover { background: #fff; color: var(--bleu); }
  .esl-article__navigation .elementor-post-navigation__link a:hover { background: #e6eaf4; }
  .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-classic .elementor-post:hover, .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__card:hover { transform: translateY(-4px); box-shadow: 0 2px 8px rgba(37, 47, 97, 0.08), 0 32px 56px -28px rgba(37, 47, 97, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-classic .elementor-post, .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__card { transition: none; }
}

@media (max-width: 1023px) {
  .esl-article { padding-top: 36px; }
  .esl-article__tete { grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
  .esl-article__couverture { aspect-ratio: 16 / 10; order: -1; }
  .esl-article__corps { grid-template-columns: minmax(0, 720px); gap: 32px; }
  .esl-article__sommaire { position: static; }
}
@media (max-width: 640px) {
  .esl-article__texte { font-size: 17px; }
  .esl-article__texte h2 { font-size: 24px; margin-top: 44px; }
  .esl-article__texte .pros-cons { grid-template-columns: 1fr; }
  .esl-article__navigation .elementor-post-navigation { flex-direction: column; }
  .esl-article__couverture { border-radius: 22px; }
}

/* Pages qui listent les articles : titre, phrase d'accroche, cartes */
.esl-liste__tete { max-width: 1044px; margin: 0 auto; padding: 56px 20px 8px; font-family: "Montserrat", sans-serif; }
.esl-liste__titre { margin: 0 0 14px; font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; color: #252f61; text-transform: none; }
.esl-liste__intro { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.6; color: #5d6587; }
.elementor-location-archive { background: #fff; }
.elementor-location-archive .elementor-element-6acc99f8 { padding-block: 32px 72px; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__thumbnail { padding: 0; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__badge { top: 16px; right: auto; left: 16px; padding: 8px 12px; border-radius: 10px; background: #fff; color: #252f61; font-family: "Montserrat", sans-serif; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__text { padding: 20px 24px 26px; }
.elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__title, .elementor-widget-posts.elementor-widget-posts.elementor-widget-posts .elementor-posts--skin-cards .elementor-post__title a { margin: 0; font-family: "Montserrat", sans-serif; font-size: 19px; font-weight: 700; line-height: 1.35; color: #252f61; text-transform: none; }
@media (max-width: 640px) {
  .esl-liste__tete { padding-top: 36px; }
}
.elementor-location-archive .elementor-element-6acc99f8 > .e-con-inner { max-width: 1044px; }
