/* =========================
   ORIGINE.CSS — version "wiki"
   (footer mobile OK + mise en page sérieuse)
   ========================= */

:root{
  --bg: #f8f9fa;
  --panel: #ffffff;
  --text: #202122;
  --muted: #54595d;
  --border: #a2a9b1;

  --link: #0645ad;
  --linkHover: #3366cc;
  --visited: #0b0080;

  --maxw: 1120px;
}

*{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* liens "wiki" */
a{ color: var(--link); text-decoration: none; }
a:visited{ color: var(--visited); }
a:hover{ color: var(--linkHover); text-decoration: underline; }

/* structure page : footer collé en bas si page courte, sans superposer le contenu */
#main{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* mise en page : colonne principale + petites marges */
.container{
  width: min(var(--maxw), calc(100% - 24px));
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: 56px 1fr 0px; /* garde ton “globe” à gauche, pas de colonne droite */
  gap: 12px;
  align-items: start;
  flex: 1;
}

.sidebar-left{
  text-align: center;
  color: var(--muted);
  padding-top: 8px;
}
.sidebar-right{ display: none; }

.content{
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 18px 18px;
}

/* titres */
h1{
  margin: 0 0 14px;
  font-weight: 650;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* tes <hr> : simples comme wiki */
hr{
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* paragraphes */
p{
  margin: 10px 0;
  color: var(--text);
  font-size: clamp(16px, 2vw, 18px);
}

/* icône chrono dans la ligne */
.time{
  width: 20px;
  height: auto;
  display: inline-block;
  vertical-align: -4px;
  margin-right: 6px;
}

/* médias */
img, video{
  max-width: 100%;
  height: auto;
}

/* centre automatiquement les images sauf l’icône chrono */
.content img:not(.time){
  display: block;
  margin: 12px auto;
}

/* ombres : plus sobres */
.shadow{
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

/* ta mise en évidence .ombre : on enlève le “texte shadow” (trop “old web”) */
.ombre{
  color: var(--text);
  font-weight: 700;
  text-shadow: none;
}

/* blocs “cadre” : rendu encadré type citation / extrait */
.cadre{
  width: 100%;
  border: 1px solid var(--border);
  border-left: 4px solid var(--linkHover);
  background: #f8f9fa;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 0.98em;
  color: var(--text);
}

/* ta page utilise souvent <table class="cadre"> : on le gère aussi */
table.cadre{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
table.cadre td{
  padding: 0;
}

/* tables “police” : petites lignes de sources */
.police{
  color: var(--muted);
  font-size: 0.95em;
}
table.police{
  width: 100%;
  border-collapse: collapse;
}
table.police td{
  padding: 6px 6px;
  vertical-align: middle;
}
table.police a{
  word-break: break-word;
}

/* footer : plus en absolute => plus de bug mobile */
footer{
  margin-top: auto;
  background: #131313;
  color: #e7e5e4;
  padding: 18px 12px;
  text-align: center;
}
footer a{
  color: #e7e5e4;
  font-size: clamp(16px, 2.2vw, 20px);
  text-decoration: none;
}
footer a:hover{ text-decoration: underline; }

/* widgets sociaux : on évite le débordement */
.fb-share-button,
.fb-like{
  display: inline-block;
  margin: 8px 10px;
  max-width: 100%;
}

/* responsive */
@media (max-width: 720px){
  .container{
    grid-template-columns: 1fr;
    gap: 0;
  }
  .sidebar-left{ display: none; }
  .content{ padding: 16px 14px; }
}

.text-center{ text-align:center; }
.text-center img{ display:inline-block; }

/* ====== Timeline "wiki-like" (ajout pour la portion) ====== */

.center { text-align: center; }
.center img { margin: 0 auto; }

.sep{
  border: 0;
  border-top: 1px solid #dcdcdc;
  margin: 18px 1%;
  width: 98%;
}

.entry{
  padding: 4px 0 14px;
}

.entry-header{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 6px 1%;
}

.entry-header .time{
  width: 28px;
  height: auto;
  flex: 0 0 28px;
  position: relative;
  top: 2px;
}

.entry-title{
  margin: 0;
  font: 700 22px/1.25 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #202122;
}

.entry-year{ font-weight: 800; }
.entry-sub{
  font-weight: 400;
  color: #54595d;
  font-size: .92em;
  margin-left: .35rem;
}

/* Médias */
.media{ margin: 10px auto 12px; }
.media-grid{
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 10px auto 12px;
}

/* Sources (ligne propre + petite icône) */
.source-line{
  margin: 8px 1%;
  word-break: break-word;
}
.source-line img{
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 6px;
  display: inline-block;
}

/* "cadre" version wiki UNIQUEMENT quand combiné avec .quote */
.quote.cadre{
  margin: 10px 2%;
  padding: 12px 14px;
  background: #f8f9fa;
  border: 1px solid #a2a9b1;
  border-left: 4px solid #36c;
  border-radius: 4px;
  box-shadow: none; /* look wiki */
}
.quote.cadre p{
  margin: 0 0 10px;
}
.quote.cadre p:last-child{ margin-bottom: 0; }

.notice{
  margin: 10px 1%;
  padding: 10px 12px;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.muted{
  color: #54595d;
  font-size: 0.95em;
}

/* ===== Overrides footer (fix mobile) ===== */
#main{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: static;   /* annule le vieux position:relative */
}

.container{ flex: 1; }

footer,
.site-footer{
  position: static !important;
  bottom: auto !important;
  width: 100%;
  margin-top: auto;
}

/* Footer layout propre */
.site-footer{
  background:#131313;
  color:#e7e5e4;
  padding: 18px 12px;
}

.footer-inner{
  width: min(1100px, 100%);
  margin: 0 auto;
}

.social-widgets{
  display:flex;
  flex-wrap:wrap;
  gap: 12px 16px;
  align-items:center;
  justify-content:center;
  margin-bottom: 10px;
}

.footer-link{
  text-align:center;
  margin: 0;
}

.site-footer a{
  color:#e7e5e4;
  text-decoration:none;
}

.site-footer a:hover{ text-decoration: underline; }

/* petit ajustement mobile */
@media (max-width: 600px){
  .social-widgets{ justify-content: center; }
  .fb-like, .fb-share-button{ max-width: 100%; }
}
