/* ==========================================================================
   Guide Cordes De Anciola — Styles v1.2
   Charte : orange #FDBD74 · bleu #00222E · beige #FFFAEF
   ========================================================================== */

.dgc-container {
  font-family: 'Sarabun', Arial, sans-serif;
  color: #1a1a1a;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  background: transparent;
}

.dgc-wizard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Indicateur d'étapes -------------------------------------------------- */
.dgc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.dgc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dgc-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: #aaa;
  background: transparent;
  transition: all 0.25s ease;
}

/* Étape active : fond bleu marine */
.dgc-step--active .dgc-step-dot {
  border-color: #FDBD74;
  background: #FDBD74;
  color: #00222E;
}

/* Étape validée : fond orange */
.dgc-step--done .dgc-step-dot {
  border-color: #00222E;
  background: #00222E;
  color: #B9E6FB;
  font-weight: 700;
}

.dgc-step-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #888;
  white-space: nowrap;
}

.dgc-step--active .dgc-step-label,
.dgc-step--done .dgc-step-label {
  color: #1a1a1a;
}

.dgc-step-line {
  flex: 1;
  height: 1px;
  background: #bbb;
  min-width: 50px;
  max-width: 100px;
  margin-bottom: 20px;
}

.dgc-step-line--done {
  background: #00222E;
}

/* --- Contenu ---------------------------------------------------------------- */
.dgc-step-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dgc-question {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* --- Étape 1 : cartes type ------------------------------------------------- */
.dgc-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 480px) {
  .dgc-type-cards { grid-template-columns: 1fr; }
}

.dgc-type-card {
  background: transparent;
  border: 1.5px solid #00222E;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  color: #1a1a1a;
  text-align: center;
}

.dgc-type-card:hover {
  border-color: #00222E;
  background: #00222E;
  color: #B9E6FB;
}

.dgc-harp-icon { color: #444; }

.dgc-type-label {
  font-size: 1em;
  font-weight: 600;
}

/* --- Étape 2 : nombre de cordes ------------------------------------------ */
.dgc-count-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.dgc-count-btn {
  background: transparent;
  border: 1.5px solid #00222E;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 200px;
  max-width: 300px;
  text-align: left;
}

.dgc-count-btn:hover {
  border-color: #00222E;
  background: #00222E;
  color: #B9E6FB;
}

.dgc-count-label {
  font-size: 1em;
  font-weight: 800 !important;
}

.dgc-count-hint {
  font-size: 0.72rem;
  line-height: 1.4;
}

.dgc-count-examples {
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 0.2rem;
  font-style: italic;
}

/* --- Bandeau récapitulatif (étape 3) ------------------------------------- */
.dgc-recap {
  background: rgba(253, 189, 116, 0.12);
  border: 1px solid rgba(253, 189, 116, 0.4);
  border-radius: 8px;
  padding: 0.75rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dgc-recap-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.dgc-recap-type {
  font-size: 0.9rem;
  font-weight: 600;
  color: #00222E;
}

.dgc-recap-count {
  font-size: 0.9rem;
  color: #333;
}

.dgc-recap-examples {
  font-size: 0.78rem;
  color: #666;
  font-style: italic;
  margin: 0;
}

/* --- Étape 3 : harpe ------------------------------------------------------- */
.dgc-hint {
  font-size: 0.88rem;
  color: #555;
  text-align: center;
  margin: 0;
  line-height: 1.7;
}

/* Légende */
.dgc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: center;
}

.dgc-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #666;
}

.dgc-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Zone fond étape 3 */
.dgc-step-content--step3 {
  background: #FFFAEC;
  border-radius: 10px;
  padding: 1.5rem;
}

/* Zone harpe */
.dgc-harp-wrap {
  background: #FFFAEC;
  border-radius: 10px;
  padding: 0.75rem 0.75rem 0.5rem;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
}

.dgc-harp-inner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2px;
  width: 100%;
  padding: 0.25rem 0;
  position: relative;
  z-index: 1;
}

/* Layout vertical mobile */
.dgc-harp-inner--vertical {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Colonne d'une corde */
.dgc-string-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
}

/* Bandes d'octave alternées */
.dgc-string-col--odd-octave {
  background: rgba(0, 34, 46, 0.04);
  border-radius: 3px;
}

/* Bouton corde */
.dgc-string-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 2px 1px;
  border-radius: 3px;
  transition: transform 0.15s;
  position: relative;
  width: 100%;
}

