/* ============================================================
   VARIABLES ET SOCLE
   ============================================================ */
#cg-atlas-v1,
#cg-atlas-v1 * {
  box-sizing: border-box;
}
#cg-atlas-v1 {
  --cg-bg: #f4f0e8;
  --cg-paper: #fffdf8;
  --cg-ink: #211f1b;
  --cg-muted: #6e6a62;
  --cg-line: #d7d0c4;
  --cg-gold: #aa7c35;
  --cg-gold-soft: #eee2cc;
  --cg-wine: #6f2f38;
  --cg-blue: #426278;
  --cg-green: #536b54;
  --cg-ochre: #9a6b38;
  --cg-plum: #67506f;
  --cg-shadow: 0 14px 40px rgba(33,31,27,.10);
  color: var(--cg-ink) !important;
  font-family: Georgia,
    "Times New Roman",
    serif;
  background: var(--cg-bg);
  overflow-x: clip;
}
#cg-atlas-v1 button,
#cg-atlas-v1 input,
#cg-atlas-v1 select {
  font: inherit;
}
#cg-atlas-v1 button {
  cursor: pointer;
}
#cg-atlas-v1 h1,
#cg-atlas-v1 h2,
#cg-atlas-v1 h3,
#cg-atlas-v1 h4,
#cg-atlas-v1 p {
  color: inherit !important;
}
#cg-atlas-v1 .cg-atlas-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* ============================================================
   HERO — VRAIE PLEINE LARGEUR
   ============================================================ */
#cg-atlas-v1 .cg-atlas-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc((100% - 100vw) / 2);
  min-height: clamp(520px,62vw,760px);
  display: grid;
  place-items: end start;
  overflow: hidden;
  background: #24211d;
}
#cg-atlas-v1 .cg-atlas-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
#cg-atlas-v1 .cg-atlas-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      90deg,
      rgba(16,14,11,.82) 0%,
      rgba(16,14,11,.55) 42%,
      rgba(16,14,11,.16) 78%,
      rgba(16,14,11,.08) 100%
    ),
    linear-gradient(
      0deg,
      rgba(16,14,11,.45),
      transparent 45%
    );
}
#cg-atlas-v1 .cg-atlas-hero__content {
  position: relative;
  z-index: 2;
  width: min(920px,calc(100% - 40px));
  padding: clamp(36px,7vw,88px)
    max(20px,calc((100vw - 1320px) / 2));
  color: #fff !important;
}
#cg-atlas-v1 .cg-atlas-kicker,
#cg-atlas-v1 .cg-atlas-eyebrow {
  margin: 0 0 12px;
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .73rem;
  font-weight: 750;
}
#cg-atlas-v1 .cg-atlas-kicker {
  color: #f3d8a7 !important;
}
#cg-atlas-v1 .cg-atlas-hero h1 {
  margin: 0;
  max-width: 800px;
  font-size: clamp(2.5rem,6.2vw,5.7rem);
  line-height: .96;
  font-weight: 500;
  letter-spacing: -.035em;
  color: #fff !important;
  text-wrap: balance;
}
#cg-atlas-v1
.cg-atlas-hero__content
> p:not(.cg-atlas-kicker) {
  margin: 22px 0 0;
  max-width: 760px;
  color: rgba(255,255,255,.9) !important;
  font-size: clamp(1.05rem,2vw,1.45rem);
  line-height: 1.55;
}
#cg-atlas-v1 .cg-atlas-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 30px;
  padding: 0 22px;
  border: 1px solid rgba(255,255,255,.55);
  color: #fff !important;
  text-decoration: none !important;
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(24,20,15,.25);
  backdrop-filter: blur(7px);
  border-radius: 999px;
  transition: .2s ease;
}
#cg-atlas-v1 .cg-atlas-hero__cta:hover {
  background: #fff;
  color: #201c17 !important;
}
/* ============================================================
   INTRO / METHOD / SOURCES
   ============================================================ */
