/* ============================================================
   LACHIMIE.FR — article.css
   Contenu : layout article + sidebar, typographie, liens,
             images, blocs de contenu, quiz, boutons nav,
             E-E-A-T signals, responsive article
   Dépend de : main.css (variables et reset)
   ============================================================ */

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */

/* Empêche tout scroll horizontal sur mobile */
html, body { overflow-x: hidden; }

.bloc-90 {
  max-width: 1160px;
  margin: 28px auto;
  width: 96%;
  box-sizing: border-box; /* évite le débordement si padding ajouté */
}

.container {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* ---- Colonne article (fond blanc pour les formules chimiques) ---- */
.bloc-gauche {
  flex: 1 1 0%;
  min-width: 0;           /* empêche le flex item de déborder */
  box-sizing: border-box;
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
  padding: 40px 44px;
  animation: fadeInUp .4s ease both;
}

/* ---- Sidebar ---- */
.bloc-droite {
  width: 290px;
  flex-shrink: 0;
  animation: fadeInUp .4s .1s ease both;
}

.contenu-droite {
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  font-family: var(--font-ui);
  font-size: .9rem;
}

/* ---- Recherche sidebar ---- */
.search-sidebar {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}

.search-sidebar form { display: flex; gap: 6px; }

.search-sidebar input[type="text"] {
  font-family: var(--font-ui);
  font-size: .85rem;
  flex: 1;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  color: var(--ink);
  background: var(--paper-warm);
  transition: border-color var(--t);
}

.search-sidebar input[type="text"]::placeholder { color: var(--ink-faint); }
.search-sidebar input[type="text"]:focus        { border-color: var(--science); }

.search-sidebar input[type="submit"] {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  background: var(--science);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--t);
}

