/* Aide « Ta propre clé TMDB et OMDb » (/cles/ et ses huit traductions) : seulement ce que site.css n'a pas déjà.
   La page part de la mise en page des pages légales (.legal) ; tout ce qui est ajouté ici est préfixé « cl- ».
   Marges et retraits en propriétés logiques, pour que la page arabe se retourne toute seule.
   Les deux schémas (page API de TMDB, e-mail d'OMDb) sont dessinés aux couleurs de Lumen : ce ne sont pas des
   captures, et rien n'y reprend le logo ni la charte de ces services. */

.legal.cl { width: min(880px, 100% - 2 * var(--gutter)); }

.cl-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 18px !important; }
.cl h1 { max-width: 15em; }

/* Les icônes en ligne (site.css met les svg en bloc). */
.cl-ico { flex: none; width: 20px; height: 20px; }

/* Les liens vers TMDB et OMDb : une petite flèche, ils s'ouvrent dans un nouvel onglet. Courts : la flèche ne part
   jamais seule à la ligne. */
.cl-ext { white-space: nowrap; }
.cl-ext svg {
  display: inline-block;
  width: .72em;
  height: .72em;
  margin-inline-start: .22em;
  vertical-align: -.02em;
}
[dir="rtl"] .cl-ext svg { transform: scaleX(-1); }

/* ---------- Pourquoi ? ---------- */

.cl-why {
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  background: linear-gradient(180deg, rgb(255 138 61 / .15), rgb(255 138 61 / .05));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 0 0 1px rgb(255 138 61 / .34);
}
.cl .cl-why p { color: #e4dad2; }

/* ---------- Les cartes (ce qui change, la mettre dans LumenTV) ---------- */

.cl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr));
  gap: 14px;
  margin-top: 22px;
}
.cl-card, .cl-qa {
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / .075), rgb(255 255 255 / .03));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .11), inset 0 0 0 1px rgb(255 255 255 / .09);
}
.cl-card { padding: 20px 22px 22px; }
.cl .cl-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.0625rem;
}
.cl-card h3 .cl-ico { color: var(--text-3); }
.cl .cl-card ul { margin-top: 12px; gap: 6px; font-size: .9375rem; }
.cl .cl-card p { margin-top: 10px; font-size: .96875rem; }
.cl-card.is-ok {
  background: linear-gradient(180deg, rgb(48 209 88 / .12), rgb(48 209 88 / .035));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 0 0 1px rgb(48 209 88 / .32);
}
.cl-card.is-ok h3 .cl-ico { color: var(--good); }
.cl .cl-card.is-ok li::marker { color: var(--good); }
.cl-card.is-way h3 .cl-ico { color: var(--light); }

.cl .cl-note { margin-top: 18px; font-size: .96875rem; }

/* ---------- Les étapes : numérotées, reliées par un fil ---------- */

.cl-steps {
  counter-reset: cl-step;
  display: grid;
  gap: 4px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.cl-steps > li {
  counter-increment: cl-step;
  position: relative;
  min-height: 52px;
  padding-block: 8px 12px;
  padding-inline-start: 54px;
  color: var(--text-2);
}
.cl-steps > li::before {
  content: counter(cl-step);
  position: absolute;
  inset-inline-start: 0;
  top: 3px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgb(255 255 255 / .14), rgb(255 255 255 / .05));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 0 0 1px rgb(255 255 255 / .14);
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cl-steps > li::after {
  content: "";
  position: absolute;
  inset-inline-start: 17.5px;
  top: 46px;
  bottom: -6px;
  width: 1px;
  background: linear-gradient(180deg, rgb(255 255 255 / .16), rgb(255 255 255 / .04));
}
.cl-steps > li:last-child::after { display: none; }

/* ---------- Les schémas ---------- */

.cl-schema {
  position: relative;
  margin: 26px 0 0;
  padding: 50px clamp(16px, 3vw, 28px) clamp(18px, 3vw, 26px);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgb(255 138 61 / .07), transparent 62%),
    rgb(0 0 0 / .26);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
}
.cl-schema-tag {
  position: absolute;
  top: 16px;
  inset-inline-start: clamp(16px, 3vw, 28px);
  padding: 2px 10px;
  border: 1px dashed rgb(255 255 255 / .28);
  border-radius: 999px;
  color: var(--text-3);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cl .cl-schema figcaption { margin-top: 16px; color: var(--text-3); font-size: .875rem; }

.cl-mono {
  font: 500 .875rem/1.5 ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .14em;
}

/* TMDB : deux champs, la clé d'API mise en avant, le jeton barré. */
.cl-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cl-field {
  min-width: 0;
  padding: 14px 16px 15px;
  border-radius: 16px;
  background: rgb(255 255 255 / .04);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
}
.cl-field-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
}
.cl-field-box {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgb(0 0 0 / .38);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
  color: var(--text-2);
}
.cl .cl-field-note { margin-top: 8px; font-size: .875rem; font-weight: 500; }
.cl-field.is-pick {
  background: rgb(255 138 61 / .08);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 34px -10px rgb(255 138 61 / .55);
}
.cl-field.is-pick .cl-ico { color: var(--light); }
.cl .cl-field.is-pick .cl-field-note { color: var(--light); }
.cl-field.is-skip { opacity: .7; }
.cl-field.is-skip .cl-ico { color: var(--poor); }
.cl-field.is-skip s { text-decoration-thickness: 2px; text-decoration-color: var(--poor); }
.cl-field.is-skip .cl-field-box {
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent);
  mask-image: linear-gradient(90deg, #000 72%, transparent);
}

/* OMDb : un e-mail, le lien d'activation puis la clé. */
.cl-mail {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: rgb(255 255 255 / .04);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
}
.cl-mail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
}
.cl-mail-head .cl-ico { color: var(--light); }
.cl-lines { display: grid; gap: 8px; padding-block: 2px 4px; }
.cl-lines i { display: block; width: 88%; height: 8px; border-radius: 4px; background: rgb(255 255 255 / .1); }
.cl-lines i + i { width: 60%; }
.cl-mail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgb(255 138 61 / .08);
  box-shadow: inset 0 0 0 1.5px rgb(255 138 61 / .55);
}
.cl-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #160b04;
  font-size: .8125rem;
  font-weight: 700;
}
.cl-mail-link { color: var(--light); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cl-mail-key { color: #fff; font-weight: 600; }
.cl-mail-key .cl-mono { color: var(--light); }
.cl-mail-note { margin-inline-start: auto; color: var(--text-2); font-size: .875rem; }

/* ---------- Questions ---------- */

.cl-qa-list { display: grid; gap: 12px; margin-top: 22px; }
.cl-qa { padding: 18px 22px 20px; }
.cl .cl-qa h3 { margin: 0; font-size: 1.0625rem; }
.cl .cl-qa p { margin-top: 6px; }

/* La mention de TMDB, en bas. */
.cl .cl-credit { margin-top: clamp(44px, 5vw, 60px); color: var(--text-3); font-size: .8125rem; }

@media (max-width: 520px) {
  .cl-steps > li { padding-inline-start: 48px; }
  /* Les 32 points de la clé tiennent sur une ligne sur un téléphone. */
  .cl-mono { font-size: .75rem; letter-spacing: .02em; }
  .cl-mail-note { margin-inline-start: 0; flex-basis: 100%; padding-inline-start: 36px; }
}
