/* Pages de découverte du dictionnaire. Les couleurs héritent des thèmes publics. */
.collection { flex: 1; padding-bottom: clamp(2rem, 6vw, 4.5rem); }
.collection .trail { display: flex; flex-wrap: wrap; gap: .4rem .7rem; padding: 1rem 0; color: var(--text-secondary); font-size: .88rem; }
.collection .trail a { text-decoration: underline; text-underline-offset: .15em; }
.collection .headliner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .46fr); align-items: center; gap: clamp(1rem, 4vw, 3.5rem); padding: clamp(1.4rem, 5vw, 4rem); background: linear-gradient(130deg, #04231b, #113e2e 74%, #07261e); border: 1px solid var(--border-gold-green); border-radius: 1rem; color: var(--agora-ivory); }
.collection .headliner.solo { display: block; }
.collection h1, .collection h2, .collection h3 { font-family: var(--font-display); line-height: 1.06; }
.collection h1 { font-size: clamp(2.5rem, 6vw, 4.9rem); }
.collection h2 { font-size: clamp(1.75rem, 4vw, 2.55rem); margin-bottom: .64rem; }
.collection h3 { font-size: 1.6rem; }
.collection p { line-height: 1.7; }
.collection .introduction { margin-top: .75rem; max-width: 49rem; color: #f4ecda; }
.collection .headliner .sform { margin: 1.4rem 0 0; width: min(100%, 38rem); }
.collection .headliner .sform :is(input,button) { min-height: 2.75rem; }
.collection .headliner .sform-disambig { color: var(--text-primary); }
.collection .letterform { display: flex; justify-content: center; align-items: baseline; min-width: 0; color: #e6ca7b; font: 500 clamp(6rem, 20vw, 15rem)/.76 var(--font-display); }
.collection .letterform small { font-size: .54em; font-style: italic; color: #f3e6c0; }
.collection .identity, .collection .article-grid, .collection .letter-grid, .collection .discovery, .collection .reading-nav { display: grid; gap: 1rem; }
.collection .identity { grid-template-columns: repeat(3, minmax(0,1fr)); margin: 1.3rem 0; }
.collection .identity div, .collection .panel, .collection .letter-tile, .collection .discovery a { background: var(--card-solid); border: 1px solid var(--border-gold); border-radius: .8rem; padding: 1rem clamp(.95rem, 3vw, 1.75rem); }
.collection .identity dt { color: var(--text-secondary); font-size: .85rem; }
.collection .identity dd { margin: .2rem 0 0; font: 600 clamp(1.6rem, 4vw, 2rem)/1.05 var(--font-display); }
.collection .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-block: 1.25rem; align-items: stretch; }
.collection .panel > p + p { margin-top: .65rem; }
.collection .block { margin-top: clamp(1.4rem, 4vw, 2.6rem); }
.collection .letter-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 10.2rem),1fr)); }
.collection .letter-tile { display: grid; gap: .38rem; align-content: start; min-height: 11rem; transition: border-color .18s ease, background-color .18s ease; }
.collection .letter-tile:nth-child(3n+2) { background: color-mix(in srgb, var(--card-solid), var(--gold-text) 5%); }
.collection .letter-tile:hover { border-color: var(--gold-text); background: color-mix(in srgb, var(--card-solid), var(--gold-text) 9%); }
.collection .tile-char { font: 600 3.4rem/.95 var(--font-display); color: var(--gold-text); }
.collection .tile-char em { font-size: .66em; font-weight: 500; }
.collection .tile-meta, .collection .tile-cta { color: var(--text-secondary); font-size: .82rem; }
.collection .tile-cta { padding-top: .25rem; }
.collection .chips, .collection .more-links, .collection .list-controls, .collection .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.collection .chips a, .collection .more-links a, .collection .reading-nav a { padding: .58rem .78rem; border: 1px solid var(--border-gold); border-radius: .5rem; }
.collection .discovery { grid-template-columns: repeat(auto-fit,minmax(min(100%, 11rem),1fr)); }
.collection .discovery a { font-size: 1.15rem; display: grid; gap: .35rem; }
.collection .discovery small { color: var(--text-secondary); font-size: .73rem; }
.collection .reading-nav { grid-template-columns: repeat(3,minmax(0,1fr)); text-align: center; }
.collection details { border-top: 1px solid var(--border-soft); padding: .85rem 0; }
.collection summary { cursor: pointer; color: var(--text-primary); min-height: 1.75rem; }
.collection details p { padding-top: .35rem; }
.collection .source-list { margin: .45rem 0; padding-left: 1.3rem; line-height: 1.6; overflow-wrap: anywhere; }
.collection .source-list a { text-decoration: underline; text-underline-offset: .15em; }
.collection .daily { display: grid; gap: .55rem; }
.collection .daily time { color: var(--text-secondary); }
.collection .daily .daily-word { font: 600 clamp(3rem,8vw,6rem)/.95 var(--font-display); overflow-wrap: anywhere; }
.collection .daily .gbtn { justify-self: start; margin-top: .45rem; }
.collection .daily-example { font-style: italic; }
.collection label:not(.sfield) { display: grid; gap: .3rem; }
.collection input:not(.sfield input), .collection select { color: var(--text-primary); background: var(--card-solid); border: 1px solid var(--border-gold); border-radius: .35rem; min-height: 2.7rem; padding: .55rem .65rem; font: inherit; max-width: 100%; }
.collection [data-word-list] ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: .5rem; padding: 0; list-style: none; }
.collection [data-word-list] li a { display: block; padding: .52rem .6rem; min-height: 2.5rem; border-radius: .35rem; background: var(--ghost); overflow-wrap: anywhere; }
.collection .pagination button { color: var(--text-primary); background: var(--ghost); border: 1px solid var(--border-gold); border-radius: .35rem; padding: .56rem .65rem; min-height: 2.5rem; }
.collection .pagination button:disabled { opacity: .6; cursor: default; }
@media (max-width: 700px) {
  .collection .headliner { grid-template-columns: 1fr; }
  .collection .letterform { justify-content: flex-start; grid-row: 1; padding-left: .12em; font-size: clamp(5.8rem, 26vw, 8rem); }
  .collection .article-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .collection .identity { gap: .45rem; }
  .collection .identity div { padding: .7rem .5rem; overflow-wrap: anywhere; }
  .collection .list-controls > label { width: 100%; }
}

