/* ============================================================
   Sostenutoo — Annotateur de partitions PDF : styles propres à l'outil.
   Se superpose à /public/balance/balance.css (habillage commun
   crème / marine / or, classes ob-*).
   ============================================================ */

/* Les boutons de balance.css servent ici de liens : pas de soulignement. */
a.ob-btn, a.ob-btn:hover { text-decoration: none; }

/* ---------- Rythme vertical ---------- */
/* Le pied de page complet remplace la bande d'une ligne : c'est lui qui porte
   l'espace de fin, la page n'a plus besoin de 5rem de retrait bas. */
.ob-page { padding-bottom: 3.5rem; }
/* 3,5rem (prose) + 2,6rem (h2) faisaient un trou après le panneau de l'outil. */
.ob-prose > h2:first-child { margin-top: 0; }
.ob-faq details:last-child { margin-bottom: 0; }

/* ---------- Panneau de l'outil ----------
   Même largeur que .ob-prose : une seule colonne de lecture, du dépôt
   du fichier jusqu'à la FAQ. */
.an-main { max-width: 820px; padding: 1.5rem !important; }
@media (max-width: 640px) { .an-main { padding: 1rem !important; } }

/* ---------- Zone de dépôt ---------- */
.an-drop {
  display: block; width: 100%;
  border: 1.5px dashed #D9CFBB; border-radius: var(--ob-radius);
  background: radial-gradient(120% 160% at 50% -20%, #FFFFFF 0%, var(--ob-surface-2) 72%);
  padding: 3.4rem 1.5rem 3rem; text-align: center; cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.an-drop:hover, .an-drop:focus-visible {
  border-color: var(--ob-primary); outline: none;
  transform: translateY(-2px); box-shadow: var(--ob-shadow);
}
.an-drop.is-dragging {
  border-style: solid; border-color: var(--ob-primary);
  background: var(--ob-primary-soft); box-shadow: var(--ob-shadow-hover);
}
.an-drop input[type="file"] { display: none; }

.an-drop-ico {
  width: 62px; height: 62px; margin: 0 auto 1rem; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ob-accent-soft); color: var(--ob-accent); border: 1px solid #E4D3B2;
  transition: transform .18s ease;
}
.an-drop-ico svg { width: 28px; height: 28px; }
.an-drop:hover .an-drop-ico { transform: translateY(-2px); }

.an-drop-title { font-size: 1.22rem; font-weight: 700; letter-spacing: -.025em; color: var(--ob-ink); }
.an-drop-hint { font-size: .89rem; color: var(--ob-muted); font-weight: 500; margin-top: .32rem; }

/* Bandeau de glyphes : dit en un coup d'œil que l'outil est musical. */
.an-glyphs {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .35rem .8rem; margin: 1.5rem auto 0; padding-top: 1.25rem; max-width: 420px;
  border-top: 1px solid var(--ob-line-2);
}
.an-glyphs span {
  font-size: 1.05rem; line-height: 1; color: var(--ob-accent); font-weight: 600; opacity: .85;
}
.an-glyphs span.it { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-size: 1.12rem; }

/* ---------- Bandeau de réassurance ---------- */
.an-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem .55rem; margin-top: 1.15rem;
}
.an-trust span {
  display: inline-flex; align-items: center; gap: .32rem;
  font-size: .8rem; font-weight: 600; color: var(--ob-muted);
  background: var(--ob-surface-2); border: 1px solid var(--ob-line);
  border-radius: 999px; padding: .28rem .7rem .28rem .55rem;
}
.an-trust svg { width: 13px; height: 13px; color: var(--ob-green); flex-shrink: 0; }

/* ---------- Erreur ---------- */
.an-error {
  display: flex; gap: .5rem; align-items: flex-start; margin-top: 1.15rem;
  background: var(--ob-danger-soft); border: 1px solid #E6C6BE; border-radius: 11px;
  padding: .7rem .85rem; color: #8f2f20; font-size: .86rem; font-weight: 500; line-height: 1.45;
}
.an-error[hidden] { display: none; }

/* ---------- Liste des partitions déposées ---------- */
.an-files { margin-top: 1.4rem; }
.an-files[hidden] { display: none; }
.an-files-title {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  color: var(--ob-accent); margin: 0 0 .65rem; display: flex; align-items: center; gap: .6rem;
}
.an-files-title::after { content: ''; flex: 1; height: 1px; background: var(--ob-line); }