#cg-atlas-v1 .cg-atlas-intro,
#cg-atlas-v1 .cg-atlas-method,
#cg-atlas-v1 .cg-atlas-sources {
  padding: clamp(58px,7vw,100px)
    20px;
}
#cg-atlas-v1 .cg-atlas-intro__inner,
#cg-atlas-v1 .cg-atlas-method__inner,
#cg-atlas-v1 .cg-atlas-sources__inner {
  max-width: 1180px;
  margin: 0 auto;
}
#cg-atlas-v1 .cg-atlas-eyebrow {
  color: var(--cg-wine) !important;
}
#cg-atlas-v1 .cg-atlas-intro h2,
#cg-atlas-v1 .cg-atlas-method h2,
#cg-atlas-v1 .cg-atlas-sources h2 {
  margin: 0;
  font-size: clamp(2rem,4vw,3.6rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.05;
}
#cg-atlas-v1 .cg-atlas-lead,
#cg-atlas-v1 .cg-atlas-method__inner > p,
#cg-atlas-v1 .cg-atlas-sources__inner > p {
  max-width: 900px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem,1.5vw,1.25rem);
  line-height: 1.75;
  color: #45413b !important;
}
#cg-atlas-v1 .cg-atlas-principles {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  margin-top: 45px;
  background: var(--cg-line);
  border: 1px solid var(--cg-line);
}
#cg-atlas-v1 .cg-atlas-principles div {
  background: var(--cg-paper);
  padding: 25px 22px;
  min-width: 0;
}
#cg-atlas-v1 .cg-atlas-principles strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 7px;
}
#cg-atlas-v1 .cg-atlas-principles span {
  color: var(--cg-muted);
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: .9rem;
  line-height: 1.5;
}
/* ============================================================
   APPLICATION
   ============================================================ */
#cg-atlas-v1 .cg-atlas-app {
  width: calc(100% - 24px);
  max-width: 1680px;
  margin: 0 auto clamp(60px,7vw,110px);
  background: #efebe4;
  border: 1px solid #cbc3b6;
  box-shadow: var(--cg-shadow);
  overflow: hidden;
  border-radius: 4px;
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
/* BARRE SUPERIEURE */
#cg-atlas-v1 .cg-atlas-app__topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 14px;
  background: #26231f;
  color: #fff !important;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#cg-atlas-v1 .cg-atlas-searchwrap {
  position: relative;
  flex: 1 1 520px;
  max-width: 720px;
}
#cg-atlas-v1 #cg-atlas-search {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #222 !important;
  font-size: 16px;
}
#cg-atlas-v1 #cg-atlas-search:focus {
  border-color: #e0bd7a;
  box-shadow: 0 0 0 3px rgba(224,189,122,.22);
}
#cg-atlas-v1 .cg-atlas-searchresults {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow: auto;
  background: #fff;
  color: #222 !important;
  border: 1px solid #cfc7bb;
  box-shadow: 0 16px 45px rgba(0,0,0,.2);
}
#cg-atlas-v1 .cg-search-item {
  width: 100%;
  display: block;
  border: 0;
  border-bottom: 1px solid #ece7df;
  background: #fff;
  color: #222 !important;
  text-align: left;
  padding: 12px 14px;
}
#cg-atlas-v1 .cg-search-item:hover,
#cg-atlas-v1 .cg-search-item:focus {
  background: #f7f1e7;
}
#cg-atlas-v1 .cg-search-item strong {
  display: block;
}
#cg-atlas-v1 .cg-search-item small {
  color: #6e6a62;
}
#cg-atlas-v1 .cg-atlas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
#cg-atlas-v1 .cg-atlas-actions button,
#cg-atlas-v1 .cg-atlas-mobilebar button,
#cg-atlas-v1 .cg-atlas-compare-controls button,
#cg-atlas-v1 .cg-atlas-tabs button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: transparent;
  color: inherit !important;
  font-weight: 700;
}
#cg-atlas-v1 .cg-atlas-actions button:hover,
#cg-atlas-v1 .cg-atlas-actions button:focus {
  background: #fff;
  color: #211f1b !important;
}
/* ============================================================
   WORKSPACE
   ============================================================ */
