/* ============================================================
   ATLAS RISING — feuille de style (v2, refonte premium éditoriale)
   Direction : broadsheet international (FT / NYT / Le Monde) posé sur
   une identité visuelle marocaine — Sahara fixe en arrière-plan, voile
   crème translucide, lion comme unique signature de marque.
   Titres : Libre Baskerville — Corps : Inter — Nav/labels : IBM Plex Sans
   ============================================================ */

:root{
  --overlay:    #F8F5EF;
  --ink:        #111111;
  --ink-soft:   #666666;
  --red:        #B61C1C;
  --red-dark:   #8F1616;
  --border:     #D8D2C8;
  --illus-bg:   #EDE3CE;
  --gold:       #F2C572;

  --footer-sand-1: #855B33;
  --footer-sand-2: #6B4426;
  --footer-sand-3: #48301A;
  --footer-ink:     #F7EEDD;
  --footer-ink-soft:#EAD9BC;

  --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-nav:     'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-card: 0 18px 40px -22px rgba(17,17,17,.4);
  --shadow-soft: 0 20px 45px -26px rgba(17,17,17,.3);
  --ease: cubic-bezier(.2,.8,.2,1);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  background-image: url("../img/sahara-bg.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Voile crème translucide entre l'illustration Sahara (fixe) et le contenu */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: var(--overlay);
  opacity: .85;
  z-index: 0;
  pointer-events: none;
}

header.masthead{ position: relative; z-index: 2; }
main, footer.site-footer{ position: relative; z-index: 1; }

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display:block; }
button{ font: inherit; }
::selection{ background: var(--red); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.wrap{ max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Masthead ---------- */
.masthead{
  border-bottom: 2px solid var(--red);
}
.masthead-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}
.masthead-side{ display:flex; align-items:center; gap:22px; flex:1; min-width:0; }
.masthead-left{ flex-direction: column; align-items: flex-start; gap: 10px; justify-content:center; }
.masthead-left-row{ display:flex; align-items:center; gap: 22px; }
.masthead-right{ justify-content:flex-end; }

.brand-badge{
  display:inline-block;
  background: var(--red);
  color: #fff;
  font-family: 'IBM Plex Sans Condensed', var(--font-nav);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 3px 11px;
  border-radius: 2px;
}

.masthead-logo{ flex-shrink:0; display:inline-flex; }
.masthead-logo img{
  width: 116px; height: 116px; object-fit: contain;
  transition: transform .3s var(--ease);
}
.masthead-logo:hover img{ transform: scale(1.06) rotate(-2deg); }

.date-strip{
  font-family: var(--font-nav);
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.social-row{ display:flex; align-items:center; gap: 18px; }
.social-row a{ color: var(--ink-soft); display:inline-flex; transition: color .2s, transform .2s; }
.social-row a:hover{ color: var(--red); transform: translateY(-2px); }

.icon-btn{
  display:flex; align-items:center; gap:8px;
  background:none; border:none; cursor:pointer;
  font-family: var(--font-nav); font-size: 13px; font-weight:500;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-soft); padding: 8px 4px;
  transition: color .2s;
}
.icon-btn:hover{ color: var(--red); }
#account-label{
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-newsletter{
  display:inline-flex; align-items:center; gap:9px;
  background: var(--red); color:#fff;
  font-family: var(--font-nav); font-size: 13px; font-weight:600;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 13px 24px; border-radius: 3px;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.btn-newsletter:hover{ background: var(--red-dark); transform: translateY(-1px); }

.nav-row{ position:relative; display:flex; align-items:center; border-top: 1px solid var(--border); }
.nav-toggle{
  display:none;
  align-items:center; justify-content:center;
  background:none; border:none; color:var(--ink); cursor:pointer;
  padding: 10px 8px;
}
.nav{
  display:flex; flex:1; justify-content:center;
  gap: 32px; flex-wrap:wrap;
  padding: 12px 0;
  font-family: var(--font-nav);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.nav a{
  position:relative;
  color: var(--ink-soft);
  padding-bottom: 8px;
  display:inline-flex; align-items:center; gap:6px;
  transition: color .2s;
}
.nav a::after{
  content:"";
  position:absolute; left:0; right:100%; bottom:0;
  height:2px; background: var(--red);
  transition: right .28s var(--ease);
}
.nav a:hover, .nav a.active{ color: var(--red); }
.nav a:hover::after, .nav a.active::after{ right:0; }
.nav-icon{ flex-shrink:0; vertical-align:-2px; }

/* ---------- Bande d'actualités défilante ---------- */
.news-ticker{
  display:flex;
  align-items:stretch;
  background: transparent;
  color: var(--ink);
  overflow:hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.news-ticker-label{
  flex-shrink:0;
  display:flex;
  align-items:center;
  font-family: var(--font-nav);
  font-size: 11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  background: transparent;
  color: var(--red);
  padding: 0 16px;
  white-space:nowrap;
  border-right: 1px solid rgba(17,17,17,.15);
}
.news-ticker-track{
  display:flex;
  flex:1;
  min-width:0;
  overflow:hidden;
}
.news-ticker-list{
  display:flex;
  align-items:center;
  flex-shrink:0;
  white-space:nowrap;
  animation: news-ticker-scroll 75s linear infinite;
}
.news-ticker:hover .news-ticker-list{ animation-play-state: paused; }
.news-ticker-list a{
  display:flex;
  align-items:center;
  gap:7px;
  color: var(--ink);
  text-decoration:none;
  font-family: var(--font-nav);
  font-size: 13px;
  font-weight:500;
  opacity:.85;
  padding: 8px 24px;
  border-right: 1px solid rgba(17,17,17,.15);
}
.news-ticker-list a:hover{ opacity:1; color: var(--red); text-decoration:underline; }
.ticker-icon{ flex-shrink:0; color: var(--red); }
@keyframes news-ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce){
  .news-ticker-list{ animation: none; }
}

/* ---------- Recherche (overlay) ---------- */
.search-overlay{
  display:none;
  position: fixed; inset: 0;
  background: rgba(17,17,17,.55);
  z-index: 100;
  padding: 90px 20px 20px;
}
.search-overlay.is-open{ display:block; }
.search-panel{
  max-width: 620px;
  margin: 0 auto;
  background: var(--overlay);
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  overflow: hidden;
}
.search-panel-head{
  display:flex; align-items:center; gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.search-panel-head input{
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
}
.search-panel-head input:focus{ outline: none; }
.search-close{
  background:none; border:none; cursor:pointer;
  color: var(--ink-soft); padding: 4px;
  transition: color .2s;
}
.search-close:hover{ color: var(--red); }
.search-results{ max-height: 60vh; overflow-y: auto; }
.search-result{
  display:flex; flex-direction:column; gap: 4px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.search-result:last-child{ border-bottom: none; }
.search-result:hover{ background: rgba(182,28,28,.06); }
.search-result-category{
  font-family: var(--font-nav);
  font-size: 10.5px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.search-result-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

/* ---------- Compte (connexion / inscription) ---------- */
.account-overlay{
  display:none;
  position: fixed; inset: 0;
  background: rgba(17,17,17,.55);
  z-index: 100;
  padding: 90px 20px 20px;
}
.account-overlay.is-open{ display:block; }
.account-panel{
  max-width: 380px;
  margin: 0 auto;
  background: var(--overlay);
  border-radius: 10px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  padding: 28px 28px 32px;
  position: relative;
}
.account-close{
  position: absolute; top: 16px; right: 16px;
  background:none; border:none; cursor:pointer;
  color: var(--ink-soft); padding: 4px;
  transition: color .2s;
}
.account-close:hover{ color: var(--red); }
.account-tabs{
  display:flex; gap: 4px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--border);
}
.account-tab{
  flex:1;
  background:none; border:none; cursor:pointer;
  font-family: var(--font-nav); font-size: 13px; font-weight:600;
  color: var(--ink-soft);
  padding: 0 0 12px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.account-tab.active{ color: var(--red); border-bottom-color: var(--red); }
.account-form{ display:flex; flex-direction:column; gap: 12px; }
.account-form[hidden]{ display:none; }
.account-form input{
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
.account-form input:focus{ outline: 2px solid var(--red); outline-offset: 1px; }
.account-form button{
  background: var(--red); color:#fff; border:none; border-radius:6px;
  padding: 12px; font-family: var(--font-nav); font-size: 14px; font-weight:600;
  cursor:pointer; transition: background .2s;
  margin-top: 4px;
}
.account-form button:hover:not(:disabled){ background: var(--red-dark); }
.account-form button:disabled{ opacity:.7; cursor:default; }
.account-error{
  font-family: var(--font-nav); font-size: 12.5px; color: var(--red);
  margin: 0;
}
.account-logged-in-title{
  font-family: var(--font-nav); font-size: 12px; color: var(--ink-soft);
  margin: 0 0 4px; text-transform:uppercase; letter-spacing:.05em;
}
.account-email-display{
  font-family: var(--font-display); font-size: 18px; color: var(--ink);
  margin: 0 0 20px; word-break: break-all;
}
.account-logout-btn{
  background: none; border: 1.5px solid var(--border); border-radius:6px;
  padding: 11px 20px; font-family: var(--font-nav); font-size: 13px; font-weight:600;
  color: var(--ink); cursor:pointer; transition: all .2s;
}
.account-logout-btn:hover{ border-color: var(--red); color: var(--red); }
.search-empty{
  padding: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Layout ---------- */
.layout{
  display:grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  padding: 56px 0 88px;
  align-items: start;
}
@media (max-width: 860px){
  .layout{ grid-template-columns: 1fr; }
}

/* ---------- Hero / lead story ---------- */
.hero{ position: relative; margin-bottom: 64px; }
.hero-media-link{ display:block; }
.hero-media{
  position:relative;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  background: var(--illus-bg);
  display:flex; align-items:center; justify-content:center;
  color: var(--ink-soft);
  font-family: var(--font-nav);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-card);
}
.hero-media.has-image{ background:none; }
.hero-media img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition: transform .6s var(--ease);
}
.hero:hover .hero-media img{ transform: scale(1.045); }

.eyebrow{
  display:inline-block;
  font-family: var(--font-nav);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  line-height: 1.14;
  letter-spacing: -.2px;
  margin: 0 0 16px;
  max-width: 720px;
}
.hero h1 a{ transition: color .2s; }
.hero:hover h1 a{ color: var(--red); }
.hero p.dek{
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 620px;
}
.meta{
  font-family: var(--font-nav);
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---------- Liste d'articles ---------- */
.grid-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  border-left: 4px solid var(--red);
  padding-left: 16px;
  line-height: 1.2;
  margin: 0 0 34px;
}
.article-list{ display:flex; flex-direction:column; }
.list-item{
  position: relative;
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.article-list .list-item:first-child{ border-top:none; }
@media (max-width: 620px){
  .list-item{ grid-template-columns: 1fr; }
}
.list-media-link{ display:block; }
.list-media{
  position:relative;
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--illus-bg);
  display:flex; align-items:center; justify-content:center;
  color: var(--ink-soft);
  font-family: var(--font-nav);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: var(--shadow-card);
}
.list-media.has-image{ background:none; }
.list-media img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition: transform .5s var(--ease);
}
.list-item:hover .list-media img{ transform: scale(1.06); }
.list-item h3{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 25px;
  line-height: 1.2;
  margin: 8px 0 10px;
}
.list-item h3 a{ transition: color .2s; }
.list-item:hover h3 a{ color: var(--red); }
.list-item p{
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
  max-width: 520px;
}

/* ---------- Sidebar ---------- */
.side-block{ padding-bottom: 8px; margin-bottom: 40px; }
.side-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  border-left: 4px solid var(--red);
  padding-left: 14px;
  margin: 0 0 20px;
}
.side-item{
  display:flex; gap: 16px; align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  transition: transform .2s var(--ease);
}
.side-item:first-child{ border-top:none; padding-top:0; }
.side-item:hover{ transform: translateX(4px); }
.side-num{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}
.side-item-body{ display:flex; flex-direction:column; gap:5px; min-width:0; }
.side-item-body a{
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  transition: color .2s;
}
.side-item:hover a{ color: var(--red); }
.side-time{
  font-family: var(--font-nav);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ---------- Newsletter (bloc sidebar) ---------- */
.newsletter-card{
  background: #fff;
  border-radius: 10px;
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
}
.newsletter-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}
.newsletter-card p{
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 18px;
}
.newsletter-form{ display:flex; flex-direction:column; gap: 10px; }
.newsletter-form input{
  font-family: var(--font-body);
  font-size: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--overlay);
  color: var(--ink);
  transition: border-color .2s;
}
.newsletter-form input:focus{ outline:none; border-color: var(--red); }
.newsletter-form button{
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.newsletter-form button:hover{ background: var(--red-dark); transform: translateY(-1px); }
.newsletter-form button:disabled{ opacity:.7; cursor:default; transform:none; }

/* ---------- Podcast (sidebar) : cover pleine largeur, lecteur incrusté ---------- */
.podcast-card{
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
  line-height: 0; /* évite un filet d'espace sous l'image */
}
.podcast-cover{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.podcast-player{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  background: transparent;
  padding: 6px 8px;
  color-scheme: dark;
}
.podcast-player::-webkit-media-controls-enclosure{ background: transparent; }
.podcast-player::-webkit-media-controls-panel{ background: transparent; }

.ad-slot{
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--ink-soft);
  font-family: var(--font-nav);
  font-size: 11px;
  text-align:center;
  padding: 40px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Page Matchs du jour ---------- */
.matches-page{ padding: 56px 0 88px; max-width: 760px; }
.matches-updated{
  font-family: var(--font-nav);
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: -18px 0 28px;
}
.match-list{ display:flex; flex-direction:column; gap: 18px; }
.match-card{
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
}
.match-competition{
  font-family: var(--font-nav);
  font-size: 11px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 14px;
}
.match-row{ display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap: 16px; }
.match-team{ display:flex; align-items:center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 15px; }
.match-team-b{ justify-content: flex-end; text-align: right; }
.match-crest{ width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.match-center{ display:flex; flex-direction:column; align-items:center; gap: 6px; min-width: 90px; }
.match-score{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.match-time{
  font-family: var(--font-nav);
  font-size: 13px;
  color: var(--ink-soft);
}
.match-status{
  font-family: var(--font-nav);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
}
.match-status-live{
  background: var(--red);
  color: #fff;
  position: relative;
  padding-left: 18px;
}
.match-status-live::before{
  content:"";
  position:absolute; left:8px; top:50%;
  width:6px; height:6px; margin-top:-3px;
  border-radius:50%; background:#fff;
  animation: match-pulse 1.4s ease-in-out infinite;
}
@keyframes match-pulse{
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.match-status-ended{ background: var(--illus-bg); color: var(--ink-soft); }
.match-status-scheduled{ background: transparent; border: 1px solid var(--border); color: var(--ink-soft); }
.matches-empty, .matches-note{
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 14px;
}
.matches-note{ margin-top: 28px; font-size: 12.5px; font-style: italic; }
@media (max-width: 520px){
  .match-row{ grid-template-columns: 1fr; text-align:center; gap: 10px; }
  .match-team-b{ justify-content:center; text-align:center; }
}

/* ---------- Article page ---------- */
.article-head{ padding: 52px 0 8px; max-width: 720px; }
.article-head h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.14;
  margin: 16px 0;
}
.article-media{ max-width: 680px; }
.article-body{
  max-width: 680px;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
}
.article-body p{ margin: 0 0 24px; }
.article-body a{ color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.tag-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 28px; }
.tag{
  font-family: var(--font-nav);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 13px;
  transition: border-color .2s, color .2s;
}
.tag:hover{ border-color: var(--red); color: var(--red); }

/* ---------- Static/legal pages ---------- */
.page-body{
  max-width: 680px;
  padding: 52px 0 84px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.75;
}
.page-body h1{ font-family: var(--font-display); font-weight: 700; font-size: 38px; margin-bottom: 24px; color: var(--ink); }
.page-body h2{ font-family: var(--font-display); font-weight: 700; font-size: 20px; margin: 34px 0 12px; color: var(--red); }

/* ---------- Footer ---------- */
.site-footer{
  margin-top: 64px;
  background: linear-gradient(160deg, var(--footer-sand-1) 0%, var(--footer-sand-2) 45%, var(--footer-sand-3) 100%);
  color: var(--footer-ink);
}
.footer-top{
  display:grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.footer-brand{ display:flex; flex-direction:column; gap: 14px; }
.footer-logo{ display:flex; align-items:center; gap: 12px; }
.footer-logo img{ width:40px; height:40px; object-fit:contain; }
.footer-wordmark{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .3px;
  color: var(--footer-ink);
}
.footer-wordmark .accent{ color: var(--gold); }
.footer-slogan{
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--footer-ink-soft);
  max-width: 220px;
  line-height: 1.5;
  margin: 0;
}
.social-row-footer{ display:flex; gap: 14px; margin-top: 6px; }
.social-row-footer a{ color: var(--footer-ink); transition: color .2s, transform .2s; }
.social-row-footer a:hover{ color: var(--gold); transform: translateY(-2px); }

.footer-col{ display:flex; flex-direction:column; gap: 10px; }
.footer-col-title{
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--footer-ink);
  margin-bottom: 6px;
}
.footer-col a{ font-family: var(--font-body); font-size: 13.5px; color: var(--footer-ink-soft); transition: color .2s; }
.footer-col a:hover{ color: #fff; }

.footer-newsletter p{
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--footer-ink-soft);
  line-height: 1.5;
  margin: 0 0 14px;
}
.newsletter-form-compact{ flex-direction: row; }
.newsletter-form-compact input{
  flex: 1;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
}
.newsletter-form-compact input::placeholder{ color: var(--footer-ink-soft); }
.newsletter-form-compact input:focus{ border-color: var(--gold); }
.newsletter-form-compact button{ flex-shrink: 0; }

.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.22);
  padding: 22px 0 30px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap: 12px;
  font-family: var(--font-nav);
  font-size: 12px;
  color: var(--footer-ink-soft);
}
.footer-links{ display:flex; gap:20px; flex-wrap:wrap; }
.footer-links a{ color: var(--footer-ink-soft); transition: color .2s; }
.footer-links a:hover{ color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .footer-top{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px){
  .nav-toggle{ display:flex; }

  .news-ticker-label{ font-size: 10px; padding: 0 10px; }
  .news-ticker-list a{ font-size: 12px; padding: 7px 16px; }

  /* Bandeau haut compact : date+réseaux / logo / recherche+newsletter
     sur une seule ligne, au lieu de l'empilement large façon desktop. */
  .wrap{ padding: 0 16px; }
  .masthead-top{
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 14px 0;
    gap: 8px;
  }
  .masthead-side{ flex: 1 1 0; min-width: 0; }
  .masthead-left{ flex-direction: row; align-items: center; gap: 8px; }
  .masthead-left-row{ flex-direction: row; gap: 8px; }
  .date-strip{ display: none; }
  .brand-badge{ font-size: 10px; padding: 2px 7px; letter-spacing: .8px; }
  .social-row{ gap: 10px; }
  .social-row svg{ width: 15px; height: 15px; }

  .masthead-logo{ order: 0; }
  .masthead-logo img{ width: 48px; height: 48px; }

  .masthead-right{ gap: 8px; }
  .icon-btn-label{ display:none; }
  .icon-btn{ padding: 6px; }
  .btn-newsletter{ padding: 8px 10px; }
  .btn-newsletter-label{ display: none; }

  .nav-row{ justify-content:center; padding: 2px 0; }
  .nav{
    display:none;
    position:absolute; left:0; right:0; top:100%;
    flex-direction:column; flex-wrap:nowrap;
    align-items:flex-start; justify-content:flex-start; gap:0;
    background: var(--overlay);
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px -16px rgba(17,17,17,.25);
    z-index: 20;
  }
  .nav.is-open{ display:flex; }
  .nav a{ width:100%; padding: 12px 0; }
  .nav a::after{ display:none; }

  .hero h1{ font-size: 28px; }
  .hero p.dek{ font-size: 16px; }
  .article-head h1{ font-size: 28px; }
  .article-head{ padding: 32px 0 8px; }
  .article-body{ font-size: 16.5px; }
  .grid-title{ font-size: 20px; margin-bottom: 24px; }
  .layout{ padding: 36px 0 56px; gap: 40px; }
  .list-item{ padding: 24px 0; gap: 18px; }
  .list-item h3{ font-size: 21px; }
  .footer-top{ grid-template-columns: 1fr; padding: 40px 0 28px; gap: 28px; }
  .site-footer{ margin-top: 40px; }
}
@media (max-width: 480px){
  .masthead-logo img{ width: 42px; height: 42px; }
  .brand-badge{ display: none; }
  .social-row svg{ width: 14px; height: 14px; }
  .social-row{ gap: 8px; }
}

/* ============================================================
   Atlas Quiz
   ============================================================ */

/* ---------- Carte promo (page d'accueil) ---------- */
.quiz-promo-card{
  position:relative;
  display:block;
  min-height: 340px;
  border-radius:10px;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
  margin: 28px 0 40px;
  text-decoration:none;
  color:inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.quiz-promo-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-card); }
.quiz-promo-bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  z-index:0;
}
.quiz-promo-overlay{
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 22%);
  z-index:1;
}
.quiz-promo-body{
  position:absolute; inset:0; z-index:2;
  display:flex;
  align-items:flex-end;
  padding: 28px 32px 32px;
}
.quiz-promo-body .eyebrow{ color: var(--gold); }
.quiz-promo-body h2{ font-family: var(--font-display); font-size:28px; margin: 6px 0 10px; color:#fff; }
.quiz-promo-body p{ font-family: var(--font-body); color: rgba(255,255,255,.88); font-size:15px; line-height:1.5; max-width:520px; margin:0 0 18px; }
.quiz-promo-cta{
  display:inline-flex; align-items:center; gap:6px;
  background: var(--red); color:#fff;
  font-family: var(--font-nav); font-size:13px; font-weight:600;
  padding: 10px 18px; border-radius:5px;
  transition: background .2s, transform .2s;
}
.quiz-promo-card:hover .quiz-promo-cta{ background: var(--red-dark); transform: translateX(2px); }

/* ---------- Page /quiz : en-tête + badges ---------- */
.quiz-page{ padding: 44px 0 64px; }
.quiz-hero{ text-align:center; max-width:640px; margin:0 auto 36px; }
.quiz-hero h1{ font-family: var(--font-display); font-size:44px; margin: 10px 0 12px; }
.quiz-subtitle{ font-family: var(--font-body); color: var(--ink-soft); font-size:17px; line-height:1.5; margin:0 0 26px; }
.quiz-badges{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.quiz-badge{
  width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:22px;
  background: var(--illus-bg);
  border: 1px solid var(--border);
  filter: grayscale(1); opacity:.4;
  transition: all .2s var(--ease);
}
.quiz-badge.is-earned{
  filter:none; opacity:1;
  background: linear-gradient(135deg, var(--gold), var(--red));
  box-shadow: 0 4px 12px -4px rgba(182,28,28,.5);
}

#quiz-login-gate[hidden], #quiz-ranks[hidden], #quiz-player[hidden], #quiz-result[hidden]{ display:none; }

/* ---------- Grille des rangs ---------- */
.quiz-ranks{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:18px;
  max-width:1080px;
  margin:0 auto;
}
.quiz-rank-card{
  display:flex; flex-direction:column;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:22px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.quiz-rank-card.is-unlocked:hover{ transform: translateY(-3px); box-shadow: var(--shadow-card); }
.quiz-rank-card.is-locked{ opacity:.55; filter:grayscale(.6); }
.quiz-rank-card.is-completed{ border-color: var(--gold); }
.quiz-rank-icon{ font-size:34px; margin-bottom:10px; }
.quiz-rank-name{ font-family: var(--font-display); font-size:19px; margin:0 0 6px; }
.quiz-rank-desc{ font-family: var(--font-body); color: var(--ink-soft); font-size:13.5px; line-height:1.4; margin:0 0 14px; min-height:38px; }
.quiz-rank-progress{ display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.quiz-rank-progress-track{ flex:1; height:6px; border-radius:3px; background: var(--border); overflow:hidden; }
.quiz-rank-progress-fill{ height:100%; background: var(--red); transition: width .4s var(--ease); }
.quiz-rank-progress-label{ font-family: var(--font-nav); font-size:11px; color: var(--ink-soft); flex-shrink:0; }
.quiz-rank-status{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; gap:10px; }
.quiz-rank-badge-state{ font-size:16px; }
.quiz-rank-play{
  background: var(--red); color:#fff; border:none; border-radius:5px;
  padding:9px 20px; font-family: var(--font-nav); font-size:13px; font-weight:600;
  cursor:pointer; transition: background .2s;
}
.quiz-rank-play:hover:not(:disabled){ background: var(--red-dark); }
.quiz-rank-play:disabled{ background: var(--ink-soft); cursor:not-allowed; opacity:.6; }

/* ---------- Écran de jeu ---------- */
.quiz-player{ max-width:680px; margin:0 auto; }
.quiz-player-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:12px; }
.quiz-exit{
  background:none; border:1px solid var(--border); border-radius:50%;
  width:34px; height:34px; cursor:pointer; color:var(--ink-soft); font-size:16px; flex-shrink:0;
}
.quiz-exit:hover{ color: var(--red); border-color: var(--red); }
.quiz-player-meta{ display:flex; gap:16px; font-family: var(--font-nav); font-size:13px; font-weight:600; color: var(--ink); }
.quiz-timer{
  font-family: var(--font-nav); font-weight:700; font-size:15px; color: var(--ink);
  background: var(--illus-bg); padding:5px 12px; border-radius:20px; flex-shrink:0;
}
.quiz-timer.is-urgent{ color:#fff; background: var(--red); animation: quiz-pulse 1s infinite; }
@keyframes quiz-pulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); } }
.quiz-progress-track{ height:6px; background: var(--border); border-radius:3px; overflow:hidden; margin-bottom:24px; }
.quiz-progress-fill{ height:100%; background: var(--red); transition: width .3s var(--ease); }
.quiz-question-card{
  background:#fff; border:1px solid var(--border); border-radius:12px;
  padding:32px; box-shadow: var(--shadow-soft);
}
.quiz-question-category{
  display:inline-block; font-family: var(--font-nav); font-size:11px; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em; color: var(--red);
  background: var(--illus-bg); padding:4px 10px; border-radius:4px; margin-bottom:14px;
}
.quiz-question-text{ font-family: var(--font-display); font-size:24px; line-height:1.35; margin:0 0 24px; }
.quiz-answers{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.quiz-answer-btn{
  text-align:left; padding:14px 16px; border-radius:8px;
  border:1.5px solid var(--border); background:#fff;
  font-family: var(--font-body); font-size:15px; color: var(--ink);
  cursor:pointer; transition: all .15s var(--ease);
}
.quiz-answer-btn:hover:not(:disabled){ border-color: var(--red); background: var(--illus-bg); }
.quiz-answer-btn:disabled{ cursor:default; }
.quiz-answer-btn.is-correct{ border-color:#2e8b45; background:#e6f6ea; color:#1c5c2b; animation: quiz-flash-green .5s; }
.quiz-answer-btn.is-wrong{ border-color: var(--red); background:#fbe7e7; color: var(--red-dark); animation: quiz-flash-red .5s; }
@keyframes quiz-flash-green{ from{ transform:scale(1.03); } }
@keyframes quiz-flash-red{ from{ transform:scale(.97); } }
.quiz-explanation{
  margin-top:20px; padding:14px 16px; border-radius:8px;
  background: var(--illus-bg); font-family: var(--font-body); font-size:14px; color: var(--ink-soft); line-height:1.5;
}

/* ---------- Écrans de fin ---------- */
.quiz-login-gate{ display:flex; justify-content:center; padding: 30px 0; }
.quiz-login-gate-card{
  text-align:center; max-width:420px; width:100%; background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:44px 32px; box-shadow: var(--shadow-card);
}
.quiz-login-gate-icon{ font-size:48px; margin:0 0 12px; }
.quiz-login-gate-card h2{ font-family: var(--font-display); font-size:24px; margin:0 0 12px; }
.quiz-login-gate-card p{ font-family: var(--font-body); font-size:14.5px; color: var(--ink-soft); line-height:1.5; margin:0 0 22px; }

.quiz-result{ display:flex; justify-content:center; padding: 30px 0; }
.quiz-result-card{
  text-align:center; max-width:420px; width:100%; background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:44px 32px; box-shadow: var(--shadow-card);
  animation: quiz-pop .4s var(--ease);
}
@keyframes quiz-pop{ from{ opacity:0; transform: translateY(12px) scale(.97); } to{ opacity:1; transform:none; } }
.quiz-result-icon{ font-size:56px; margin-bottom:12px; }
.quiz-result-card h2{ font-family: var(--font-display); font-size:26px; margin:0 0 14px; }
.quiz-result-badge{ display:flex; align-items:center; justify-content:center; gap:10px; font-family: var(--font-nav); font-weight:600; margin-bottom:14px; }
.quiz-result-badge-icon{ font-size:30px; }
.quiz-result-score{ font-family: var(--font-body); font-size:16px; color: var(--ink-soft); margin:0 0 6px; }
.quiz-result-threshold{ font-family: var(--font-body); font-size:13.5px; color: var(--ink-soft); margin:0 0 20px; }
.quiz-btn-primary{
  background: var(--red); color:#fff; border:none; border-radius:6px;
  padding:12px 28px; font-family: var(--font-nav); font-size:14px; font-weight:600;
  cursor:pointer; margin-top:10px; transition: background .2s, transform .2s;
}
.quiz-btn-primary:hover{ background: var(--red-dark); transform: translateY(-1px); }

@media (max-width: 700px){
  .quiz-promo-card{ min-height:260px; }
  .quiz-promo-body{ padding:20px 22px 24px; }
  .quiz-promo-body h2{ font-size:24px; }
  .quiz-hero h1{ font-size:32px; }
  .quiz-subtitle{ font-size:15px; }
  .quiz-answers{ grid-template-columns: 1fr; }
  .quiz-question-card{ padding:20px; }
  .quiz-question-text{ font-size:20px; }
  .quiz-player-meta{ font-size:12px; gap:10px; }
  .quiz-result-card{ padding:32px 22px; }
}