.search-sidebar input[type="submit"]:hover { background: #174e8a; }

/* ---- Pub sidebar ---- */
.pub-sidebar {
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.pub-sidebar img { display: block; width: 100%; height: auto; }

/* ============================================================
   TYPOGRAPHIE ARTICLE
   ============================================================ */
h1 {
  font-family: var(--font-ui);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--science);
  line-height: 1.25;
  margin: 0 0 8px;
  padding: 0;
  letter-spacing: -.01em;
}

h2 {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 12px;
  padding: 8px 0 8px 14px;
  border-left: 3px solid var(--accent);
  letter-spacing: -.01em;
}

h3 {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 700;
  color: var(--science);
  margin: 24px 0 8px;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: .05em;
}

p  { margin: 0 0 1rem; }
ul, ol { padding-left: 1.6rem; margin: 0 0 1rem; }
li { margin-bottom: .35rem; }

/* ============================================================
   LIENS
   ============================================================ */
a:link    { color: var(--science); text-decoration: none; }
a:visited { color: #6366f1; }
a:hover   { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:active  { color: var(--accent-dark); }

/* ============================================================
   E-E-A-T — TRUST SIGNALS
   ============================================================ */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.breadcrumb a       { color: var(--science); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .sep    { color: var(--border-dark); }

.article-meta {
  font-family: var(--font-ui);
  font-size: .77rem;
  color: var(--ink-light);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  background: var(--paper-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 26px;
}

.article-meta .badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }

.article-meta .badge.verified {
  color: var(--green);
  background: var(--green-lt);
  border-radius: 100px;
  padding: 2px 10px;
  font-size: .72rem;
  font-weight: 700;
}

/* Date de publication */
.article-date {
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.article-date svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: .6;
}

/* ============================================================
   PARTAGE RÉSEAUX SOCIAUX
   ============================================================ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 32px 0 8px;
  padding: 14px 18px;
  background: var(--paper-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
}

.share-bar-label {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-light);
  margin-right: 4px;
  flex-shrink: 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), filter var(--t);
  line-height: 1;
  white-space: nowrap;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  filter: brightness(1.08);
  text-decoration: none;
}

.share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.twitter  { background: #000;    color: #fff; }
.share-btn.linkedin { background: #0a66c2; color: #fff; }
.share-btn.whatsapp { background: #25d366; color: #fff; }
.share-btn.email    { background: var(--paper); color: var(--ink); border: 1px solid var(--border-dark); }
.share-btn.email:hover { color: var(--ink); }

@media (max-width: 600px) {
  .share-btn span    { display: none; }
  .share-btn         { padding: 9px 10px; }
  .article-date      { margin-left: 0; }
}

/* ============================================================
   BLOCS ÉDITORIAUX
   ============================================================ */

/* À retenir */
.a-retenir {
  background: var(--gold-lt);
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-family: var(--font-ui);
  font-size: .93rem;
  line-height: 1.65;
}

.a-retenir-label {
  display: block;
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 6px;
}

/* Attention / info */
.attention {
  font-family: var(--font-ui);
  font-size: .92rem;
  font-weight: 500;
  background: var(--science-lt);
  border: 1px solid #93c5fd;
  border-left: 4px solid var(--science);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #1e3a5f;
  margin: 20px 0;
  line-height: 1.6;
}

/* Contenu gris */
.contenu-gauche-gris {
  box-sizing: border-box;
  background: var(--paper-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 8px 0;
  min-height: 48px;
}

/* Blocs 2 et 3 colonnes */
.contenu-gauche-2,
.contenu-gauche-3 {
  display: inline-block;
  vertical-align: top;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 14px 18px 20px;
  margin: 6px;
  background: var(--paper);
}

.contenu-gauche-2 { width: 45%; }
.contenu-gauche-3 { width: 31%; text-align: center; }

/* ============================================================
   IMAGES
   ============================================================ */
img.centre {
  display: block;
  margin: 24px auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

img.miniature-200 {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 12px auto;
  border-radius: var(--radius-sm);
}

/* ============================================================
   QUIZ & RÉSULTATS
   ============================================================ */
p.quiz {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent);
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

p.quiz::before { content: '✏️'; }

.juste {
  font-family: var(--font-ui);
  font-size: .92rem;
  background: var(--green-lt);
  border: 1px solid #86efac;
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 4px 0;
  color: var(--green);
}

.faux {
  font-family: var(--font-ui);
  font-size: .92rem;
  background: var(--red-lt);
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin: 4px 0;
  color: var(--red);
}

.reussite {
  font-family: var(--font-ui);
  font-weight: 600;
  background: var(--green-lt);
  border: 1px solid #86efac;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 28px;
  color: var(--green);
}

/* ============================================================
   BOUTONS
   ============================================================ */
#boutonNavigation {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: var(--radius);
  height: auto;
  min-height: 52px;
  width: auto;
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--science);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: 0 3px 12px rgba(29,95,166,.28);
  margin: 8px 6px;
}

#boutonNavigation:hover {
  background: #174e8a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,95,166,.38);
  color: #fff;
  text-decoration: none;
}

span.fleche { font-size: 1.25rem; line-height: 1; }

button {
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 8px 16px;
  transition: background var(--t), border-color var(--t);
}

button:hover { background: var(--paper-tint); border-color: var(--science); }

/* Recherche adsense */
#recherche_adsense { display: flex; justify-content: flex-end; margin-bottom: 12px; }

/* Cache */
#cache { display: none; }

/* ============================================================
   RESPONSIVE ARTICLE
   ============================================================ */
@media (max-width: 850px) {

  .container    { flex-direction: column; gap: 16px; }
  .bloc-droite  { width: 100%; box-sizing: border-box; }

  .bloc-gauche {
    width: 100%;
    box-sizing: border-box;
    padding: 20px 16px;   /* padding réduit, jamais > largeur écran */
    border-radius: var(--radius);
  }

  h1 { font-size: 1.35rem; }
  h2 { font-size: 1rem; margin: 24px 0 10px; }

  img.centre { margin: 16px auto; max-width: 100%; }

  #boutonNavigation {
    width: 100%;
    min-width: unset;
    margin: 8px 0;
  }

  .contenu-gauche-2,
  .contenu-gauche-3 { display: block; width: 100%; margin: 6px 0; box-sizing: border-box; }

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