/* ============================================
   AltomTomatis · Archivo Histórico
   Palette : blanc + bleu Altomtomatis + orange logo
   ============================================ */

:root {
  --clr-bg: #ffffff;
  --clr-bg-soft: #f7f9fb;
  --clr-text: #1a1a1a;
  --clr-text-muted: #5a6470;
  --clr-blue: #0076c4;         /* bleu du logo ALTOMTOMATIS */
  --clr-blue-dark: #005a96;
  --clr-blue-deep: #001c57;    /* bleu marine yootheme */
  --clr-orange: #fe7000;       /* orange spirale Altomnea */
  --clr-orange-dark: #d35f00;
  --clr-border: #e1e7ed;
  --clr-border-soft: #eef2f6;
  --clr-banner-bg: #001c57;
  --clr-banner-text: #ffffff;
  --clr-banner-accent: #fe7000;
  --clr-link: #0076c4;
  --clr-link-hover: #fe7000;
  --clr-footer-bg: #001c57;
  --clr-footer-text: #c8d2e3;

  --ff-display: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --ff-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --max-w: 880px;
  --space: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--clr-link);
  text-decoration: none;
  transition: color .15s;
}
a:hover { color: var(--clr-link-hover); }

/* ---- Archive Banner ---- */
.archive-banner {
  background: var(--clr-banner-bg);
  color: var(--clr-banner-text);
  text-align: center;
  padding: .55rem var(--space);
  font-size: .85rem;
  letter-spacing: .02em;
}
.archive-banner strong { color: var(--clr-banner-accent); }
.archive-icon { margin-right: .4rem; }

/* ---- Header ---- */
.site-header {
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .9rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.site-logo img {
  height: 46px;
  width: auto;
  display: block;
}

/* ---- Navigation ---- */
.nav-list {
  display: flex;
  list-style: none;
  gap: .15rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: .5rem .8rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--clr-text);
  text-decoration: none;
  border-radius: 3px;
  transition: background .15s, color .15s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--clr-orange);
  background: var(--clr-bg-soft);
}

.dropdown-toggle::after {
  content: '▾';
  margin-left: .3rem;
  font-size: .65em;
  opacity: .55;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-orange);
  min-width: 220px;
  padding: .35rem 0;
  list-style: none;
  z-index: 200;
  box-shadow: 0 6px 18px rgba(0, 28, 87, .08);
}
.nav-dropdown .nav-link {
  padding: .45rem 1rem;
  border-radius: 0;
  font-size: .85rem;
  font-weight: 400;
}
.nav-dropdown .nav-link:hover {
  background: var(--clr-bg-soft);
  color: var(--clr-blue);
}
.has-children:hover .nav-dropdown { display: block; }

/* ---- Mobile menu ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--clr-blue);
  border-radius: 2px;
  transition: .15s;
}

@media (max-width: 920px) {
  .menu-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--clr-border);
    padding: .5rem var(--space) 1rem;
    box-shadow: 0 8px 24px rgba(0, 28, 87, .07);
  }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-top: 0;
    padding-left: .8rem;
    display: block;
  }
  .nav-link { padding: .55rem 0; }
}

/* ---- Main Content ---- */
.site-main { min-height: 60vh; }

.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem var(--space);
}

/* ---- Section Grid (homepage) ---- */
.sections-grid {
  max-width: 1040px;
  margin: 1.5rem auto 0;
  padding: 0 var(--space) 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.section-card {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-orange);
  padding: 1.25rem 1.4rem;
  transition: box-shadow .15s;
}
.section-card:hover {
  box-shadow: 0 4px 16px rgba(0, 118, 196, .08);
}
.section-card h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--clr-blue);
  margin-bottom: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.section-card ul { list-style: none; }
.section-card li { padding: .25rem 0; }
.section-card a {
  font-size: .92rem;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: .45rem;
}
.section-card a:hover { color: var(--clr-orange); }
.section-card a::before {
  content: '›';
  color: var(--clr-orange);
  font-weight: 700;
  font-size: 1.1em;
}

/* ---- Page Header ---- */
.page-header {
  margin-bottom: 1.6rem;
  padding-bottom: 1.1rem;
  border-bottom: 3px solid var(--clr-orange);
}
.page-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--clr-blue);
  line-height: 1.2;
}
.breadcrumb {
  display: inline-block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--clr-text-muted);
  margin-bottom: .5rem;
}
.breadcrumb:hover { color: var(--clr-orange); }

/* ---- Content Typography ---- */
.page-content h1,
.content-wrap h1 {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--clr-blue);
  margin: 1.5rem 0 1rem;
  line-height: 1.25;
}

.page-content h2,
.content-wrap h2 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--clr-blue);
  margin: 2rem 0 .8rem;
  line-height: 1.3;
}

.page-content h3,
.content-wrap h3 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-text);
  margin: 1.6rem 0 .6rem;
}

.page-content p,
.content-wrap p {
  margin-bottom: 1.05rem;
}

.page-content strong { font-weight: 700; color: var(--clr-text); }
.page-content em { font-style: italic; }

.page-content blockquote {
  border-left: 3px solid var(--clr-orange);
  padding: .6rem 1.3rem;
  margin: 1.4rem 0;
  background: var(--clr-bg-soft);
  font-style: italic;
  color: var(--clr-text-muted);
}

.page-content ul,
.page-content ol {
  margin: .8rem 0 1.3rem 1.5rem;
}
.page-content li { margin-bottom: .3rem; }

.page-content a {
  color: var(--clr-blue);
  text-decoration: underline;
  text-decoration-color: rgba(0, 118, 196, .25);
  text-underline-offset: 2px;
}
.page-content a:hover {
  color: var(--clr-orange);
  text-decoration-color: var(--clr-orange);
}

.page-content img {
  margin: 1.5rem auto;
  max-width: 100%;
  border: 1px solid var(--clr-border-soft);
}

.page-content hr {
  border: none;
  height: 1px;
  background: var(--clr-border);
  margin: 2rem 0;
}

.page-content .float-none {
  margin-left: auto;
  margin-right: auto;
}

/* ---- List pages ---- */
.page-listing { margin-top: 1.5rem; }
.list-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.list-item:last-child { border-bottom: none; }
.list-item h3 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.list-item h3 a {
  color: var(--clr-blue);
}
.list-item h3 a:hover { color: var(--clr-orange); }
.list-item p {
  font-size: .9rem;
  color: var(--clr-text-muted);
  margin-top: .25rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--clr-footer-bg);
  color: var(--clr-footer-text);
  padding: 2.5rem var(--space);
  text-align: center;
  margin-top: 4rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-legacy {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: #fff;
}
.footer-note {
  font-size: .82rem;
  opacity: .8;
}

/* ---- Local media players (video/audio archivés) ---- */
.media-embed {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem 1.2rem;
  background: var(--clr-bg-soft);
  border-left: 3px solid var(--clr-orange);
}
.local-media {
  width: 100%;
  display: block;
  max-width: 100%;
}
video.local-media {
  background: #000;
  aspect-ratio: 16 / 9;
}
audio.local-media {
  margin-top: .2rem;
}
.media-caption {
  margin: .6rem 0 .2rem;
  font-weight: 600;
  color: var(--clr-blue);
}
.media-source {
  margin: 0;
  color: var(--clr-text-muted);
  font-size: .8rem;
}
.media-source a {
  color: var(--clr-text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(90, 100, 112, .4);
}
.media-source a:hover { color: var(--clr-orange); }

/* ---- YouTube embed responsive (rare cas iframes héritées) ---- */
.youtube-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.5rem 0;
  overflow: hidden;
}
.youtube-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