#cg-atlas-v1 .cg-atlas-workspace {
  display: grid;
  grid-template-columns: 270px minmax(0,1fr) 340px;
  min-height: 690px;
}
#cg-atlas-v1 .cg-atlas-sidebar,
#cg-atlas-v1 .cg-atlas-detailpanel {
  background: #f7f3ec;
  min-width: 0;
  overflow: auto;
}
#cg-atlas-v1 .cg-atlas-sidebar {
  border-right: 1px solid #cbc3b6;
  padding: 18px;
}
#cg-atlas-v1 .cg-atlas-detailpanel {
  border-left: 1px solid #cbc3b6;
  padding: 18px;
}
#cg-atlas-v1 .cg-atlas-panelhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}
#cg-atlas-v1 .cg-atlas-panelhead__overline {
  margin: 0 0 3px;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .68rem;
  font-weight: 800;
  color: var(--cg-wine) !important;
}
#cg-atlas-v1 .cg-atlas-panelhead h3 {
  margin: 0;
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1.45rem;
  font-weight: 500;
}
#cg-atlas-v1 .cg-atlas-mobileclose {
  display: none;
  border: 0;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
}
/* ============================================================
   THEMES
   ============================================================ */
#cg-atlas-v1 .cg-atlas-themes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
#cg-atlas-v1 .cg-atlas-themes label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 3px;
  cursor: pointer;
  color: #35312c !important;
  line-height: 1.3;
}
#cg-atlas-v1 .cg-atlas-themes label:hover {
  background: #ede5d9;
}
#cg-atlas-v1 .cg-atlas-themes input {
  margin-top: 3px;
  accent-color: var(--cg-wine);
}
#cg-atlas-v1 .cg-atlas-modeblock {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #d7d0c4;
}
#cg-atlas-v1 .cg-atlas-modeblock__title {
  margin: 0 0 10px;
  font-weight: 800;
}
#cg-atlas-v1 .cg-atlas-switch {
  display: flex;
  gap: 10px;
  margin: 8px 0;
  font-size: .9rem;
  line-height: 1.4;
}
#cg-atlas-v1 .cg-atlas-switch input {
  accent-color: var(--cg-wine);
  margin-top: 3px;
}
#cg-atlas-v1 .cg-atlas-demostatus {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding: 13px;
  background: #fff9eb;
  border: 1px solid #e0cfaa;
  font-size: .82rem;
  line-height: 1.4;
}
#cg-atlas-v1 .cg-atlas-demostatus__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aa7c35;
  margin-top: 4px;
  flex: 0 0 auto;
}
#cg-atlas-v1 .cg-atlas-demostatus small {
  display: block;
  color: #6c6253;
  margin-top: 3px;
}
/* ============================================================
   CARTE
   ============================================================ */
#cg-atlas-v1 .cg-atlas-mapstage {
  min-width: 0;
  background: #d8d3ca;
  display: flex;
  flex-direction: column;
}
#cg-atlas-v1 .cg-atlas-mobilebar {
  display: none;
}
#cg-atlas-v1 .cg-atlas-mapgrid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  min-height: 570px;
  flex: 1 1 auto;
}
#cg-atlas-v1 .cg-atlas-mapgrid.is-compare {
  grid-template-columns: minmax(0,1fr)
    minmax(0,1fr);
}
#cg-atlas-v1 .cg-atlas-mapcell {
  position: relative;
  min-width: 0;
  min-height: 570px;
  border-right: 1px solid #c4bcaf;
}
#cg-atlas-v1 .cg-atlas-mapcell:last-child {
  border-right: 0;
}
#cg-atlas-v1 .cg-atlas-map {
  position: absolute;
  inset: 0;
}
#cg-atlas-v1 .cg-atlas-maplabel {
  position: absolute;
  z-index: 6;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,253,248,.94);
  border: 1px solid rgba(70,62,52,.2);
  box-shadow: 0 5px 16px rgba(0,0,0,.09);
  border-radius: 3px;
  pointer-events: none;
}
#cg-atlas-v1 .cg-atlas-maplabel span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #29241e;
  color: #fff !important;
  font-size: .75rem;
  font-weight: 800;
}
#cg-atlas-v1 .cg-atlas-maplabel strong {
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1rem;
}
#cg-atlas-v1 .maplibregl-ctrl-group {
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,.13);
}
#cg-atlas-v1 .maplibregl-ctrl-attrib {
  font-size: 10px;
}
/* ============================================================
   MARQUEURS
   ============================================================ */