.collection .headliner .sfield { min-width: 0; }
@media (max-width: 480px) {
  .collection .headliner .sform { flex-direction: column; }
  .collection .headliner .sbtn { min-width: 0; width: 100%; }
}

.collection .headliner.letter-headliner {
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  gap: clamp(1.35rem, 4vw, 3.25rem);
  padding: clamp(1.35rem, 3.5vw, 3.25rem);
}
.collection .letter-plate {
  min-width: 0;
  margin: 0;
  align-self: center;
  justify-self: center;
  width: min(100%, 34rem);
}
.collection .letter-plate img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: .5rem;
  box-shadow: 0 .3rem 1.1rem #001b1466;
}
.collection .letter-plate figcaption {
  color: #f4ecda;
  font-size: .83rem;
  line-height: 1.48;
  margin: .65rem .25rem 0;
}
@media (max-width: 760px) {
  .collection .headliner.letter-headliner { grid-template-columns: minmax(0, 1fr); }
  .collection .letter-plate { width: min(100%, 29rem); }
}

/* Barre de thème compacte, réutilisée dans l’en-tête et le menu mobile. */
.dictionary-theme-desktop { flex: none; }
.dictionary-theme-mobile { margin-top: .8rem; }
.dictionary-theme-desktop button, .dictionary-theme-mobile button {
  min-width: 48px;
  padding-inline: 9px;
  letter-spacing: .10em;
}
.dictionary-theme-desktop button { height: 34px; }
.dictionary-theme-mobile button { height: 44px; }
.hd-in:has(.dictionary-theme-desktop) { gap: clamp(.55rem, 2vw, 1.8rem); }
.hd-in:has(.dictionary-theme-desktop) .nav { gap: clamp(.65rem, 2vw, 1.65rem); }
@media (min-width: 701px) and (max-width: 920px) {
  .hd-in:has(.dictionary-theme-desktop) .nav { margin-left: auto; gap: .6rem; }
  .hd-in:has(.dictionary-theme-desktop) .hd-auth { margin-left: 0; }
  .hd-in:has(.dictionary-theme-desktop) .hd-auth-link { padding-inline: .42rem; }
  .hd-in:has(.dictionary-theme-desktop) .hd-auth-signup { padding-inline: .5rem; }
}
@media (max-width: 700px) { .dictionary-theme-desktop { display: none; } }
.collection .letter-depth { margin-top: 1.4rem; display: grid; gap: 1rem; }
.collection .letter-depth .panel > p { max-width: 76ch; }
.collection [data-editorial] a { color: var(--gold-text); text-decoration: underline; text-underline-offset: .16em; }
@media (max-width: 480px) {
  .collection .letter-headliner .letter-plate { width: min(100%, 20rem); }
}
@media (min-width: 701px) and (max-width: 900px) {
  .hd-in:has(.dictionary-theme-desktop) .dictionary-theme-desktop,
  .hd-in:has(.dictionary-theme-desktop) .nav,
  .hd-in:has(.dictionary-theme-desktop) .hd-auth-link,
  .hd-in:has(.dictionary-theme-desktop) .hd-auth { display: none; }
  .hd-in:has(.dictionary-theme-desktop) .burger {
    position: static;
    display: flex;
    align-items: center;
    margin-left: auto;
  }
}


