/* ===========================
   STYLE MODERNE - MODE SOMBRE
   =========================== */

/* RESET BASE */
html { background-color: #121212; }
body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: #121212; /* assure le mode sombre */
  color: #EAEAEA;
}

/* Liens */
a {
  color: #03DAC6;
  text-decoration: none;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}
a:hover, a:focus {
  color: #00BFA5;
  border-bottom: 1px solid #00BFA5;
}

/* Titres */
h1, h2, h3 {
  font-weight: 600;
  margin: 1rem 0;
  color: #FFFFFF;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

/* Sections & blocs (tuiles) avec plus de contraste et variantes accent */
:root{
  --tile-bg:#171717;
  --tile-border:#2A2A2A;
  --tile-hover:#1F1F1F;
}
section{ background: transparent; box-shadow:none; padding: 0; }
.grid-4 > div, .grid-2-1 > div, .grid-1-2 > div {
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  padding: 1.25rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.grid-4 > div:hover, .grid-2-1 > div:hover, .grid-1-2 > div:hover{
  background: var(--tile-hover);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
  transform: translateY(-1px);
}

/* Variantes accentuées */
.tile-accent { position: relative; }
.tile-accent--orange { border-color: #CFCFCF !important; box-shadow: 0 8px 24px rgba(255,255,255,0.12); }
.tile-accent--cyan   { border-color: #03DAC6 !important; box-shadow: 0 8px 24px rgba(3,218,198,0.15); }
.tile-accent--pink   { border-color: #ff6ea8 !important; box-shadow: 0 8px 24px rgba(255,110,168,0.15); }
.tile-youtube        { border-color: #E53935 !important; }
.tile-ad             { min-height: 120px; display: grid; place-items: center; }
.tile-ad::before     { content: "Publicité"; font-size: .75rem; color: #9aa0a6; position: absolute; top: .6rem; right: .8rem; }

/* Éviter les tuiles vides */
.grid-4 > div:empty, .grid-2-1 > div:empty, .grid-1-2 > div:empty {
  display: none;
}
ins.adsbygoogle:empty { display:none !important; }

figure{ margin: .5rem 0 0 0; }

/* Images */
img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Boutons */
button, .btn, input[type="submit"] {
  background: #2A2A2A;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border: 1px solid #3A3A3A;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
button:hover, .btn:hover, input[type="submit"]:hover {
  background: #3A3A3A;
  border-color: #4A4A4A;
}

/* Footer */
footer {
  background: #1E1E1E;
  color: #AAA;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid #2C2C2C;
}
footer a { color: #03DAC6; }
footer a:hover { color: #00BFA5; }

/* ===== NAV MODERNE + BURGER ===== */
.navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #0F0F10;
  border-bottom: 1px solid #242424;
  backdrop-filter: saturate(120%) blur(6px);
}

.navigation ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.2rem);
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

.navigation li { margin: 0; padding: 0; }

.navigation a {
  --link-fg: #EAEAEA;
  --link-accent: #03DAC6;
  color: var(--link-fg);
  text-decoration: none;
  font-weight: 500;
  padding: .5rem .9rem;
  border-radius: 999px;
  position: relative;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
  outline: none;
}
.navigation a::after{
  content:"";
  position:absolute; left:12px; right:12px; bottom:8px; height:2px;
  background:var(--link-accent);
  transform:scaleX(0); transform-origin:left;
  transition:transform .25s ease;
}
.navigation a:hover,
.navigation a:focus-visible { color:#fff; background:#1E1E1E; box-shadow: inset 0 0 0 1px #2C2C2C; }
.navigation a:hover::after,
.navigation a:focus-visible::after { transform:scaleX(1); }

.navigation a[aria-current="page"],
.navigation .is-active { color:#fff; background:#222; box-shadow: inset 0 0 0 1px #2E2E2E; }

/* Burger button */
.nav-toggle{
  display:none;
  position:fixed;
  right:12px; top:12px;
  z-index:1100;
  width:44px; height:44px;
  border:0; border-radius:10px;
  background:#1a1a1a;
  box-shadow:0 2px 10px rgba(0,0,0,.35);
}
.nav-toggle .nav-toggle-bar{
  display:block; width:24px; height:2px; margin:6px auto;
  background:#EAEAEA; border-radius:2px;
  transition:transform .25s ease, opacity .2s ease;
}

/* Mobile */
@media (max-width: 768px){
  .nav-toggle{ display:block; }

  .navigation ul{
    display:block;
    max-height:0;
    overflow:hidden;
    transition:max-height .3s ease;
    padding:0; margin:0;
  }
  .navigation ul.is-open{ max-height:70vh; }

  .navigation li{ border-top:1px solid #242424; }
  .navigation a{
    display:block;
    padding:1rem 1.25rem;
    border-radius:12px;
    margin:.25rem .5rem;
  }
}

/* Animation du burger quand menu ouvert */
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(2){ opacity:0; }
body.nav-open .nav-toggle .nav-toggle-bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }
/* Tuile Revenu Préservation */
.tile-revenu {
  position: relative;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.tile-revenu__link { display: block; color: inherit; text-decoration: none; }
.tile-revenu__media { position: relative; margin: 0; line-height: 0; }
.tile-revenu__media img { width: 100%; height: auto; display: block; }

.tile-revenu__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px 18px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.65) 100%);
  display: grid;
  gap: 6px;
}

.tile-revenu__eyebrow {
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .9;
}
.tile-revenu__title {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 800;
  line-height: 1.1;
}
.tile-revenu__desc {
  font-size: .95rem;
  opacity: .95;
}

.btn.btn-ghost {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(2px);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.tile-revenu:hover .btn-ghost { transform: translateY(-1px); background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.8); }

/* Option : sur grille, la tuile peut s'étendre sur 2 colonnes en desktop */
@media (min-width: 900px){
  .grid-4 > .tile-revenu { grid-column: span 2; }
}
/* Embed YouTube responsive */
.video-embed {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
/* fallback anciens navigateurs */
.video-embed::before { content: ""; display: block; padding-top: 56.25%; } /* 16:9 */
.video-embed > iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
/* si aspect-ratio est supporté, on simplifie */
@supports (aspect-ratio: 16 / 9) {
  .video-embed { aspect-ratio: 16 / 9; }
  .video-embed::before { display: none; padding-top: 0; }
}

/* optionnel : limite la largeur en desktop et centre */
.tile-youtube .video-embed { max-width: 720px; margin-inline: auto; }