#cg-atlas-v1 .cg-marker {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.27);
  cursor: pointer;
  padding: 0;
}
#cg-atlas-v1 .cg-marker > span {
  transform: rotate(45deg);
  color: #fff !important;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}
#cg-atlas-v1
.cg-marker[data-theme="archeologie"] {
  background: var(--cg-ochre);
}
#cg-atlas-v1
.cg-marker[data-theme="religion"] {
  background: var(--cg-plum);
}
#cg-atlas-v1
.cg-marker[data-theme="guerre"] {
  background: var(--cg-wine);
}
#cg-atlas-v1
.cg-marker[data-theme="territoires"] {
  background: #7d5836;
}
#cg-atlas-v1
.cg-marker[data-theme="reseaux"] {
  background: var(--cg-blue);
}
#cg-atlas-v1
.cg-marker[data-current="vestiges"] {
  box-shadow: 0 0 0 4px rgba(154,107,56,.22),
    0 4px 12px rgba(0,0,0,.27);
}
#cg-atlas-v1 .cg-marker.is-uncertain {
  border-style: dashed;
  opacity: .72;
}
#cg-atlas-v1 .cg-marker.is-trace {
  opacity: .42;
  filter: grayscale(.65);
}
#cg-atlas-v1 .cg-marker:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}
/* ============================================================
   CHRONOSCOPE
   ============================================================ */
#cg-atlas-v1 .cg-atlas-chronoscope {
  background: #f7f3ec;
  border-top: 1px solid #c9c1b5;
  padding: 14px;
}
#cg-atlas-v1 .cg-atlas-chrono-main {
  display: grid;
  grid-template-columns: 44px
    minmax(170px,220px)
    minmax(0,1fr)
    44px;
  gap: 12px;
  align-items: end;
}
#cg-atlas-v1 .cg-atlas-chrono-main > button {
  height: 44px;
  border: 1px solid #a89f91;
  background: #fff;
  color: #211f1b !important;
  font-size: 1.5rem;
  border-radius: 3px;
}
#cg-atlas-v1 .cg-atlas-era-wrap,
#cg-atlas-v1 .cg-atlas-range-wrap {
  min-width: 0;
}
#cg-atlas-v1 .cg-atlas-era-wrap label,
#cg-atlas-v1 .cg-atlas-range-head,
#cg-atlas-v1 .cg-atlas-compare-controls label {
  display: block;
  margin-bottom: 5px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 800;
  color: #6e665d !important;
}
#cg-atlas-v1 .cg-atlas-era-wrap select {
  width: 100%;
  min-height: 44px;
  background: #fff;
  border: 1px solid #aaa194;
  color: #222 !important;
  padding: 0 10px;
  font-size: 16px;
}
#cg-atlas-v1 .cg-atlas-range-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#cg-atlas-v1 #cg-atlas-date-output {
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1rem;
  color: #29241e !important;
  text-transform: none;
  letter-spacing: 0;
}
#cg-atlas-v1 #cg-atlas-range {
  width: 100%;
  accent-color: var(--cg-wine);
  min-height: 32px;
}
/* COMPARAISON */
#cg-atlas-v1 .cg-atlas-compare-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d7d0c4;
}
#cg-atlas-v1
.cg-atlas-compare-controls label {
  margin: 0 2px 0 0;
}
#cg-atlas-v1
.cg-atlas-compare-controls input {
  min-height: 42px;
  width: 120px;
  border: 1px solid #a89f91;
  background: #fff;
  padding: 0 9px;
  font-size: 16px;
}
#cg-atlas-v1
.cg-atlas-compare-controls button {
  color: #2c2823 !important;
  border-color: #9e9588;
  background: #fff;
}
/* ============================================================
   PANNEAU FICHE
   ============================================================ */
