/* ==========================================================================
   Fedeli Chauffage — styles propres au site
   Complète Tailwind Play CDN. Aucune dépendance externe.
   ========================================================================== */

:root {
  --sable: #faf6f0;
  --lin: #efe5d9;
  --nuit: #14232a;
  --ardoise: #24404c;
  --cuivre: #b4632c;
  --cuivre-clair: #d9a05b;
  --encre: #16202a;
  --brume: #5a6a70;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--sable);
  color: var(--encre);
  font-feature-settings: "liga" 1, "kern" 1;
}

/* --- Accessibilité : lien d'évitement ------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  border-radius: 0.5rem;
  background: var(--cuivre);
  color: #fff;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 0.75rem;
}

/* --- Focus visible ------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--cuivre);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* --- Navigation ---------------------------------------------------------- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(250, 246, 240, 0.22);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--sable);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(250, 246, 240, 0.82);
  border-radius: 0.4rem;
  transition: color 0.18s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--cuivre-clair);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
}
.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-link[aria-current="page"] {
  color: #fff;
}

.nav-phone {
  text-underline-offset: 3px;
}
.nav-phone:hover {
  text-decoration: underline;
  color: #fff;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.5rem;
  background: var(--cuivre);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.nav-cta:hover {
  background: #9c5324;
  transform: translateY(-1px);
}

/* Sous-menu */
.nav-group {
  position: relative;
}
.nav-sub {
  display: none;
}
.nav-sublink {
  display: block;
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  color: rgba(250, 246, 240, 0.78);
  border-radius: 0.35rem;
}
.nav-sublink:hover,
.nav-sublink:focus-visible {
  background: rgba(250, 246, 240, 0.08);
  color: #fff;
}

@media (min-width: 1024px) {
  .nav-group:hover .nav-sub,
  .nav-group:focus-within .nav-sub {
    display: block;
  }
  .nav-sub {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 13rem;
    padding: 0.4rem;
    border-radius: 0.6rem;
    background: var(--ardoise);
    border: 1px solid rgba(250, 246, 240, 0.12);
    box-shadow: 0 18px 34px -18px rgba(20, 35, 42, 0.65);
    z-index: 50;
  }
}

@media (max-width: 1023px) {
  .nav-sub {
    display: block;
    margin-left: 0.9rem;
    border-left: 1px solid rgba(250, 246, 240, 0.14);
    padding-left: 0.4rem;
  }
  .nav-link {
    display: block;
    width: 100%;
    padding-left: 0.2rem;
  }
  .nav-link::after {
    left: 0.2rem;
    right: auto;
    width: 2.25rem;
  }
}

/* --- Boutons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.8rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary {
  background: var(--cuivre);
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(180, 99, 44, 0.9);
}
.btn-primary:hover {
  background: #9c5324;
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid rgba(250, 246, 240, 0.45);
  color: var(--sable);
}
.btn-ghost:hover {
  background: rgba(250, 246, 240, 0.12);
  border-color: var(--sable);
}
.btn-outline {
  border: 1px solid rgba(22, 32, 42, 0.25);
  color: var(--encre);
}
.btn-outline:hover {
  border-color: var(--cuivre);
  color: var(--cuivre);
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20, 35, 42, 0.82) 0%, rgba(20, 35, 42, 0.55) 45%, rgba(20, 35, 42, 0.9) 100%),
    linear-gradient(90deg, rgba(20, 35, 42, 0.75) 0%, rgba(20, 35, 42, 0) 70%);
}

/* --- Animations ---------------------------------------------------------- */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-rise {
  animation: riseIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero-rise-1 { animation-delay: 0.05s; }
.hero-rise-2 { animation-delay: 0.16s; }
.hero-rise-3 { animation-delay: 0.28s; }
.hero-rise-4 { animation-delay: 0.4s; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 40px -30px rgba(20, 35, 42, 0.55);
  border-color: rgba(180, 99, 44, 0.45);
}

/* --- Contenu éditorial --------------------------------------------------- */
.prose-fedeli p {
  margin-bottom: 1.1rem;
  line-height: 1.75;
  color: #33424a;
}
.prose-fedeli h2 {
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--encre);
}
.prose-fedeli h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--encre);
}
.prose-fedeli ul {
  margin: 0 0 1.2rem 0;
  padding: 0;
  list-style: none;
}
.prose-fedeli ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.55rem;
  line-height: 1.65;
  color: #33424a;
}
.prose-fedeli ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--cuivre);
}
.prose-fedeli a:not(.btn) {
  color: var(--cuivre);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose-fedeli a:not(.btn):hover {
  color: #8c4a1f;
}

/* --- Encadrés ------------------------------------------------------------ */
.callout {
  border-left: 3px solid var(--cuivre);
  background: var(--lin);
  padding: 1.15rem 1.35rem;
  border-radius: 0 0.6rem 0.6rem 0;
}

/* --- Formulaires --------------------------------------------------------- */
.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--encre);
}
.field-input {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid rgba(22, 32, 42, 0.2);
  background: #fff;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  color: var(--encre);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field-input::placeholder {
  color: #9aa5a9;
}
.field-input:focus {
  border-color: var(--cuivre);
  box-shadow: 0 0 0 3px rgba(180, 99, 44, 0.15);
  outline: none;
}

/* --- Footer -------------------------------------------------------------- */
.footer-link {
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}
.footer-link:hover {
  color: var(--cuivre-clair);
  text-decoration: underline;
}

/* --- Divers -------------------------------------------------------------- */
.rule-cuivre {
  height: 3px;
  width: 3rem;
  background: var(--cuivre);
  border-radius: 999px;
}

.grain {
  background-image: radial-gradient(rgba(180, 99, 44, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-rise,
  .reveal,
  .card,
  .btn,
  .nav-link::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
