/* ===========================================================================
   AdNow
   Palette : noir #000000 · fond clair #EDEDF0 · texte #19191D · accent #FD366E
   =========================================================================== */

:root {
  --black: #000000;
  --bg: #EDEDF0;
  --ink: #19191D;
  --accent: #FD366E;
  --white: #FFFFFF;

  --ink-70: rgba(25, 25, 29, .70);
  --ink-55: rgba(25, 25, 29, .55);
  --ink-12: rgba(25, 25, 29, .12);

  /* Teinte de fin du dégradé du titre, reprise par la ligne 2. */
  --hero-title-end: #FFE7EE;

  --header-h: 64px;
  --btn-h: 33px;
  --maxw: 1160px;
  --gutter: 24px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }

/* Texte reserve aux lecteurs d'ecran. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Typographie ---------- */

h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
p { margin: 0; }

.muted { color: var(--ink-55); }

/* ---------- Structure ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px; top: 16px; z-index: 50;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: 10px;
}

/* ---------- Boutons ---------- */

/* Hauteur unique pour tous les boutons du site : seule la largeur change. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h);
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .85rem; font-weight: 600; letter-spacing: -.01em;
  line-height: 1;
  cursor: pointer; text-align: center;
  white-space: nowrap;
}

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: #e52a61; }

.btn--lg { padding-inline: 22px; }

/* ---------- En-tête ---------- */

/* La nav reprend le traitement du hero : meme largeur 7xl, meme rayon.
   Elle defile avec la page. La marge basse cree l'espace avec le hero. */
.header {
  width: min(80rem, 100% - 32px);
  margin: 12px auto 16px;

  background: var(--black);
  border-radius: 24px;
}

/* Padding resserre : le logo et le bouton longent le bord du bloc.
   On neutralise le max-width de .container, qui sinon recentrerait le
   contenu a 1160px et ajouterait 60px de vide de chaque cote. */
.header .container {
  max-width: none;
  padding-inline: 14px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

/* Le logo est une image au fond noir aplati : elle se fond dans la barre. */
.header .logo { display: inline-flex; }

.header .logo img {
  width: auto;
  height: 26px;
}

/* ---------- Hero ---------- */

/* ---------- Bloc sombre, partage par le hero et le listing ---------- */

/* 7xl = 80rem au maximum, avec une gouttiere de 16px en dessous. */
.block {
  position: relative;
  width: min(80rem, 100% - 32px);
  margin-inline: auto;

  background: var(--black);
  color: var(--white);
  overflow: hidden;
  border-radius: 24px;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(44px, 6vw, 72px) clamp(44px, 6vw, 76px);
}

/* Grille de points en fond. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 38%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 38%, #000 55%, transparent 100%);
  pointer-events: none;
}

.hero__inner { position: relative; text-align: center; }

/* Bandeau promotionnel, au-dessus de l'accroche. */
.promo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(18px, 2.5vw, 26px);
  padding: 5px 14px 5px 5px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  font-size: .8rem;
}

.promo__tag {
  padding: 3px 10px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.promo__text {
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .promo { font-size: .74rem; }
  .promo__text { white-space: normal; text-align: left; }
}

.hero__title {
  font-size: clamp(1.95rem, 4.6vw, 3.4rem);
  line-height: 1.16;
  max-width: 27ch;
  margin-inline: auto;
}

/* Sur mobile, 5px de moins : a 31.2px le "to" de la premiere ligne passait
   seul a la ligne suivante. En dessous de ~365px la taille devient fluide,
   sinon la coupure revient sur les petits ecrans. */
@media (max-width: 560px) {
  .hero__title {
    font-size: clamp(1.3rem, 7.2vw, calc(1.95rem - 5px));
  }
}

.hero__line { display: block; }

/* Ligne 1 : part de la teinte de finition, vire au rose au milieu, y revient.
   La boîte épouse le texte, donc les extrémités tombent exactement sur le
   premier et le dernier caractère, à toutes les largeurs. */
.hero__line--gradient {
  font-weight: 700;
  letter-spacing: -.045em;
  width: fit-content;
  margin-inline: auto;
  background: linear-gradient(
    96deg,
    var(--hero-title-end) 0%,
    #ffb3cb 26%,
    var(--accent) 50%,
    #ffb3cb 74%,
    var(--hero-title-end) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Ligne 2 : exactement la teinte sur laquelle s'achève la ligne 1. */
.hero__line--soft {
  font-weight: 700;
  letter-spacing: -.045em;
  color: var(--hero-title-end);
}

.hero__actions {
  display: flex;
  justify-content: center;
  margin-top: clamp(22px, 3vw, 32px);
}

.hero__alert,
.hero__empty {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .7);
  font-size: .9rem;
}

/* ---------- Cartes de sites (180px) ---------- */

/* Petit libelle au-dessus des cartes du hero. */
.sites__label {
  margin-top: clamp(32px, 5vw, 48px);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.sites__label + .sites { margin-top: 14px; }

.sites {
  list-style: none;
  margin: clamp(32px, 5vw, 48px) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Hero : on borne la liste a 4 cartes par rangee (4 + 4 + 2 pour 10 cartes).
   4 x 180px + 3 x 12px de gouttiere = 756px. */
.hero .sites {
  max-width: 756px;
  margin-inline: auto;
}

/* 180px tant qu'il y a la place, sinon la moitie de la rangee moins la
   gouttiere : deux cartes tiennent cote a cote a toutes les largeurs.
   A 430px, un 180px fixe n'entrait plus qu'une fois par rangee. */
.site {
  width: min(180px, calc(50% - 6px));

  /* Duree alignee sur la constante FONDU de script.js. */
  transition: opacity .35s ease;
}

/* Etat porte par le script pendant l'echange de deux cartes. */
.site.is-fading { opacity: 0; }

.site__link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  height: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 14px;
  text-align: left;
}

.site__link:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .28);
}

.site__icon {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  background: var(--white);
  object-fit: contain;
  padding: 3px;
}

.site__icon--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: 0;
}