#cg-atlas-v1 .cg-atlas-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}
#cg-atlas-v1 .cg-atlas-tabs button {
  flex: 1 1 0;
  color: #4a443c !important;
  border-color: #c4bcaf;
}
#cg-atlas-v1
.cg-atlas-tabs button.is-active {
  background: #2c2823;
  color: #fff !important;
  border-color: #2c2823;
}
#cg-atlas-v1 .cg-atlas-empty {
  padding: 45px 10px;
  text-align: center;
  color: #625c54 !important;
}
#cg-atlas-v1 .cg-atlas-empty__mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border: 1px solid #b8ada0;
  border-radius: 50%;
  color: var(--cg-gold) !important;
  font-size: 1.4rem;
}
#cg-atlas-v1 .cg-atlas-empty h4 {
  margin: 0 0 7px;
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1.2rem;
}
#cg-atlas-v1 .cg-atlas-empty p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
}
#cg-atlas-v1 .cg-object-kicker {
  margin: 0 0 8px;
  color: var(--cg-wine) !important;
  text-transform: uppercase;
  font-size: .68rem;
  letter-spacing: .12em;
  font-weight: 800;
}
#cg-atlas-v1 .cg-object-title {
  margin: 0;
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.1;
}
#cg-atlas-v1 .cg-object-subtitle {
  margin: 8px 0 0;
  color: #6c655c !important;
  font-size: .87rem;
}
#cg-atlas-v1 .cg-object-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 18px 0;
}
#cg-atlas-v1 .cg-object-meta div {
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd5ca;
}
#cg-atlas-v1 .cg-object-meta span {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #756d63 !important;
  margin-bottom: 3px;
}
#cg-atlas-v1 .cg-object-meta strong {
  font-size: .86rem;
}
#cg-atlas-v1 .cg-object-text {
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #39352f !important;
}
#cg-atlas-v1 .cg-object-source {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #d7d0c4;
}
#cg-atlas-v1
.cg-object-source strong {
  display: block;
  margin-bottom: 5px;
}
#cg-atlas-v1
.cg-object-source a {
  color: #6f2f38 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
#cg-atlas-v1 .cg-object-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
#cg-atlas-v1
.cg-object-actions button {
  min-height: 39px;
  border: 1px solid #9f9689;
  background: #fff;
  padding: 0 10px;
  font-weight: 700;
  color: #2b2723 !important;
}
/* LISTE */
#cg-atlas-v1 .cg-atlas-list {
  display: grid;
  gap: 7px;
}
#cg-atlas-v1 .cg-list-item {
  width: 100%;
  border: 1px solid #d8d0c5;
  background: #fff;
  text-align: left;
  padding: 11px;
  color: #25211d !important;
}
#cg-atlas-v1 .cg-list-item:hover,
#cg-atlas-v1 .cg-list-item:focus {
  border-color: #9f7a42;
  background: #fffaf0;
}
#cg-atlas-v1 .cg-list-item strong {
  display: block;
}
#cg-atlas-v1 .cg-list-item small {
  color: #71695f;
}
/* ============================================================
   MÉTHODE / LÉGENDE
   ============================================================ */
