/* ═══════════════════════════════════════════════════════════════
   ATLAS eSIM Blog — v2
   Charge par inc/v2.php, apres style.css. Reprend l'identite de
   atlas-esim.com : bleu nuit, degrade cyan -> violet.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy: #0b1220;
  --navy-2: #131c33;
  --ink-2: #334155;
  --wrap: 1200px;

  /* Jetons de surface : le mode sombre (fin du fichier) ne redefinit que ceux-ci. */
  --card: #ffffff;
  --tint: #ecfeff;
  --tint-text: #0e7490;
  --meta: #94a3b8;
  --chip-current-bg: var(--navy);
  --chip-current-text: #ffffff;
  --all-tile-bg: var(--navy);
  --footer-bg: var(--navy);
  --hero-edge: transparent;
  --quote-border: rgba(15, 23, 42, .12);
  --icon-sun: none;
  --icon-moon: block;
}

/* ── Conteneurs ─────────────────────────────────────────────── */

.ah-wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* L'accueil n'utilise pas la boucle GeneratePress : on neutralise la
   grille flex du contenu et on laisse chaque section prendre toute la
   largeur de la fenetre. */
.atlas-home .site-content { display: block; padding: 0; }
.atlas-home #page.site { max-width: none; padding: 0; background: transparent; }

