/* ------------------------------------------------------------------
   Site de présentation de Boutodio
   ------------------------------------------------------------------ */

:root {
  /* Variables attendues par le composant (voir boutodio-setup / textandcolors) */
  --fontSize: 100%;
  --outline-min: 2px;
  --outline-ratio: .12em;
  --outline-max: 8px;

  /* Charte du site */
  --bleu: #265283;
  --bleu-fonce: #1a3a5e;
  --encre: #1c2430;
  --gris: #5b6675;
  --ligne: #d9dee5;
  --fond: #f6f7f9;
  --blanc: #ffffff;
}

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

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--encre);
  background: var(--fond);
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--encre);
  color: var(--blanc);
  padding: .5rem 1rem;
}

.skip:focus {
  left: 1rem;
  z-index: 10;
}

.notice {
  margin: 0;
  padding: .75rem 1.25rem;
  background: #fff3cd;
  color: #5c4400;
  border-bottom: 1px solid #e6c65a;
  text-align: center;
}

a {
  color: var(--bleu);
}

code,
kbd,
pre {
  font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  font-size: .92em;
}

code {
  background: #e9edf2;
  padding: .05em .35em;
  border-radius: .3em;
}

kbd {
  display: inline-block;
  border: 1px solid var(--ligne);
  border-bottom-width: 2px;
  border-radius: .3em;
  background: var(--blanc);
  padding: 0 .4em;
  line-height: 1.5;
}

pre {
  background: #1f2933;
  color: #e8edf3;
  padding: 1rem 1.25rem;
  border-radius: .6rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

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

.hero {
  background: var(--bleu);
  color: var(--blanc);
  padding-block: 3rem 3.5rem;
}

.hero .brand {
  margin: 0 0 .5rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  opacity: .8;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.02em;
}

.hero .tagline {
  margin: .75rem 0 0;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  opacity: .92;
}

/* ---- Sections ------------------------------------------------------ */

main {
  padding-block: 2.5rem 1rem;
}

section {
  margin-bottom: 4rem;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 .75rem;
  color: var(--bleu-fonce);
}

h3.sub {
  margin: 2.25rem 0 .5rem;
  font-size: 1.2rem;
}

.lead {
  color: var(--gris);
  max-width: 48rem;
  margin: 0 0 1.5rem;
}

.intro p {
  max-width: 48rem;
}

.points {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .75rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.points li {
  border-left: 3px solid var(--bleu);
  padding-left: .75rem;
}

.demo-solo {
  margin: 1.75rem 0;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
}

/* ---- Cartes façon journal ----------------------------------------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.card {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: .75rem;
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
}

.card .rubrique {
  margin: 0 0 .4rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--textColor);
}

.card h3 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  line-height: 1.25;
  font-family: Georgia, "Times New Roman", serif;
}

.card .meta {
  margin: 0 0 .75rem;
  font-size: .8rem;
  color: var(--gris);
}

.card p:last-child {
  margin: .9rem 0 0;
  font-size: .95rem;
  color: #2f3946;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pad {
  flex: 1 1 16rem;
  padding: 1rem;
  border-radius: .75rem;
}

.list {
  display: grid;
  gap: .75rem;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
}

/* ---- Grand format -------------------------------------------------- */

.big {
  border-radius: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.theme-name {
  margin: 0 0 .75rem;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
}

.reglages {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(15rem, 1fr) 2fr;
  align-items: start;
}

@media (max-width: 48rem) {
  .reglages {
    grid-template-columns: 1fr;
  }
}

.setup-frame {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-size: 1.15rem;
}

.setup {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 40rem;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: .75rem;
}

th,
td {
  text-align: left;
  padding: .55rem .9rem;
  border-bottom: 1px solid var(--ligne);
}

th {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gris);
}

tr:last-child td {
  border-bottom: 0;
}

footer {
  padding-block: 2rem 3rem;
  color: var(--gris);
  font-size: .9rem;
  border-top: 1px solid var(--ligne);
}

/* ------------------------------------------------------------------
   Le composant : tailles
   La hauteur d'un bouton vaut 3em de sa propre font-size.
   ------------------------------------------------------------------ */

.bt {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--textColor);
}

/* Le titre de l'article est en « nowrap » dans le composant : les éléments de grille ou de
   flex qui contiennent un bouton doivent pouvoir devenir plus étroits que ce titre. */
.cards > *,
.list > *,
.row > *,
.reglages > * {
  min-width: 0;
}

.bt-s {
  font-size: 13px;        /* ~ 39 px de haut : la taille d'un bouton « écouter » de journal */
  max-width: 22rem;
}

.bt-m {
  font-size: 18px;        /* ~ 54 px de haut */
}

.bt-l {
  font-size: 22px;        /* ~ 66 px de haut */
}

.bt-xl {
  font-size: 30px;        /* ~ 90 px de haut : le grand format de audio.vocalepresse.com */
}

@media (max-width: 40rem) {
  .bt-xl {
    font-size: 24px;
  }
}

/* ------------------------------------------------------------------
   Le composant : couleurs
   --textColor      : fond du bouton lecture, texte, contour de focus
   --textBackground : icône lecture / pause
   --fill-color     : partie écoutée de la barre de progression
   --empty-color    : partie restante de la barre
   ------------------------------------------------------------------ */

.c-vocale {
  --textColor: #265283;
  --textBackground: #ffffff;
  --fill-color: #265283;
  --empty-color: #b0c7dd;
}

.c-noir {
  --textColor: #111111;
  --textBackground: #ffffff;
  --fill-color: #111111;
  --empty-color: #c9c9c9;
}

.c-rouge {
  --textColor: #b3261e;
  --textBackground: #ffffff;
  --fill-color: #b3261e;
  --empty-color: #f1c6c3;
}

.c-vert {
  --textColor: #1b6b3a;
  --textBackground: #ffffff;
  --fill-color: #1b6b3a;
  --empty-color: #bfe0cb;
}

.c-vocale-inv {
  --textColor: #ffffff;
  --textBackground: #265283;
  --fill-color: #ffffff;
  --empty-color: #7d9bc2;
  background: #265283;
  color: #ffffff;
}

.c-noir-inv {
  --textColor: #ffffff;
  --textBackground: #111111;
  --fill-color: #ffffff;
  --empty-color: #6f6f6f;
  background: #111111;
  color: #ffffff;
}

.c-rouge-inv {
  --textColor: #ffffff;
  --textBackground: #b3261e;
  --fill-color: #ffffff;
  --empty-color: #e08d87;
  background: #b3261e;
  color: #ffffff;
}

.c-jaune-noir {
  --textColor: #ffff00;
  --textBackground: #000000;
  --fill-color: #ffff00;
  --empty-color: #7a7a00;
  background: #000000;
  color: #ffff00;
}

.c-noir-jaune {
  --textColor: #000000;
  --textBackground: #ffff00;
  --fill-color: #000000;
  --empty-color: #a8a800;
  background: #ffff00;
  color: #000000;
}

.c-bleu-beige {
  --textColor: #0000cc;
  --textBackground: #e2b88d;
  --fill-color: #0000cc;
  --empty-color: #b08a6a;
  background: #e2b88d;
  color: #0000cc;
}

/* Suit le thème choisi dans <boutodio-setup> (variables posées sur <html>) */
.theme-user {
  --fill-color: var(--textColor);
  --empty-color: color-mix(in srgb, var(--textColor) 45%, var(--textBackground));
  background: var(--textBackground);
  color: var(--textColor);
  border: 1px solid var(--ligne);
}