.theme-mobile-panel { padding: 0 0 .8rem; border-bottom: 1px solid var(--border-gold-green); }
.theme-mobile-panel p { font-size: .88rem; color: var(--on-green); }
.theme-mobile-panel .theme { margin-top: .4rem; }
.hd-in .burger .theme-menu-label { display: none; }
@media (max-width: 900px) {
  .hd-in:has(.dictionary-theme-desktop) .burger {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    width: 70px;
    height: 48px;
    padding: 2px;
  }
  .hd-in:has(.dictionary-theme-desktop) .burger img { margin: 0; width: 23px; }
  .hd-in .burger .theme-menu-label {
    display: block;
    font-size: .63rem;
    letter-spacing: .025em;
    white-space: nowrap;
    color: var(--on-green);
  }
}
.collection .pronunciation-control { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.collection .pronunciation-button {
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-gold);
  background: var(--ghost);
}
.collection .pronunciation-button[hidden] { display: none; }
.collection .pronunciation-button:is(:hover,[aria-pressed=true]) { background: var(--card-solid); border-color: currentColor; }
.collection .pronunciation-button img { width: 18px; height: 18px; }
.collection .reading-column { width: min(100%, 70ch); margin-inline: auto; }
.collection .reading-column .panel p { max-width: none; }
.collection .daily { padding: clamp(1.2rem, 3vw, 2.5rem); max-width: min(100%, 78ch); margin-inline: auto; }
.collection .daily .daily-cta { display: inline-flex; min-height: 50px; padding: .85rem clamp(1.15rem, 3vw, 2rem); text-align: center; }
.collection .daily .daily-cta::after { content: '›'; font-size: 1.25rem; line-height: 1; }
.collection .daily .pronunciation-control { margin-block: .1rem .3rem; }
.collection .evergreen { display: grid; gap: 1rem; }
@media (min-width: 701px) {
  .collection .reading-column p[data-reading] {
    text-align: justify;
    hyphens: auto;
    line-height: 1.75;
  }
}
@media (max-width: 700px) {
  .collection .daily .daily-cta { width: 100%; justify-self: stretch; }
  .collection .reading-column p[data-reading] { text-align: left; }
}
@media (max-width: 900px) {
  .hd-in:has(.dictionary-theme-desktop) .burger { align-items: center; flex: none; }
}
@media (max-width: 420px) {
  .hd-in:has(.dictionary-theme-desktop) { flex-wrap: nowrap; }
  .hd-in:has(.dictionary-theme-desktop) .brand { font-size: clamp(16px, 4.55vw, 19px); }
  .hd-in:has(.dictionary-theme-desktop) .bd { font-size: 9px; letter-spacing: .095em; }
}


/* État du thème compact affiché à côté du hamburger. */
.hd-in .burger .theme-current-icon { display: none; }
@media (max-width: 900px) {
  .hd-in:has(.dictionary-theme-desktop) .burger { flex-direction: row; width: 65px; gap: 7px; }
  .hd-in .burger .theme-current-icon { display:inline-grid; place-items:center; width: 20px; height:20px; color:#f0d283; font: 19px/1 Georgia,serif; }
  .theme-current-icon::before { content:'◐'; }
  :root[data-theme-pref="light"] .theme-current-icon::before { content:'☀'; }
  :root[data-theme-pref="agora"] .theme-current-icon::before { content:'☾'; }
}
/* Contraste du bouton de prononciation dans le thème Clair. */
:root[data-theme="light"] .collection .pronunciation-button {
  color: #513504;
  background: #fff8e4;
  border: 2px solid #785014;
}
:root[data-theme="light"] .collection .pronunciation-button img { filter: brightness(0) saturate(100%); }
:root[data-theme="light"] .collection .pronunciation-button:hover { background:#efdfb1; border-color:#513504; }
:root[data-theme="light"] .collection .pronunciation-button[aria-pressed="true"],
:root[data-theme="light"] .collection .pronunciation-button:active { background:#ddc27d; border-color:#513504; }
:root[data-theme="light"] .collection .pronunciation-button:focus-visible { outline:2px solid #513504; outline-offset:3px; }