.an-files ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.pa-file {
  display: flex; align-items: center; gap: .7rem;
  background: var(--ob-surface); border: 1px solid var(--ob-line); border-radius: 12px;
  padding: .6rem .7rem .6rem .85rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.pa-file:hover { border-color: #D9CFBB; box-shadow: var(--ob-shadow-sm); }
.pa-file-icon { display: flex; flex-shrink: 0; color: var(--ob-accent); }
.pa-file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pa-file-name {
  font-size: .9rem; font-weight: 600; color: var(--ob-ink); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pa-file-size { font-size: .74rem; color: var(--ob-faint); font-weight: 500; }
.pa-file-open {
  flex-shrink: 0; font-family: inherit; font-size: .84rem; font-weight: 600; cursor: pointer;
  background: var(--ob-primary); border: 1px solid var(--ob-primary); color: #fff;
  border-radius: 10px; padding: .42rem .9rem; box-shadow: var(--ob-btn-sh);
  transition: background .15s ease, transform .15s ease;
}
.pa-file-open:hover { background: #2d3d6b; transform: translateY(-1px); }
.pa-file-remove {
  flex-shrink: 0; border: none; background: none; color: var(--ob-faint); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px; transition: color .15s ease, background .15s ease;
}
.pa-file-remove:hover { color: var(--ob-danger); background: var(--ob-danger-soft); }

/* ---------- Relance, affichée seulement après usage réel de l'outil ---------- */
.an-followup {
  margin-top: 1.4rem; border-radius: var(--ob-radius);
  background: var(--ob-primary-soft); border: 1px solid #CDD3E6;
  padding: 1.25rem 1.35rem; text-align: center;
}
.an-followup[hidden] { display: none; }
.an-followup h2 {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  font-size: 1.05rem; font-weight: 700; color: var(--ob-primary-ink); margin: 0 0 .4rem; letter-spacing: -.02em;
}
.an-followup h2 svg { width: 18px; height: 18px; flex-shrink: 0; }
.an-followup p {
  margin: 0 auto .95rem; max-width: 560px; font-size: .9rem; color: #3c4772;
  font-weight: 500; line-height: 1.55;
}
.an-followup-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }

/* ---------- Vitrine des symboles ---------- */
.an-symbols {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: .6rem; margin: 1.4rem 0 0;
}
.an-symbol {
  display: flex; align-items: flex-start; gap: .85rem;
  background: var(--ob-surface); border: 1px solid var(--ob-line); border-radius: var(--ob-radius-sm);
  padding: .9rem 1rem; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.an-symbol:hover { border-color: #D9CFBB; transform: translateY(-2px); box-shadow: var(--ob-shadow-sm); }
.an-symbol-glyph {
  flex-shrink: 0; width: 44px; min-height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ob-accent-soft); color: var(--ob-accent);
  font-size: 1.18rem; font-weight: 600; line-height: 1; letter-spacing: .02em;
}
.an-symbol-glyph em { font-family: Georgia, 'Times New Roman', serif; font-size: 1.25rem; }
.an-symbol h3 { font-size: .93rem; font-weight: 600; color: var(--ob-ink); margin: 0 0 .15rem; }
.an-symbol p { font-size: .82rem; color: var(--ob-muted); margin: 0; line-height: 1.45; font-weight: 500; }

/* ---------- Étapes ---------- */
.an-steps { list-style: none; counter-reset: an-step; margin: 1.4rem 0 0; padding: 0; }
.an-steps li { counter-increment: an-step; position: relative; padding: 0 0 1.5rem 3.1rem; }
.an-steps li::before {
  content: counter(an-step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ob-primary-soft); color: var(--ob-primary-ink); border: 1px solid #CDD3E6;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
}
.an-steps li::after {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: .35rem; width: 1px;
  background: var(--ob-line);
}
.an-steps li:last-child { padding-bottom: 0; }
.an-steps li:last-child::after { display: none; }
.an-steps h3 { margin: .28rem 0 .25rem !important; font-size: 1rem !important; }
.an-steps p { margin: 0 !important; font-size: .93rem !important; }

/* ---------- Pour qui ? ---------- */
.an-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .6rem; margin: 1.4rem 0 0; }
.an-case {
  background: var(--ob-surface); border: 1px solid var(--ob-line); border-radius: var(--ob-radius-sm);
  padding: 1rem 1.1rem; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.an-case:hover { border-color: #D9CFBB; transform: translateY(-2px); box-shadow: var(--ob-shadow-sm); }
.an-case h3 { margin: 0 0 .25rem !important; font-size: .95rem !important; display: flex; align-items: center; gap: .45rem; }
.an-case h3 svg { width: 16px; height: 16px; color: var(--ob-accent); flex-shrink: 0; }
.an-case p { margin: 0 !important; font-size: .86rem !important; color: var(--ob-muted) !important; line-height: 1.5; }

/* ---------- Tableau comparatif ---------- */
.ob-table .an-yes { color: var(--ob-green); font-weight: 700; }
.ob-table .an-no { color: var(--ob-faint); font-weight: 600; }

/* ---------- Relance en ligne dans le texte ---------- */
.an-inline-cta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1.5rem 0 .5rem; }

/* ---------- Pied de page complet ---------- */
.an-footer { border-top: 1px solid var(--ob-line); background: var(--ob-surface); }
.an-footer-inner { max-width: 1120px; margin: 0 auto; padding: 3rem 1.5rem 1.8rem; }
.an-footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2.6rem;
}
@media (max-width: 940px) {
  .an-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .an-footer-brand { grid-column: 1 / -1; }
}
/* Deux colonnes conservées sur téléphone : en une seule, le pied de page
   faisait deux écrans de haut. */
@media (max-width: 560px) { .an-footer-grid { gap: 1.6rem 1.25rem; } }

.an-footer-logo { font-size: 1.2rem; font-weight: 700; color: var(--ob-ink); letter-spacing: -.02em; }
.an-footer-desc { font-size: .875rem; color: var(--ob-muted); font-weight: 500; line-height: 1.6; margin: .7rem 0 0; }
.an-footer-social { display: flex; gap: .9rem; margin-top: .9rem; }
.an-footer-social a { color: var(--ob-faint); display: inline-flex; transition: color .15s ease; }
.an-footer-social a:hover { color: var(--ob-primary); }
.an-footer-col h3 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
  color: var(--ob-accent); margin: 0 0 .85rem;
}
.an-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.an-footer-col a { color: var(--ob-muted); text-decoration: none; font-size: .875rem; font-weight: 500; transition: color .15s ease; }
.an-footer-col a:hover { color: var(--ob-primary); }
.an-footer-bottom {
  border-top: 1px solid var(--ob-line-2); margin-top: 2.4rem; padding-top: 1.4rem;
  text-align: center; color: var(--ob-faint); font-size: .84rem; font-weight: 500;
}

/* ---------- Ajustements mobiles ---------- */
@media (max-width: 640px) {
  .an-drop { padding: 2.2rem 1rem 2rem; }
  .an-drop-ico { width: 54px; height: 54px; border-radius: 16px; }
  .an-drop-ico svg { width: 25px; height: 25px; }
  .an-drop-title { font-size: 1.06rem; }
  /* La frise tient sur une seule ligne : deux glyphes orphelins en dessous
     donnaient l'impression d'un débordement. */
  .an-glyphs { gap: .5rem .42rem; margin-top: 1.2rem; padding-top: 1.05rem; max-width: none; }
  .an-glyphs span { font-size: .92rem; }
  .an-glyphs span.it { font-size: .98rem; }
  .pa-file { padding: .55rem .6rem .55rem .7rem; gap: .55rem; }
  .pa-file-open { padding: .4rem .7rem; font-size: .8rem; }
  .an-steps li { padding-left: 2.7rem; }
  .an-followup { padding: 1.1rem; }
  .an-trust span { font-size: .76rem; padding: .26rem .6rem .26rem .48rem; }
  .an-inline-cta .ob-btn { flex: 1 1 100%; justify-content: center; }
  .an-footer-inner { padding: 2.4rem 1.5rem 1.6rem; }
}

/* Sur petit écran, « Découvrir Sostenutoo » passait à la ligne et écrasait
   le logo : on garde logo + sélecteur de langue, les appels à l'action
   restent nombreux plus bas dans la page. */
@media (max-width: 560px) {
  .ob-back { display: none; }
}