.site__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.site__name {
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--white);
  line-height: 1.25;

  /* Une seule ligne, comme la categorie : toutes les cartes conservent
     exactement la meme hauteur, quelle que soit la largeur d'ecran. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site__desc {
  font-size: .72rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, .55);

  /* Exactement deux lignes, reservees meme si le texte est plus court :
     toutes les cartes gardent ainsi la meme hauteur. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.site__cat {
  margin-top: 2px;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--accent);

  /* Une seule ligne : une categorie longue ne doit pas rallonger la carte. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Listing complet ---------- */

.directory {
  margin-top: 16px;
  padding-block: clamp(36px, 4.5vw, 56px);
}

/* Deux colonnes : filtres a gauche, cartes a droite.
   220px + 28px de gouttiere laissent 984px a droite, soit 5 cartes
   de 180px (948px) par rangee. */
.directory__layout {
  /* On libere le max-width de .container : sinon le listing est ramene a
     1160px et la colonne de droite tombe a 864px, soit 4 cartes au lieu de 5. */
  max-width: none;

  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* --- Colonne de gauche --- */

/* Un <input> a une largeur intrinseque (attribut size) qui peut depasser sa
   colonne et mordre sur les cartes. min-width: 0 a chaque niveau, plus
   l'attribut size="1" sur le champ, supprime ce plancher. */
.filters {
  min-width: 0;
}

.filters__row {
  display: flex;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

/* Bouton d'ouverture des categories : visible seulement sous 900px,
   ou le panneau est replie. */
.filters__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
}

.filters__toggle:hover { border-color: rgba(255, 255, 255, .4); }

.filters__toggle[aria-expanded="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.filters__field {
  display: flex;
  align-items: center;
  gap: 9px;

  /* Base 0 + grow : la largeur vient de la colonne, jamais du contenu.
     Sans cela le champ prenait la largeur intrinseque de l'<input>, qui peut
     depasser la colonne et mordre sur les cartes. */
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;

  height: 40px;
  padding-inline: 14px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  color: rgba(255, 255, 255, .5);
}

.filters__field:focus-within { border-color: rgba(255, 255, 255, .4); }

.filters__field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: .88rem;
  color: var(--white);
}

.filters__field input::placeholder { color: rgba(255, 255, 255, .42); }
.filters__field input::-webkit-search-cancel-button { display: none; }

.filters__title {
  margin: 24px 0 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
}

.filters__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.filters__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: rgba(255, 255, 255, .68);
  font-size: .85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.filters__cat > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filters__cat:hover { background: rgba(255, 255, 255, .06); color: var(--white); }

.filters__cat.is-active {
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
}

.filters__n {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
}

.filters__cat.is-active .filters__n { color: var(--white); }

/* --- Colonne de droite --- */

.results__count {
  margin-bottom: 14px;
  font-size: .82rem;
}

/* Les cartes s'alignent a gauche dans la colonne, sans largeur imposee. */
.results .sites {
  justify-content: flex-start;
  margin-top: 0;
}

.results__empty { margin-top: 4px; }

/* Sous 900px, la colonne de gauche passe au-dessus et les categories
   deviennent une rangee de pastilles. */
@media (max-width: 900px) {
  .directory__layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filters__row { max-width: 440px; margin-inline: auto; }

  .filters__toggle { display: inline-flex; }

  /* Les categories sont repliees : c'est l'icone qui les revele. */
  .filters__panel { display: none; }
  .filters.is-open .filters__panel { display: block; }

  .filters__title { margin-top: 16px; text-align: center; }

  .filters__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .filters__cat {
    width: auto;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
    padding: 7px 13px;
  }

  .results .sites { justify-content: center; }
  .results__count { text-align: center; }
}

