/* =====================================================================
   MELYSONG - styles
   Couleurs reprises de l'application Bubble. Pour en changer une,
   modifie sa valeur ici (bloc :root) : elle change partout.
   ===================================================================== */
@font-face { font-family: "Ubuntu"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/ubuntu-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("fonts/ubuntu-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/ubuntu-latin-700-normal.woff2") format("woff2"); }

:root {
  --bleu: #32A9ED;      /* Primary */
  --vert: #02C9A5;      /* Primary contrast */
  --rouge: #D62755;     /* Surface */
  --orange: #E69C24;    /* Alert */
  --violet: #8631D6;    /* À apprendre */
  --gris: #BDBDBD;      /* Success (gris) */
  --texte: #343742;
  --fond: #FFFFFF;
  --bleu-pale: #E8F6FD;
  --vert-pale: #E3FAF6;
  --orange-pale: #FDF3E1;
  --rouge-pale: #FBE9EE;
  --rayon: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px; line-height: 1.5;
}
a { color: var(--bleu); }
img { max-width: 100%; height: auto; }

/* --- En-tête et pied ------------------------------------------------ */
.entete { max-width: 980px; margin: 0 auto; padding: 12px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { width: 150px; display: block; }
.nav-haut { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pied { max-width: 980px; margin: 40px auto 24px; padding: 16px; text-align: center; font-size: 14px;
  border-top: 1px solid var(--gris); }
.pied nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.pied a { color: var(--texte); font-weight: 700; text-decoration: none; }
.pied a:hover { text-decoration: underline; }

main { max-width: 980px; margin: 0 auto; padding: 8px 16px; min-height: 50vh; }
.chargement { text-align: center; color: var(--gris); margin-top: 60px; }

/* --- Titres ---------------------------------------------------------- */
h1 { color: var(--bleu); font-size: 2rem; text-align: center; margin: 24px 0 12px; line-height: 1.2; }
h2 { color: var(--vert); font-size: 1.25rem; margin: 22px 0 8px; }
h3 { color: var(--bleu); margin: 16px 0 6px; }
.accroche { text-align: center; color: var(--orange); font-weight: 700; font-size: 1.1rem; }
.signature { text-align: center; }
.sous-titre { text-align: center; color: var(--bleu); font-weight: 700; font-size: 1.3rem; margin: 4px 0; }
.infos-chanson { text-align: center; font-weight: 500; color: var(--bleu); margin: 2px 0; }

/* --- Boutons --------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font: inherit; font-weight: 700;
  font-size: 14px; color: var(--bleu); background: var(--bleu-pale); border: 1px solid var(--bleu);
  border-radius: var(--rayon); cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { filter: brightness(0.96); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-vert { color: var(--vert); background: var(--vert-pale); border-color: var(--vert); }
.btn-orange { color: var(--orange); background: var(--orange-pale); border-color: var(--orange); }
.btn-rouge { color: var(--rouge); background: var(--rouge-pale); border-color: var(--rouge); }
.btn-large { padding: 10px 18px; font-size: 16px; }
.lien-bouton { background: none; border: 0; color: var(--bleu); text-decoration: underline; font: inherit;
  font-weight: 700; cursor: pointer; padding: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0; }
.retour { text-align: right; margin: 10px 0; }

/* --- Formulaires ----------------------------------------------------- */
.carte { max-width: 460px; margin: 24px auto; padding: 22px; border: 1px solid var(--bleu); border-radius: 14px; }
.carte-large { max-width: 720px; }
.champ { margin: 12px 0; }
.champ label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.champ input[type="text"], .champ input[type="email"], .champ input[type="password"],
.champ input[type="number"], .champ select, .champ textarea {
  width: 100%; padding: 9px 10px; font: inherit; color: var(--texte); background: #fff;
  border: 1px solid var(--gris); border-radius: var(--rayon); }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 2px solid var(--bleu); outline-offset: 1px; }
.champ textarea { min-height: 150px; resize: vertical; }
.champ-case { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.champ-case input { margin-top: 4px; }
.mdp { display: flex; gap: 6px; }
.mdp input { flex: 1; }
.aide { font-size: 13px; color: #6b6f7d; margin: 4px 0 0; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.msg { padding: 10px 12px; border-radius: var(--rayon); margin: 12px 0; font-size: 15px; }
.msg-ok { background: var(--vert-pale); border: 1px solid var(--vert); }
.msg-erreur { background: var(--rouge-pale); border: 1px solid var(--rouge); color: #8c1033; }
.msg-info { background: var(--bleu-pale); border: 1px solid var(--bleu); }
.msg-alerte { background: var(--orange-pale); border: 1px solid var(--orange); }
.alerte { max-width: 980px; margin: 8px auto 0; padding: 0 16px; }
.alerte:empty { display: none; }
.centre { text-align: center; }
.zone-danger { margin-top: 26px; padding: 14px; border: 1px solid var(--rouge); border-radius: 12px; text-align: center; }
.zone-danger h3 { color: var(--rouge); }

/* --- Tableau de bord ------------------------------------------------- */
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 150px)); gap: 14px;
  justify-content: center; margin: 22px 0; }
.tuile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 92px; padding: 10px; text-align: center; font-weight: 700; font-size: 14px; text-decoration: none;
  color: var(--bleu); background: var(--bleu-pale); border: 1px solid var(--bleu); border-radius: 12px; }
