/* ==========================================================
   Les Couvreurs Versaillais — « Notre engagement de confiance »
   Section #lcv-charte-confiance — styles isolés (préfixe .lcv-)
   Couleurs : bleu nuit #0e1e2f · or #e5c58a (sur sombre) /
   #8a6420 (sur clair) · crème #f6f3ec
   Contrastes vérifiés (WCAG 2.1) :
     crème  #f6f3ec sur #0e1e2f  ≈ 15,2:1 (AAA)
     or     #e5c58a sur #0e1e2f  ≈ 10,2:1 (AAA)
     #c9ced6 sur #15283c         ≈ 9,5:1  (AAA)
     #8a6420 sur #f6f3ec         ≈ 4,8:1  (AA)
     #0e1e2f sur #e5c58a         ≈ 10,2:1 (AAA)
   ========================================================== */

.lcv-charte {
  --lcv-nuit: #0e1e2f;
  --lcv-nuit-2: #15283c;
  --lcv-or: #e5c58a;
  --lcv-or-clair-fond: #8a6420;
  --lcv-creme: #f6f3ec;
  --lcv-gris: #c9ced6;
  --lcv-trait: rgba(229, 197, 138, 0.28);

  background: var(--lcv-nuit);
  color: var(--lcv-creme);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; /* 17 px */
  line-height: 1.6;
  padding: clamp(3rem, 7vw, 5.5rem) 1rem;
}

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

.lcv-charte__inner {
  max-width: 72rem;
  margin: 0 auto;
}

/* ---------- En-tête ---------- */
.lcv-charte__head {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.lcv-charte__kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  color: var(--lcv-or);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lcv-charte__title {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  line-height: 1.2;
  color: var(--lcv-creme);
}

.lcv-charte__title em {
  font-style: italic;
  color: var(--lcv-or);
}

.lcv-charte__intro {
  margin: 0;
  color: var(--lcv-gris);
  font-size: 1.125rem;
}

/* filet doré sous le titre */
.lcv-charte__rule {
  width: 4rem;
  height: 2px;
  margin: 1.25rem auto 0;
  border: 0;
  background: var(--lcv-or);
}

/* ---------- Liste des engagements ---------- */
.lcv-charte__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  counter-reset: lcv-engagement;
}

.lcv-charte__item {
  counter-increment: lcv-engagement;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 1.5rem 1.5rem;
  background: var(--lcv-nuit-2);
  border: 1px solid var(--lcv-trait);
  border-radius: 6px;
}

.lcv-charte__item::before {
  content: counter(lcv-engagement, decimal-leading-zero);
  position: absolute;
  top: 1.2rem;
  right: 1.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  color: var(--lcv-or);
  opacity: 0.8;
}

.lcv-charte__icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--lcv-or);
  flex: none;
}

.lcv-charte__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lcv-charte__item-title {
  margin: 0.2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--lcv-creme);
}

.lcv-charte__item p {
  margin: 0;
  color: var(--lcv-gris);
}

.lcv-charte__item strong { color: var(--lcv-creme); font-weight: 600; }

.lcv-charte a {
  color: var(--lcv-or);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.lcv-charte a:hover { text-decoration-thickness: 2px; }

.lcv-charte a:focus-visible,
.lcv-charte__btn:focus-visible {
  outline: 3px solid var(--lcv-or);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Étiquettes de validation (version brouillon) ---------- */
.lcv-badge {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lcv-badge--fait {
  color: var(--lcv-nuit);
  background: var(--lcv-or);
}

.lcv-badge--valider {
  color: var(--lcv-or-clair-fond);
  background: var(--lcv-creme);
  outline: 2px dashed var(--lcv-or);
  outline-offset: 2px;
}

.lcv-charte__item--valider {
  border-style: dashed;
  border-color: var(--lcv-or);
}

/* ---------- Pied de section ---------- */
.lcv-charte__foot {
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  max-width: 48rem;
  text-align: center;
}

.lcv-charte__foot p { margin: 0 0 1.25rem; color: var(--lcv-gris); }

.lcv-charte__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.lcv-charte__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.3rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none !important;
}

.lcv-charte__btn--plein {
  background: var(--lcv-or);
  color: var(--lcv-nuit) !important;
}

.lcv-charte__btn--trait {
  border: 1px solid var(--lcv-or);
  color: var(--lcv-or);
}

.lcv-charte__btn svg {
  width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Note de validation (brouillon) ---------- */
.lcv-charte__note {
  margin: 2.5rem auto 0;
  max-width: 48rem;
  padding: 1.25rem 1.5rem;
  background: var(--lcv-creme);
  color: var(--lcv-nuit);
  border-left: 4px solid var(--lcv-or-clair-fond);
  border-radius: 4px;
}

.lcv-charte__note h3 {
  margin: 0 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--lcv-or-clair-fond);
}

.lcv-charte__note ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.lcv-charte__note li { margin: 0.25rem 0; }

/* ---------- Animation sobre (uniquement si l'utilisateur l'accepte) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lcv-charte__item {
    animation: lcv-monte 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
    transition: transform 0.25s ease, border-color 0.25s ease;
  }

  @supports (animation-timeline: view()) {
    .lcv-charte__item {
      animation-delay: 0s;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }

  .lcv-charte__item:hover { transform: translateY(-3px); border-color: var(--lcv-or); }

  .lcv-charte__icon svg .lcv-trace {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: lcv-trace 1.2s ease-out 0.3s forwards;
  }
}

@keyframes lcv-monte {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes lcv-trace { to { stroke-dashoffset: 0; } }

/* ---------- Impression ---------- */
@media print {
  .lcv-charte { background: #fff; color: #000; padding: 1rem 0; }
  .lcv-charte__item { background: #fff; border-color: #999; break-inside: avoid; }
  .lcv-charte__item p, .lcv-charte__intro, .lcv-charte__foot p { color: #222; }
  .lcv-charte__title, .lcv-charte__item-title { color: #000; }
  .lcv-charte__icon, .lcv-charte a, .lcv-charte__kicker { color: #8a6420; }
}
@media (min-width:1000px){#lcv-charte-confiance .lcv-charte__item:nth-child(7):last-child{grid-column:2}}