#cg-atlas-v1 .cg-atlas-method {
  background: #fffaf2;
}
#cg-atlas-v1 .cg-atlas-legendcards,
#cg-atlas-v1 .cg-atlas-sourcegrid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-top: 40px;
}
#cg-atlas-v1
.cg-atlas-legendcards > div,
#cg-atlas-v1
.cg-atlas-sourcegrid > div {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d7d0c4;
  background: rgba(255,255,255,.72);
}
#cg-atlas-v1
.cg-atlas-legendcards strong,
#cg-atlas-v1
.cg-atlas-sourcegrid strong {
  display: block;
  margin: 12px 0 5px;
  font-size: 1rem;
}
#cg-atlas-v1
.cg-atlas-legendcards small,
#cg-atlas-v1
.cg-atlas-sourcegrid span {
  display: block;
  color: #696259;
  line-height: 1.5;
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: .86rem;
}
#cg-atlas-v1 .cg-line {
  display: block;
  width: 68px;
  height: 12px;
  border-top: 3px solid #6f2f38;
}
#cg-atlas-v1 .cg-line--dash {
  border-top-style: dashed;
}
#cg-atlas-v1 .cg-line--dot {
  border-top-style: dotted;
}
#cg-atlas-v1 .cg-fuzzy {
  display: block;
  width: 68px;
  height: 18px;
  background: repeating-linear-gradient(
      135deg,
      rgba(111,47,56,.18),
      rgba(111,47,56,.18) 4px,
      rgba(111,47,56,.03) 4px,
      rgba(111,47,56,.03) 9px
    );
  border-radius: 9px;
}
/* ============================================================
   SOURCES
   ============================================================ */
#cg-atlas-v1 .cg-atlas-sources {
  background: #27231f;
  color: #f7f0e5 !important;
}
#cg-atlas-v1
.cg-atlas-sources
.cg-atlas-eyebrow {
  color: #ddb978 !important;
}
#cg-atlas-v1 .cg-atlas-sources h2,
#cg-atlas-v1 .cg-atlas-sources p {
  color: #f7f0e5 !important;
}
#cg-atlas-v1
.cg-atlas-sources__inner > p {
  color: #ddd3c4 !important;
}
#cg-atlas-v1
.cg-atlas-sourcegrid > div {
  border-color: #5b5248;
  background: #312c27;
}
#cg-atlas-v1
.cg-atlas-sourcegrid span {
  color: #cfc4b5 !important;
}
#cg-atlas-v1 .cg-atlas-version {
  margin-top: 40px !important;
  padding-top: 18px;
  border-top: 1px solid #5b5248;
  font-family: system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: .78rem !important;
  color: #bfb5a6 !important;
}
/* ============================================================
   AIDE
   ============================================================ */