.dgc-string-btn:hover {
  transform: scaleY(1.03);
}

.dgc-string-btn:hover .dgc-string-bar {
  filter: brightness(1.3) saturate(1.15);
  transform: scaleX(1.5);
  transform-origin: center;
}

.dgc-string-btn--active .dgc-string-bar {
  outline: 2px solid #FDBD74;
  outline-offset: 2px;
}

/* Point indicateur multi-options supprimé */
.dgc-string-btn--multi::before { display: none; }

.dgc-string-note {
  font-size: 9px;
  color: #555;
  white-space: nowrap;
  text-align: center;
}

.dgc-string-bar {
  border-radius: 2px 2px 1px 1px;
  display: block;
  transition: filter 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.dgc-string-pos {
  font-size: 8px;
  color: #aaa;
}

/* Rangée numéros hors masque (desktop) */
.dgc-string-labels {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0.3rem 0.75rem 0;
  gap: 2px;
}

.dgc-string-label-pos {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 8px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
}

/* --- Panneau d'options ----------------------------------------------------- */
.dgc-options-panel {
  background: #00222E;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  padding: 1.25rem;
  animation: dgc-slide-in 0.18s ease;
}

@keyframes dgc-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dgc-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dgc-options-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #FDBD74;
}

.dgc-options-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 1.25rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 3px;
  transition: color 0.15s;
}

.dgc-options-close:hover { color: #1a1a1a; }

.dgc-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.75rem;
}

.dgc-option-card {
  background: #263541;
  border: 1.5px solid #757575;
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: #1a1a1a;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.dgc-option-card:hover {
  border-color: #FDBD74;
  background: rgba(253, 189, 116, 0.08);
  box-shadow: 0 2px 8px rgba(253, 189, 116, 0.2);
  color: #1a1a1a;
  text-decoration: none;
}

.dgc-option-brand {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.dgc-option-matfin {
  font-size: 0.73rem;
  color: #B9E6FB;
  letter-spacing: 0.03em;
  text-transform: capitalize;
  font-style: italic;
}

.dgc-option-ref {
  font-size: 0.76rem;
  color: #888;
  font-family: monospace;
}

.dgc-option-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 0.55rem 1.2rem;

  font-size: 0.85rem !important;
  font-weight: 500 !important;
  font-family: inherit;
  color: #ffffff !important;
  text-decoration: none;
  white-space: nowrap;

  background-color: #FDBD74 !important;
  border: none;
  border-radius: 4px;
  cursor: pointer;

  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.dgc-option-cta:hover {
  opacity: 0.85;
}

/* --- Bouton retour --------------------------------------------------------- */
.dgc-back {
  background: transparent;
  border: 1.5px solid #00222E;
  color: #555;
  font-size: 0.83rem;
  font-family: 'Sarabun', Arial, sans-serif;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  align-self: flex-start;
  letter-spacing: 0.02em;
  transition: border-color 0.18s, color 0.18s;
}

.dgc-back:hover {
  background-color: #00222E;
  border-color: #00222E;
  color: #B9E6FB;
}

/* --- Mobile vertical ------------------------------------------------------- */
@media (max-width: 767px) {
  .dgc-harp-wrap {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 80vh;
    -webkit-mask-image: none;
    mask-image: none;
    border-radius: 16px;
  }

  .dgc-harp-inner--vertical {
    width: 100%;
  }

  .dgc-harp-inner--vertical .dgc-string-col {
    flex-direction: row;
    align-items: center;
    width: 100%;
    flex: none;
    margin-bottom: 2px;
    padding: 1px 0;
  }

  .dgc-harp-inner--vertical .dgc-string-btn {
    flex-direction: row;
    width: 100%;
    gap: 6px;
  }

  .dgc-harp-inner--vertical .dgc-string-btn:hover {
    transform: scaleX(1.01);
  }

  .dgc-harp-inner--vertical .dgc-string-btn:hover .dgc-string-bar {
    filter: brightness(1.3);
    transform: scaleY(1.5);
  }

  .dgc-harp-inner--vertical .dgc-string-note {
    min-width: 22px;
    text-align: right;
  }

  .dgc-harp-inner--vertical .dgc-string-pos {
    min-width: 22px;
    text-align: right;
    font-size: 8px;
    color: #aaa;
  }
}