/* ---------- About et Contact ---------- */

.about {
  margin-top: 16px;
  padding-block: clamp(36px, 4.5vw, 56px);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px 48px;
  align-items: start;
}

.about__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.about__title {
  margin: 10px 0 18px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -.03em;
  max-width: 20ch;
}

.about__text p {
  font-size: .9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
  max-width: 62ch;
}

.about__text p + p { margin-top: 12px; }

/* Les faits verifiables, en liste de definitions : c'est la forme qu'un
   moteur de reponse extrait le plus facilement. */
.about__facts {
  margin: 0;
  display: grid;
  gap: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
}

.about__facts dt {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .42);
}

.about__facts dd {
  margin: 4px 0 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--white);
}

.about__facts a { color: var(--accent); }
.about__facts a:hover { text-decoration: underline; }

.contact {
  margin-top: 16px;
  padding-block: clamp(32px, 4vw, 48px);
}

.contact__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}

.contact__title {
  margin: 10px 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -.03em;
}

.contact__text {
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .62);
  max-width: 56ch;
}

@media (max-width: 820px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ (visible, et balisee en FAQPage) ---------- */

.faq {
  margin-top: 16px;
  padding-block: clamp(40px, 5vw, 60px);
}

/* Titre a gauche, questions a droite : la colonne de gauche reste visible
   pendant qu'on parcourt les reponses. */
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 28px 56px;
  align-items: start;
}

.faq__intro { position: sticky; top: 24px; }

.faq__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.faq__title {
  margin: 10px 0 14px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -.03em;
  max-width: 14ch;
}

.faq__help {
  font-size: .85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .5);
  max-width: 34ch;
}

.faq__help a { color: var(--accent); font-weight: 600; }
.faq__help a:hover { text-decoration: underline; }

.faq__list { display: grid; gap: 10px; }

.faq__item {
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  transition: border-color .18s ease, background-color .18s ease;
}

.faq__item:hover { border-color: rgba(255, 255, 255, .2); }

/* La question ouverte se detache du reste. */
.faq__item[open] {
  background: rgba(253, 54, 110, .06);
  border-color: rgba(253, 54, 110, .3);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.35;
  color: var(--white);
  cursor: pointer;
  list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }

/* Le signe est dessine en CSS : le texte de la question reste seul dans
   le DOM, donc propre a extraire pour un moteur de reponse. */
.faq__sign {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.faq__sign::before,
.faq__sign::after {
  content: "";
  position: absolute;
  inset: 50% 5px auto;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateY(-50%);
  transition: transform .18s ease, opacity .18s ease;
}

.faq__sign::after { transform: translateY(-50%) rotate(90deg); }

.faq__item[open] .faq__sign { background: rgba(253, 54, 110, .2); }
.faq__item[open] .faq__sign::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }

.faq__item p {
  padding: 0 18px 17px;
  font-size: .87rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
  max-width: 66ch;
}

@media (max-width: 860px) {
  .faq__grid { grid-template-columns: 1fr; gap: 22px; }
  .faq__intro { position: static; }
  .faq__title { max-width: none; }
  .faq__help { max-width: none; }
}

/* ---------- Tarifs ---------- */

.pricing {
  margin-top: 16px;
  padding-block: clamp(40px, 5vw, 64px);
  text-align: center;
}

.pricing__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.pricing__title {
  margin: 10px 0 clamp(28px, 4vw, 40px);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -.03em;
}

.plans {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 948px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 20px 20px;
  text-align: left;

  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
}

/* L'offre Black Friday est celle mise en avant. */
.plan--deal { border-color: var(--accent); }

.plan__badge {
  position: absolute;
  top: 0;
  left: 20px;
  transform: translateY(-50%);
  padding: 4px 11px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.plan__name {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--white);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan__amount {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--accent);
}

.plan__unit {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .5);
}

.plan__note {
  font-size: .78rem;
  color: rgba(255, 255, 255, .5);
}

.plan__features {
  list-style: none;
  margin: 4px 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: 9px;
  font-size: .82rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .78);
}

.plan__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan__features li::before {
  content: "✓";
  flex: none;
  color: var(--accent);
  font-weight: 700;
}

/* Bouton secondaire, sur fond sombre. */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .22);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .45);
}

.btn--block { width: 100%; }

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; max-width: 380px; }
}

/* ---------- Modale du Top 10 ---------- */

.modal {
  /* display:flex sur un dialog fermé gagne sur le style du navigateur
     et affiche la modale dans la page avant son ouverture. */
  display: none;
  flex-direction: column;
  width: min(640px, 100% - 32px);
  max-height: min(86vh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;

  background: #0b0b0d;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .14);
  border-top: 3px solid var(--accent);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .5);
}