#cg-atlas-v1 .cg-helpmodal {
  position: absolute;
  z-index: 60;
  inset: 70px 20px auto;
  max-width: 660px;
  margin: auto;
  background: #fffdf8;
  border: 1px solid #cfc5b7;
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
  padding: 24px;
  color: #26211d !important;
}
#cg-atlas-v1 .cg-helpmodal h4 {
  margin: 0 0 12px;
  font-family: Georgia,
    "Times New Roman",
    serif;
  font-size: 1.5rem;
}
#cg-atlas-v1 .cg-helpmodal p {
  line-height: 1.6;
}
#cg-atlas-v1 .cg-helpmodal button {
  min-height: 40px;
  border: 1px solid #8f8578;
  background: #fff;
  padding: 0 12px;
  font-weight: 700;
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1180px) {
  #cg-atlas-v1 .cg-atlas-workspace {
    grid-template-columns: 240px minmax(0,1fr) 300px;
  }
  #cg-atlas-v1 .cg-atlas-legendcards,
  #cg-atlas-v1 .cg-atlas-sourcegrid {
    grid-template-columns: repeat(2,1fr);
  }
}
@media (max-width:980px) {
  #cg-atlas-v1 .cg-atlas-principles {
    grid-template-columns: repeat(2,1fr);
  }
  #cg-atlas-v1 .cg-atlas-app {
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  #cg-atlas-v1 .cg-atlas-app__topbar {
    align-items: stretch;
    flex-direction: column;
  }
  #cg-atlas-v1 .cg-atlas-searchwrap {
    flex-basis: auto;
    max-width: none;
  }
  #cg-atlas-v1 .cg-atlas-actions {
    justify-content: flex-start;
  }
  #cg-atlas-v1 .cg-atlas-workspace {
    display: block;
    position: relative;
    min-height: 0;
  }
  #cg-atlas-v1 .cg-atlas-sidebar,
  #cg-atlas-v1 .cg-atlas-detailpanel {
    position: absolute;
    z-index: 45;
    top: 50px;
    bottom: 0;
    width: min(390px,calc(100% - 24px));
    max-height: 640px;
    box-shadow: 0 18px 60px rgba(0,0,0,.3);
    display: none;
  }
  #cg-atlas-v1 .cg-atlas-sidebar {
    left: 12px;
    border: 1px solid #c9c1b5;
  }
  #cg-atlas-v1 .cg-atlas-detailpanel {
    right: 12px;
    border: 1px solid #c9c1b5;
  }
  #cg-atlas-v1 .cg-atlas-sidebar.is-open,
  #cg-atlas-v1 .cg-atlas-detailpanel.is-open {
    display: block;
  }
  #cg-atlas-v1 .cg-atlas-mobileclose {
    display: block;
  }
  #cg-atlas-v1 .cg-atlas-mobilebar {
    display: flex;
    gap: 6px;
    padding: 7px;
    background: #302b26;
  }
  #cg-atlas-v1
  .cg-atlas-mobilebar button {
    flex: 1 1 0;
    color: #fff !important;
    border-color: #71685e;
  }
  #cg-atlas-v1 .cg-atlas-mapcell {
    min-height: 500px;
  }
  #cg-atlas-v1 .cg-atlas-mapgrid {
    min-height: 500px;
  }
  #cg-atlas-v1
  .cg-atlas-mapgrid.is-compare {
    grid-template-columns: 1fr;
  }
  #cg-atlas-v1
  .cg-atlas-mapgrid.is-compare
  .cg-atlas-mapcell {
    min-height: 410px;
  }
  #cg-atlas-v1
  .cg-atlas-mapgrid.is-compare
  .cg-atlas-mapcell--compare {
    border-top: 1px solid #bdb4a7;
  }
}
@media (max-width:700px) {
  #cg-atlas-v1 .cg-atlas-hero {
    min-height: 560px;
  }
  #cg-atlas-v1 .cg-atlas-hero__veil {
    background: linear-gradient(
        0deg,
        rgba(16,14,11,.8) 0%,
        rgba(16,14,11,.42) 58%,
        rgba(16,14,11,.14) 100%
      );
  }
  #cg-atlas-v1 .cg-atlas-hero__content {
    padding: 36px 20px;
  }
  #cg-atlas-v1 .cg-atlas-principles {
    grid-template-columns: 1fr;
  }
  #cg-atlas-v1 .cg-atlas-intro,
  #cg-atlas-v1 .cg-atlas-method,
  #cg-atlas-v1 .cg-atlas-sources {
    padding-left: 18px;
    padding-right: 18px;
  }
  #cg-atlas-v1 .cg-atlas-actions button {
    flex: 1 1 auto;
  }
  #cg-atlas-v1 .cg-atlas-chrono-main {
    grid-template-columns: 42px minmax(0,1fr) 42px;
  }
  #cg-atlas-v1 .cg-atlas-era-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  #cg-atlas-v1 .cg-atlas-range-wrap {
    grid-column: 2;
    grid-row: 2;
  }
  #cg-atlas-v1 #cg-atlas-prev {
    grid-column: 1;
    grid-row: 2;
  }
  #cg-atlas-v1 #cg-atlas-next {
    grid-column: 3;
    grid-row: 2;
  }
  #cg-atlas-v1 .cg-atlas-legendcards,
  #cg-atlas-v1 .cg-atlas-sourcegrid {
    grid-template-columns: 1fr;
  }
  #cg-atlas-v1 .cg-atlas-mapcell {
    min-height: 460px;
  }
  #cg-atlas-v1 .cg-atlas-mapgrid {
    min-height: 460px;
  }
  #cg-atlas-v1 .cg-object-meta {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion:reduce) {
  #cg-atlas-v1 *,
  #cg-atlas-v1 *::before,
  #cg-atlas-v1 *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
/* V1.1 : préserver les panneaux masqués, même dans Elementor. */
#cg-atlas-v1 [hidden] { display: none !important; }
#cg-atlas-v1 .cg-atlas-mapstage { position: relative; }
#cg-atlas-v1 .cg-atlas-map-status {
  position: absolute; top: 64px; left: 16px; right: 16px; z-index: 3;
  padding: 12px 16px; background: var(--cg-paper); color: var(--cg-ink);
  border: 1px solid var(--cg-line); border-radius: 6px; font-size: 14px;
}
#cg-atlas-v1 #cg-atlas-map-retry { margin-left: 12px; }