.tuile .icone { display: flex; line-height: 1; }
.tuile .icone .ico { width: 32px; height: 32px; stroke-width: 1.7; }
.tuile.desactivee { color: #8d92a3; background: #f4f5f8; border-color: var(--gris); cursor: default; }
.bonjour { text-align: center; color: var(--vert); font-weight: 700; font-size: 1.25rem; margin-top: 28px; }

/* --- Recherche et résultats ------------------------------------------ */
.filtres { border: 1px solid var(--bleu); border-radius: 12px; padding: 14px; margin: 14px 0; }
.filtres .grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.cases { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; font-size: 14px; }
.cases label { display: flex; align-items: center; gap: 6px; }
.plus-filtres { margin: 6px 0 4px; }
.plus-filtres summary { display: inline-block; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--bleu);
  background: var(--bleu-pale); border: 1px solid var(--bleu); border-radius: var(--rayon); padding: 7px 14px; }
.plus-filtres[open] summary { margin-bottom: 10px; }
.compte { font-weight: 700; margin: 10px 0 4px; }
.table-scroll { overflow-x: auto; }
table.liste { width: 100%; border-collapse: collapse; }
table.liste th { text-align: left; font-size: 14px; padding: 6px 8px; border-bottom: 2px solid var(--gris); }
table.liste td { padding: 6px 8px; border-bottom: 1px solid #e6e8ee; }
table.liste td.num, table.liste th.num { text-align: right; white-space: nowrap; }
table.liste td.icones { white-space: nowrap; width: 1%; }
table.liste a { color: var(--texte); text-decoration: none; font-weight: 500; }
table.liste a:hover { color: var(--bleu); text-decoration: underline; }
.pagination { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pagination input { width: 64px; text-align: center; padding: 6px; font: inherit; border: 1px solid var(--gris); border-radius: var(--rayon); }
.legende { font-size: 13px; color: #6b6f7d; text-align: center; margin: 12px 0; }

/* --- Page d'une chanson ---------------------------------------------- */
.paroles { white-space: pre-wrap; font-size: 15px; line-height: 1.45; margin: 18px 0; padding: 4px 2px; }
.paroles .verifiees { color: var(--bleu); font-weight: 500; }
.paroles-vide { text-align: center; color: #6b6f7d; font-style: italic; }
.bloc-dates { background: #f1f2f6; border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.bloc-dates h3 { text-align: center; }
.bloc-dates ol { padding-left: 28px; margin: 8px 0; font-size: 14px; }
.bloc-dates li.mc { font-weight: 700; }
.bloc-dates .stats { font-size: 14px; margin-top: 10px; }
.bloc-dates .stats p { margin: 2px 0; }

@media (max-width: 560px) {
  h1 { font-size: 1.6rem; }
  .logo { width: 110px; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .carte { padding: 16px; }
  /* sur téléphone, on masque la colonne « Mots » pour que le tableau tienne à l'écran */
  table.liste th:nth-child(5), table.liste td:nth-child(5) { display: none; }
}

/* --- Icônes ---------------------------------------------------------- */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn .ico { width: 1.1em; height: 1.1em; vertical-align: middle; }
.pastille { display: inline-flex; margin-right: 4px; vertical-align: middle; }
.pastille .ico { width: 19px; height: 19px; }
.p-teal { color: var(--vert); }
.p-orange { color: var(--orange); }
.p-rouge { color: var(--rouge); }
.p-gris { color: var(--gris); }
.p-plein .ico { fill: currentColor; }
.icones-chanson { display: flex; gap: 12px; justify-content: center; margin: 10px 0; }
.icones-chanson .pastille { margin: 0; }
.icones-chanson .pastille .ico { width: 30px; height: 30px; }
.cases label .ico { width: 18px; height: 18px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.element-legende { display: inline-flex; align-items: center; gap: 2px; }
.bloc-dates li .ico { width: 16px; height: 16px; vertical-align: -0.2em; }
.pagination .btn { min-width: 40px; justify-content: center; }
.mdp .btn { min-width: 44px; justify-content: center; }