.modal[open] {
  display: flex;
  animation: modal-in .32s cubic-bezier(.2, .8, .2, 1);
}

.modal::backdrop {
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(6px);
}

.modal[open]::backdrop { animation: backdrop-in .32s ease; }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(253, 54, 110, .22), transparent 55%),
    #0b0b0d;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.modal__label {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.modal__title {
  margin: 6px 0 0;
  max-width: 22ch;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.modal__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 9px;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
}

.modal__close:hover { border-color: rgba(255, 255, 255, .4); color: var(--white); }

.modal__foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 16px;
  background: #0b0b0d;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, .72);
}

.modal__foot p { margin: 0; }

/* --- Le classement --- */

.rank {
  flex: 1;
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
  display: grid;

  /* minmax(0, 1fr) + min-width sur les <li> : sans cela les elements de
     grille gardent min-width: auto et les descriptions debordent du cadre
     au lieu de se tronquer. */
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.rank__item { min-width: 0; }

.rank__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  color: inherit;
}

.rank__row:hover { background: rgba(255, 255, 255, .06); }

.rank__item--podium .rank__row {
  background: linear-gradient(90deg, rgba(253, 54, 110, .14), rgba(253, 54, 110, 0) 72%);
}

.rank__item--podium .rank__row:hover {
  background: linear-gradient(90deg, rgba(253, 54, 110, .22), rgba(255, 255, 255, .04) 72%);
}

.rank__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .55);
}

.rank__item:nth-child(1) .rank__n {
  background: var(--accent);
  color: var(--white);
}

.rank__item:nth-child(2) .rank__n {
  background: rgba(255, 255, 255, .18);
  color: var(--white);
}

.rank__item:nth-child(3) .rank__n {
  background: rgba(253, 54, 110, .35);
  color: var(--white);
}

.rank__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--white);
  object-fit: contain;
  padding: 3px;
}

.rank__item:first-child .rank__icon {
  width: 42px;
  height: 42px;
}

.rank__icon--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--white);
  font-size: .9rem;
  font-weight: 700;
  padding: 0;
}

.rank__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.rank__name {
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank__item:first-child .rank__name { font-size: 1.02rem; }

.rank__desc {
  font-size: .75rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, .52);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank__cat {
  flex: none;
  max-width: 128px;
  padding: 3px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 999px;
  background: rgba(253, 54, 110, .12);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #ff8aab;
  white-space: nowrap;
}

.rank__go {
  flex: none;
  color: rgba(255, 255, 255, .35);
  transition: color .15s ease, transform .15s ease;
}

.rank__row:hover .rank__go {
  color: var(--white);
  transform: translate(2px, -2px);
}

@media (max-width: 560px) {
  .modal__title { font-size: 1.15rem; }
  .rank__cat { display: none; }
  .modal__foot { flex-direction: column; align-items: stretch; }
  .modal__foot .btn { width: 100%; }
}

/* ---------- Modale paywall ---------- */

/* Pas de filet rose en haut : le degrade de l'en-tete suffit. */
.paywall { border-top: 1px solid rgba(255, 255, 255, .14); }

.paywall__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 20px 22px;
}

.paywall__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.paywall__amount {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--accent);
}

.paywall__was {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .35);
  text-decoration: line-through;
}

.paywall__save {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(253, 54, 110, .16);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #ff8aab;
}

.paywall__deal {
  margin-top: 8px;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .45);
}

/* Chaque avantage : l'intitule sur sa ligne, l'explication en dessous. */
.paywall__list {
  list-style: none;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: 16px;
}

.paywall__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
}

.paywall__list li::before {
  content: "✓";
  grid-row: 1 / span 2;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.4;
}

.paywall__list strong {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--white);
}

.paywall__list span {
  font-size: .82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .55);
}

/* Sous le bouton : une ligne, sans encadre. */
.paywall__after {
  flex: none;
  padding: 0 20px 18px;
  font-size: .76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .42);
}

/* ---------- Pied de page ---------- */

/* Fond noir : le logo est une image aplatie sur ce meme noir, elle s'y
   fond sans contour visible. */
.footer {
  margin-top: 16px;
  background: var(--black);
  color: rgba(255, 255, 255, .72);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 24px;
  padding-block: 28px;
}

.footer__brand img {
  width: auto;
  height: 24px;
}

.footer__tagline {
  margin-top: 8px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .5);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: .875rem;
  font-weight: 500;
}

.footer__nav a { color: rgba(255, 255, 255, .72); }
.footer__nav a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-block: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .8rem;
  color: rgba(255, 255, 255, .45);
}

/* Sur mobile, tout se centre. */
@media (max-width: 640px) {
  .footer__inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 20px;
  }

  .footer__brand img { margin-inline: auto; }

  .footer__nav { justify-content: center; }

  .footer__bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