.ah-grad {
  background: var(--atlas-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ah-btn {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.ah-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ah-btn-grad { background: var(--atlas-gradient); color: #fff; box-shadow: 0 8px 24px -10px rgba(124, 58, 237, .6); }
.ah-btn-grad:hover { color: #fff; box-shadow: 0 12px 28px -10px rgba(124, 58, 237, .75); }
.ah-btn-light { background: #fff; color: var(--navy); }
.ah-btn-light:hover { color: var(--navy); }
.ah-btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.ah-btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.ah-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* ── En-tete : navigation + bouton boutique ─────────────────── */

.atlas-v2 .main-navigation .main-nav > ul { align-items: center; }

.atlas-v2 .main-navigation .menu-cta > a {
  background: var(--atlas-gradient);
  color: #fff;
  border-radius: 999px;
  line-height: 1.2;
  padding: .65rem 1.15rem;
  margin-inline-start: .6rem;
  box-shadow: 0 6px 18px -8px rgba(124, 58, 237, .6);
}
.atlas-v2 .main-navigation .menu-cta > a::after { display: none; }
.atlas-v2 .main-navigation .menu-cta > a:hover { color: #fff; filter: brightness(1.05); }

@media (max-width: 768px) {
  .atlas-v2 .main-navigation.toggled .menu-cta > a {
    display: block;
    text-align: center;
    margin: .75rem 1rem 1rem;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */

.ah-hero {
  position: relative;
  overflow: hidden;
  color: #cbd5e1;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(3rem, 5vw, 4.5rem);
  background:
    radial-gradient(55rem 28rem at 88% -12%, rgba(124, 58, 237, .38), transparent 62%),
    radial-gradient(48rem 26rem at -6% 112%, rgba(0, 212, 255, .26), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
}

/* Trame de points discrete : rappelle le globe de la boutique sans image. */
.ah-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  pointer-events: none;
}
.ah-hero .ah-wrap { position: relative; }

.ah-eyebrow {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: .35rem .9rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #e2e8f0;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ah-title {
  color: #fff;
  font-size: clamp(2.3rem, 1.3rem + 4.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 850;
  max-width: 15ch;
  margin: 0 0 1.25rem;
}

.ah-lead {
  font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
  max-width: 58ch;
  margin: 0 0 2rem;
  color: #cbd5e1;
}

.ah-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 680px;
  padding: .4rem .4rem .4rem 1.1rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}
.ah-search-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: #64748b; stroke-width: 2; stroke-linecap: round; }
.ah-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .7rem .2rem;
  font-size: 1rem;
  color: var(--text);
}
.ah-search input:focus { outline: none; }
.ah-search:focus-within { box-shadow: 0 0 0 3px rgba(0, 212, 255, .5), 0 20px 50px -20px rgba(0, 0, 0, .6); }
.ah-search button {
  flex: none;
  border: 0;
  border-radius: 999px;
  padding: .8rem 1.4rem;
  background: var(--atlas-gradient);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}

.ah-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; }
.ah-chips li { margin: 0; }
.ah-chips a {
  display: inline-block;
  padding: .4rem .9rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: #e2e8f0;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.ah-chips a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); color: #fff; }

.ah-stats { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); margin: 2.75rem 0 0; }
.ah-stats div { margin: 0; }
.ah-stats dt { color: #fff; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); font-weight: 850; letter-spacing: -.03em; line-height: 1.1; }
.ah-stats dd { margin: .2rem 0 0; font-size: .9rem; color: #94a3b8; }

/* Deux colonnes : le texte, puis un panneau de guides d'entree. */
.ah-hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

.ah-hero-panel {
  padding: 1.4rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(8px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.ah-panel-title { margin: 0 0 .9rem; color: #fff; font-weight: 800; font-size: .95rem; }
.ah-hero-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.ah-panel-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0;
  padding: .6rem;
  border-radius: 14px;
  transition: background-color .2s ease;
}
.ah-panel-item:hover { background: rgba(255, 255, 255, .07); }
.ah-panel-img { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ah-panel-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ah-panel-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.ah-panel-text a { color: #f1f5f9; font-weight: 700; font-size: .93rem; line-height: 1.35; text-decoration: none; }
.ah-panel-item:hover .ah-panel-text a { color: #fff; }
.ah-panel-meta { font-size: .78rem; color: #94a3b8; font-weight: 600; }

@media (max-width: 960px) {
  .ah-hero-grid { grid-template-columns: 1fr; }
  .ah-hero-panel { display: none; }
}

/* ── Sections ───────────────────────────────────────────────── */

.ah-section { padding-block: clamp(3.5rem, 7vw, 6rem); background: var(--bg); scroll-margin-top: 100px; }
@media (max-width: 767px) { .ah-section { scroll-margin-top: 0; } }
.ah-section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.ah-head { max-width: 760px; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.ah-head h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin: 0 0 .6rem; letter-spacing: -.03em; }
.ah-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.ah-head-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; max-width: none; }

.ah-kicker {
  margin: 0 0 .5rem !important;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--atlas-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  display: inline-block;
}

.ah-link { font-weight: 700; text-decoration: none; white-space: nowrap; }

/* ── Destinations ───────────────────────────────────────────── */

.ah-dest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 1rem;
}

/* Derniere tuile : renvoi vers le catalogue complet de la boutique. */
.ah-dest.ah-dest-all {
  justify-content: center;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.25rem;
  min-height: 100%;
  background: var(--all-tile-bg);
  border-color: var(--all-tile-bg);
  text-decoration: none;
}
.ah-dest-all-num { font-size: 2.4rem; font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.ah-dest-all-num { background: var(--atlas-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ah-dest-all-text { color: #e2e8f0; font-weight: 700; font-size: .95rem; line-height: 1.35; }
.ah-dest-all:hover .ah-dest-all-text { color: #fff; }

.ah-dest {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, border-color .25s ease;
}
.ah-dest:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }

.ah-dest-img { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.ah-dest-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.ah-dest:hover .ah-dest-img img { transform: scale(1.06); }

.ah-dest-body { padding: .85rem 1rem 1rem; }
.ah-dest h3 { font-size: 1.05rem; margin: 0 0 .35rem; letter-spacing: -.01em; }
.ah-dest h3 a { color: var(--text); text-decoration: none; }
.ah-dest-links { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin: 0; font-size: .82rem; }
.ah-dest-links a { position: relative; z-index: 2; color: var(--muted); text-decoration: none; font-weight: 600; }
.ah-dest-links a:hover { color: var(--accent); text-decoration: underline; }
.ah-dest-links .ah-dest-shop { color: var(--accent); }

/* ── Regions ────────────────────────────────────────────────── */

.ah-region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.ah-region {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--navy);
  isolation: isolate;
}
.ah-region img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.ah-region::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 18, 32, 0) 35%, rgba(11, 18, 32, .88) 100%); }
.ah-region:hover img { transform: scale(1.06); }
.ah-region-body { position: absolute; inset-inline: 0; bottom: 0; padding: 1.25rem 1.4rem; }
.ah-region h3 { margin: 0 0 .2rem; font-size: 1.5rem; }
.ah-region h3 a { color: #fff; text-decoration: none; }
.ah-region p { margin: 0; color: #cbd5e1; font-size: .9rem; font-weight: 600; }

/* ── eSIM basics : parcours numerote ────────────────────────── */

.ah-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 0; padding: 0; }

.ah-step {
  position: relative;
  counter-increment: step;
  margin: 0;
  padding: 1.25rem 1.4rem 1.25rem 4.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ah-step:hover { border-color: transparent; box-shadow: var(--shadow-lg); }
.ah-step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 1.3rem;
  top: 1.15rem;
  font-size: 1.5rem;
  font-weight: 850;
  letter-spacing: -.04em;
  background: var(--atlas-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ah-step h3 { font-size: 1.05rem; margin: 0 0 .3rem; line-height: 1.35; }
.ah-step h3 a { color: var(--text); text-decoration: none; }
.ah-step h3 a:hover { color: var(--accent); }
.ah-step p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }

/* ── Styles de voyage ───────────────────────────────────────── */

.ah-style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.ah-style {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
}
.ah-style-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--atlas-gradient);
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1rem;
}
.ah-style h3 { font-size: 1.15rem; margin: 0 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.ah-count { font-size: .72rem; font-weight: 700; color: var(--tint-text); background: var(--tint); border-radius: 999px; padding: .15em .6em; }
.ah-style > p { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; line-height: 1.55; }
.ah-style ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.ah-style li { margin: 0; border-bottom: 1px solid var(--border); }
.ah-style li a { display: block; padding: .6rem 0; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.ah-style li a:hover { color: var(--accent); }

/* ── Cartes d'articles (accueil et fin d'article) ───────────── */

.ah-grid { display: grid; gap: 1.5rem; }
.ah-grid-3 { grid-template-columns: repeat(3, 1fr); }

.ah-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
}
.ah-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ah-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.ah-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.ah-card:hover .ah-card-img img { transform: scale(1.05); }
.ah-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.ah-pill {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tint-text);
  background: var(--tint);
  border-radius: 999px;
  padding: .25em .75em;
  margin-bottom: .7rem;
}
.ah-card-title { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .5rem; letter-spacing: -.015em; }
.ah-card-title a { color: var(--text); text-decoration: none; }
.ah-card-title a::after { content: ""; position: absolute; inset: 0; }
.ah-card-title a:hover { color: var(--accent); }
.ah-card-text { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0 0 1rem; }
.ah-card-meta { margin: auto 0 0; font-size: .78rem; color: var(--meta); font-weight: 600; }

/* ── Bandeau final ──────────────────────────────────────────── */

.ah-cta {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  color: #cbd5e1;
  background:
    radial-gradient(40rem 22rem at 100% 0%, rgba(124, 58, 237, .4), transparent 60%),
    radial-gradient(36rem 22rem at 0% 100%, rgba(0, 212, 255, .22), transparent 60%),
    var(--navy);
}
.ah-cta .ah-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.ah-cta h2 { color: #fff; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); line-height: 1.1; margin: 0 0 .9rem; letter-spacing: -.03em; }
.ah-cta p { margin: 0 0 1.75rem; font-size: 1.1rem; }
.ah-cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.ah-cta-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ah-cta-points li {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
}
.ah-cta-points strong { display: block; color: #fff; margin-bottom: .15rem; }
.ah-cta-points span { font-size: .92rem; }

/* ── Fin d'article : guides lies ────────────────────────────── */

.ah-related { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.ah-related-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.ah-related-head h2 { margin: 0; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); }
.ah-related .ah-card-title { font-size: 1rem; }
.ah-related .ah-card-text { display: none; }

/* ── Cartes des archives (pages 2+, categories, recherche) ──── */

.atlas-v2:is(.blog, .archive, .search) .inside-article { padding: 0; background: transparent; }
.atlas-v2:is(.blog, .archive, .search) .inside-article > :not(.post-image) { padding-inline: 1.35rem; }
.atlas-v2:is(.blog, .archive, .search) .inside-article > .entry-header { padding-top: 1.2rem; }
.atlas-v2:is(.blog, .archive, .search) .inside-article > :last-child { padding-bottom: 1.35rem; }
.atlas-v2:is(.blog, .archive, .search) .post-image { margin: 0 !important; }
.atlas-v2:is(.blog, .archive, .search) .entry-title { font-size: 1.15rem; line-height: 1.3; }
.atlas-v2:is(.blog, .archive, .search) .entry-summary p { margin-bottom: .8rem; }
.atlas-v2:is(.blog, .archive, .search) .read-more { display: none; }
.atlas-v2:is(.blog, .archive, .search) article { background: var(--card); }

/* ── Maillage : pastilles de groupe, parcours, « tout afficher » ─ */

.ah-main { display: block; }

.ah-mesh { margin: 0 0 1.75rem; }
.ah-mesh-title {
  margin: 0 0 .7rem !important;
  font-size: .78rem !important;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted) !important;
  border: 0 !important;
  padding: 0 !important;
}
.ah-mesh ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.ah-mesh li { margin: 0; }
.ah-chip {
  display: inline-block;
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2) !important;
  font-size: .88rem !important;
  font-weight: 600 !important;
  line-height: 1.3;
  text-decoration: none !important;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
a.ah-chip:hover { border-color: var(--accent); color: var(--tint-text) !important; background: var(--tint); }
.ah-chip.is-current { background: var(--chip-current-bg); border-color: var(--chip-current-bg); color: var(--chip-current-text) !important; }

.ah-cards-title { margin-top: 2rem !important; }

.ah-steps-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 0 1.75rem; }
.ah-step-link {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text) !important;
  font-weight: 700 !important;
  line-height: 1.35;
  text-decoration: none !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ah-step-link span { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.ah-step-link.is-next { grid-column: 2; text-align: end; }
.ah-step-link:hover { border-color: transparent; box-shadow: var(--shadow-lg); }

.ah-more { margin-top: .75rem; }
.ah-more summary {
  cursor: pointer;
  font-size: .88rem;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
}
.ah-more summary::-webkit-details-marker { display: none; }
.ah-more summary::after { content: " ↓"; }
.ah-more[open] summary::after { content: " ↑"; }
.ah-more ul { margin-top: .5rem; }

.ah-also { margin: 1.5rem 0 0; color: var(--muted); font-size: .95rem; }
.ah-also a { font-weight: 700; }

@media (max-width: 600px) {
  .ah-steps-nav { grid-template-columns: 1fr; }
  .ah-step-link.is-next { grid-column: auto; text-align: start; }
  .ah-chip { font-size: .82rem !important; padding: .4rem .8rem; }
}

.ah-archive-head { padding: 1rem 0 .5rem; }
.ah-archive-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin: 0; letter-spacing: -.03em; display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.ah-archive-head h1 span { font-size: 1rem; font-weight: 700; color: var(--muted); letter-spacing: 0; }

/* Meta : point median entre les elements. */
.atlas-v2 .entry-meta .atlas-read::before,
.atlas-v2 .entry-meta .byline + .atlas-read::before { content: "·"; margin-inline: .45em; }

/* ── Pied de page ───────────────────────────────────────────── */

.atlas-v2 .site-footer { background: var(--footer-bg); border-top: 0; color: #94a3b8; }
.atlas-v2 .site-info { background: transparent; border-top: 1px solid rgba(255, 255, 255, .08); color: #64748b; font-size: .85rem; }
.atlas-v2 .site-info a { color: #94a3b8; }

.ah-footer {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2rem) 2.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.ah-footer-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-bottom: 1rem; }
.ah-footer-logo img { border-radius: 9px; }
.ah-footer-logo span { font-weight: 900; font-size: 1.15rem; letter-spacing: -.03em; color: #fff; }
.ah-footer-brand p { font-size: .92rem; line-height: 1.6; max-width: 38ch; margin: 0 0 1.25rem; }
.ah-footer-title { color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 1rem; }
.ah-footer-col ul { list-style: none; margin: 0; padding: 0; }
.ah-footer-col li { margin: 0 0 .55rem; }
.ah-footer-col a { color: #94a3b8; text-decoration: none; font-size: .92rem; }
.ah-footer-col a:hover { color: #fff; }

/* ── Tablette ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .ah-style-grid { grid-template-columns: repeat(2, 1fr); }
  .ah-region-grid { grid-template-columns: repeat(2, 1fr); }
  .ah-footer { grid-template-columns: 1fr 1fr; }
  .ah-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .ah-grid-3 { grid-template-columns: 1fr 1fr; }
  .ah-steps { grid-template-columns: 1fr; }
  .ah-cta .ah-wrap { grid-template-columns: 1fr; }
}

/* ── Mobile ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .ah-hero { padding-block: 2.75rem 2.5rem; }
  .ah-title { font-size: 2.2rem; }
  .ah-search { padding-inline-start: .9rem; }
  .ah-search button { padding: .75rem 1rem; }
  .ah-search input::placeholder { font-size: .9rem; }
  .ah-stats { gap: 1.25rem 2rem; margin-top: 2rem; }

  .ah-dest-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .ah-dest-img { aspect-ratio: 2 / 1; }
  .ah-dest-body { padding: .7rem .8rem .8rem; }
  .ah-dest h3 { font-size: .98rem; }
  .ah-dest-links { gap: .2rem .6rem; font-size: .76rem; }

  .ah-region-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .ah-region { aspect-ratio: 1 / 1; border-radius: 14px; }
  .ah-region-body { padding: .9rem; }
  .ah-region h3 { font-size: 1.1rem; }
  .ah-region p { font-size: .78rem; }

  .ah-step { padding: 1rem 1rem 1rem 3.6rem; }
  .ah-step::before { inset-inline-start: 1rem; font-size: 1.25rem; }

  .ah-style-grid,
  .ah-grid-3 { grid-template-columns: 1fr; }
  .ah-head-row { flex-direction: column; align-items: flex-start; }

  .ah-footer { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }

  .ah-dest:hover, .ah-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-dest:hover, .ah-card:hover, .ah-btn:hover { transform: none; }
  .ah-dest:hover .ah-dest-img img,
  .ah-card:hover .ah-card-img img,
  .ah-region:hover img { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   MODE SOMBRE
   Suit le reglage du systeme, sauf choix explicite du visiteur
   (bouton soleil / lune, memorise : <html data-theme="...">).

   Declarer un vrai mode sombre est aussi ce qui empeche Chrome
   Android et Samsung Internet d'assombrir le site eux-memes : leur
   inversion automatique faussait les degrades et laissait des blocs
   blancs. Seuls des jetons changent ici ; les composants les lisent.
   Le bleu nuit reprend celui de atlas-esim.com plutot qu'un noir pur.
   ═══════════════════════════════════════════════════════════════ */

:root { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #0f172a;
    --surface-2: #1e293b;
    --card: #111a2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --meta: #7d8ca5;
    --ink-2: #cbd5e1;
    --border: #1f2b44;
    --accent: #22d3ee;
    --accent-strong: #67e8f9;
    --tint: rgba(34, 211, 238, .12);
    --tint-text: #67e8f9;
    --chip-current-bg: #e2e8f0;
    --chip-current-text: #0b1120;
    --all-tile-bg: #16213a;
    --footer-bg: #070b14;
    --hero-edge: rgba(255, 255, 255, .06);
    --quote-border: rgba(148, 163, 184, .25);
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, .5), 0 24px 48px -24px rgba(0, 0, 0, .9);
    --icon-sun: block;
    --icon-moon: none;
    /* Variables de GeneratePress (en-tete, menus, formulaires, conteneurs). */
    --contrast: #e2e8f0;
    --contrast-2: #94a3b8;
    --contrast-3: #475569;
    --base: #1e293b;
    --base-2: #0b1120;
    --base-3: #0b1120;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --card: #111a2e;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --meta: #7d8ca5;
  --ink-2: #cbd5e1;
  --border: #1f2b44;
  --accent: #22d3ee;
  --accent-strong: #67e8f9;
  --tint: rgba(34, 211, 238, .12);
  --tint-text: #67e8f9;
  --chip-current-bg: #e2e8f0;
  --chip-current-text: #0b1120;
  --all-tile-bg: #16213a;
  --footer-bg: #070b14;
  --hero-edge: rgba(255, 255, 255, .06);
  --quote-border: rgba(148, 163, 184, .25);
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, .5), 0 24px 48px -24px rgba(0, 0, 0, .9);
  --icon-sun: block;
  --icon-moon: none;
  --contrast: #e2e8f0;
  --contrast-2: #94a3b8;
  --contrast-3: #475569;
  --base: #1e293b;
  --base-2: #0b1120;
  --base-3: #0b1120;
}

/* Les deux modes lisent les memes jetons : ces regles valent partout. */
body,
.site,
.site-content,
.separate-containers .inside-article,
.one-container .site-content { background-color: var(--bg); color: var(--text); }

.site-header { background-color: var(--bg); border-bottom-color: var(--border); }
.main-navigation,
.main-navigation ul ul,
.main-navigation.toggled .main-nav > ul { background-color: var(--bg); }
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.menu-toggle { color: var(--text); }
.mobile-menu-control-wrapper .menu-toggle { background-color: var(--surface); }

.ah-hero { border-bottom: 1px solid var(--hero-edge); }

.entry-content blockquote { border-inline-start-color: var(--quote-border); color: var(--ink-2); }
.entry-content hr { border-color: var(--border); background: var(--border); }
body.single .entry-content h2 { border-top-color: var(--border); }
.entry-content td { border-top-color: var(--border); }
.entry-content thead th { color: #fff; }
.entry-content figcaption,
.wp-caption-text { color: var(--muted); }
.wp-block-rank-math-toc-block a { color: var(--accent); }

input[type="search"],
input[type="text"],
input[type="email"],
textarea { background-color: var(--surface); color: var(--text); border-color: var(--border); }
.ah-search input[type="search"] { background: transparent; color: #0f172a; border: 0; }

/* Photos : un voile leger en sombre, pour qu'un ciel blanc n'eblouisse pas. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .entry-content img,
  :root:not([data-theme="light"]) .ah-card-img img,
  :root:not([data-theme="light"]) .ah-dest-img img { filter: brightness(.9); }
}
:root[data-theme="dark"] .entry-content img,
:root[data-theme="dark"] .ah-card-img img,
:root[data-theme="dark"] .ah-dest-img img { filter: brightness(.9); }

/* ── Bouton soleil / lune ───────────────────────────────────── */

.ah-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin-inline-start: .5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
  align-self: center;
}
.ah-theme-toggle:hover { border-color: var(--accent); transform: rotate(-12deg); }
.ah-theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ah-theme-toggle .i-sun { display: var(--icon-sun); }
.ah-theme-toggle .i-moon { display: var(--icon-moon); }

/* Un bouton dans le menu ordinateur, un autre a cote du burger mobile. */
.mobile-menu-control-wrapper .ah-theme-toggle { margin-inline-end: .5rem; }
@media (max-width: 768px) {
  .main-navigation:not(.mobile-menu-control-wrapper) .ah-theme-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ah-theme-toggle:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   EN-TETE COMPACT
   GeneratePress empilait 20 px de marge, une ligne de menu de 60 px
   et ses propres goutieres : 100 px de haut, et un logo decale par
   rapport au contenu. L'en-tete fait desormais 64 px et suit la meme
   colonne que les sections (--wrap, memes goutieres que .ah-wrap).
   ═══════════════════════════════════════════════════════════════ */

.atlas-v2 .inside-header {
  max-width: var(--wrap);
  margin-inline: auto;
  min-height: 64px;
  padding: .6rem clamp(1rem, 4vw, 2rem);
}

@media (min-width: 769px) {
  .atlas-v2 .inside-header { padding-block: 0; }
  .atlas-v2 .main-navigation .main-nav ul li a {
    line-height: 64px;
    padding-inline: 14px;
    font-size: .95rem;
  }
  .atlas-v2 .main-navigation .main-nav ul li a::after { bottom: 1.1em; inset-inline: 14px; }
  .atlas-v2 .main-navigation .main-nav ul li.menu-cta > a {
    line-height: 1.2;
    padding: .55rem 1.05rem;
    margin-inline-start: .5rem;
    font-size: .9rem;
  }
}

.atlas-v2 .ah-theme-toggle { width: 36px; height: 36px; }
.atlas-v2 .ah-theme-toggle svg { width: 17px; height: 17px; }

/* Burger mobile : un bouton de 44 px, pas un bloc gris de 60 px. */
.atlas-v2 .mobile-menu-control-wrapper .menu-toggle {
  line-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   PAGES HUB ET MENTION COMMERCIALE
   ═══════════════════════════════════════════════════════════════ */

.ah-hub-hero {
  position: relative;
  overflow: hidden;
  color: #cbd5e1;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--hero-edge);
  background:
    radial-gradient(48rem 24rem at 90% -20%, rgba(124, 58, 237, .35), transparent 62%),
    radial-gradient(40rem 22rem at -6% 120%, rgba(0, 212, 255, .22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
}
.ah-hub-hero .ah-title { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); max-width: 22ch; }
.ah-hub-hero .ah-lead { margin-bottom: 0; }
.ah-hub-hero .ah-lead p { margin: 0 0 .8rem; }
.ah-hub-hero .ah-lead p:last-child { margin-bottom: 0; }
.ah-hub-hero .ah-lead a { color: #67e8f9; }

/* Mention « comment nous gagnons de l'argent », pres du premier lien boutique. */
.ah-disclosure {
  margin: 0 0 1.75rem !important;
  padding: .75rem 1rem !important;
  border: 1px solid var(--border) !important;
  border-inline-start: 3px solid var(--accent) !important;
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted) !important;
  font-size: .88rem !important;
  line-height: 1.55 !important;
}
.ah-disclosure strong { color: var(--text); }
.ah-disclosure a { white-space: nowrap; }