/* V1.2 : choix du corpus et statut de chargement. */
#cg-atlas-v1 .cg-atlas-layerpicker { margin: 0 0 20px; padding: 12px; border: 1px solid var(--cg-line); }
#cg-atlas-v1 .cg-atlas-layerpicker legend { padding: 0 6px; font-weight: bold; font-size: 16px; }
#cg-atlas-v1 .cg-atlas-layerpicker label { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; font-size: 14px; }
#cg-atlas-v1 .cg-atlas-layerpicker p, #cg-atlas-v1 .cg-atlas-map-note { font-size: 12px; line-height: 1.5; }
#cg-atlas-v1 .cg-atlas-map-note { margin: 0; padding: 8px 14px; background: var(--cg-paper); color: var(--cg-muted) !important; }
#cg-atlas-v1 .cg-object-source small { display: block; margin: 5px 0 12px; line-height: 1.5; }
#cg-atlas-v1 .cg-atlas-layerpicker button { padding: 8px; border: 1px solid var(--cg-line); background: var(--cg-paper); color: var(--cg-ink); }

/* Chronoscope : isolation des styles de boutons du thème WordPress. */
#cg-atlas-v1 .cg-atlas-chronoscope { min-width:0; container-type:inline-size; }
#cg-atlas-v1 .cg-atlas-chrono-main > * { min-width:0; }
#cg-atlas-v1 #cg-atlas-prev, #cg-atlas-v1 #cg-atlas-next {
 display:flex !important; align-items:center; justify-content:center;
 width:100% !important; max-width:44px !important; min-width:0 !important;
 height:44px !important; min-height:44px !important; padding:0 !important;
 margin:0 !important; line-height:1 !important; letter-spacing:0 !important;
 text-indent:0 !important; appearance:none;
}
#cg-atlas-v1 .cg-atlas-chronoscope select { min-width:0; max-width:100%; height:44px; margin:0; }
#cg-atlas-v1 .cg-atlas-chronoscope input[type=range] { display:block; min-width:0; max-width:100%; height:44px; padding:0; margin:0; }
@container (max-width:560px) {
 #cg-atlas-v1 .cg-atlas-chrono-main { grid-template-columns:44px minmax(0,1fr) 44px; }
 #cg-atlas-v1 .cg-atlas-era-wrap { grid-column:1 / -1; grid-row:1; }
 #cg-atlas-v1 .cg-atlas-range-wrap { grid-column:2; grid-row:2; }
 #cg-atlas-v1 #cg-atlas-prev { grid-column:1; grid-row:2; }
 #cg-atlas-v1 #cg-atlas-next { grid-column:3; grid-row:2; }
}

/* Corpus élargi : couleurs pour toutes les familles de marqueurs. */
#cg-atlas-v1 .cg-marker { min-width:34px !important; max-width:34px !important; min-height:34px !important; padding:0 !important; background:#6f6559; }
#cg-atlas-v1 .cg-marker[data-theme="peuplement"] { background:#547451; }
#cg-atlas-v1 .cg-marker[data-theme="production"] { background:#8a682e; }
#cg-atlas-v1 .cg-marker[data-theme="societe"] { background:#596374; }
#cg-atlas-v1 .cg-marker[data-theme="milieux"] { background:#3c7568; }
#cg-atlas-v1 .cg-marker[data-theme="religion"] { background:var(--cg-plum); }
#cg-atlas-v1 .cg-marker[data-theme="guerre"] { background:var(--cg-wine); }
#cg-atlas-v1 .cg-marker[data-theme="archeologie"] { background:var(--cg-ochre); }
#cg-atlas-v1 .cg-marker[data-theme="reseaux"] { background:var(--cg-blue); }
#cg-atlas-v1 .cg-marker[data-theme="territoires"] { background:#7d5836; }
