/* ============================================================
   COMPOSANTS — chaque bloc correspond à une macro de
   _includes/macros/ui.njk. Ajouter un composant = une macro
   + son bloc ici, rien d'autre.
   ============================================================ */

/* --- Coulure de rouille (motif signature) --- */
.coulure {
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--oxyde) 18%, var(--rouille) 55%, transparent);
  height: 110px;
  margin: 0 auto;
}

/* --- Eyebrow (surtitre de section) --- */
.eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--oxyde);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: linear-gradient(to right, var(--oxyde), transparent);
}
.dark .eyebrow { color: var(--rouille); }
.eyebrow.centre { justify-content: center; }
.eyebrow.centre::before { background: linear-gradient(to left, var(--rouille), transparent); }
.eyebrow.centre::after {
  content: ""; width: 34px; height: 2px;
  background: linear-gradient(to right, var(--rouille), transparent);
}

/* --- Texture patine (overlay SVG feTurbulence) --- */
.patine { position: relative; isolation: isolate; }
.patine::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.64 0 0 0 0 0.31 0 0 0 0 0.17 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23p)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
.patine > * { position: relative; z-index: 1; }

/* --- CTA --- */
.cta {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--sans);
  font-size: .85rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--calcaire);
  border: 1px solid rgba(198, 127, 69, 0.6);
  padding: 1rem 2.2rem; border-radius: 3rem;
  transition: background .35s, border-color .35s, transform .35s;
  background: rgba(163, 78, 44, 0.14);
  cursor: pointer;
}
.cta:hover { background: var(--oxyde); border-color: var(--oxyde); transform: translateY(-2px); }
.cta .fleche { transition: transform .35s; }
.cta:hover .fleche { transform: translateX(5px); }
.cta-ghost { background: none; border-color: rgba(43, 33, 28, 0.35); color: var(--texte); }
.cta-ghost:hover { background: var(--encre); border-color: var(--encre); color: var(--calcaire); }

/* --- Lien fléché --- */
.lien {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 600; font-size: .9rem; color: var(--oxyde);
  border-bottom: 1px solid transparent; transition: gap .3s, border-color .3s;
}
.lien:hover { gap: .9rem; border-color: var(--oxyde); }

/* --- Chiffres clés --- */
.chiffres {
  display: flex; margin: 2.4rem 0;
  border-top: 1px solid var(--filet-oxyde);
  border-bottom: 1px solid var(--filet-oxyde);
}
.chiffre { flex: 1; padding: 1.4rem 1rem; }
.chiffre + .chiffre { border-left: 1px solid var(--filet-oxyde); }
.chiffre b {
  font-family: var(--display); font-size: 1.7rem; font-weight: 500;
  color: var(--oxyde); display: block; line-height: 1.1;
}
.chiffre span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); }

/* --- Carte collection --- */
.carte {
  position: relative; display: block; overflow: hidden; border-radius: var(--rayon);
  aspect-ratio: 3 / 4.1; background: var(--brou);
}
.carte img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--sortie), opacity .5s;
  opacity: .88;
}
.carte:hover img { transform: scale(1.06); opacity: 1; }
.carte::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(32, 21, 18, 0.92) 0%, rgba(32, 21, 18, 0.25) 45%, transparent 70%);
}
.carte-texte {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.8rem; display: flex; flex-direction: column; gap: .5rem;
}
.carte-texte h3 { font-size: var(--taille-h3); color: var(--calcaire); }
.carte-texte p {
  font-size: .88rem; color: rgba(237, 233, 226, 0.75); line-height: 1.5;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s ease, opacity .5s ease, margin .5s ease;
}
.carte:hover .carte-texte p, .carte:focus-visible .carte-texte p { max-height: 6rem; opacity: 1; margin-bottom: .3rem; }
.carte-texte .decouvrir {
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; color: var(--rouille);
  display: flex; align-items: center; gap: .5rem;
}
.carte-coulure {
  position: absolute; top: 0; left: 1.8rem; z-index: 2;
  width: 2px; height: 0;
  background: linear-gradient(to bottom, var(--rouille), transparent);
  transition: height .6s ease;
}
.carte:hover .carte-coulure { height: 76px; }

/* --- Tuile galerie --- */
.tuile { position: relative; overflow: hidden; border-radius: var(--rayon); background: var(--brou); }
.tuile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--sortie); }
.tuile:hover img { transform: scale(1.05); }
.tuile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.3rem .9rem;
  background: linear-gradient(to top, rgba(32, 21, 18, 0.85), transparent);
  color: var(--calcaire);
  font-family: var(--display); font-style: italic; font-size: 1rem; font-weight: 300;
  opacity: 0; transform: translateY(8px);
  transition: opacity .4s, transform .4s;
}
.tuile:hover figcaption { opacity: 1; transform: none; }
.tuile.haute { grid-row: span 2; }

/* --- Étapes (processus sur-mesure) --- */
.etapes { margin: 2.2rem 0 2.6rem; display: flex; flex-direction: column; }
.etape { display: grid; grid-template-columns: 56px 1fr; gap: 1.4rem; padding: 1.5rem 0; }
.etape + .etape { border-top: 1px solid var(--filet-oxyde); }
.etape-num {
  font-family: var(--display); font-style: italic; font-weight: 300;
  font-size: 1.9rem; color: var(--oxyde); line-height: 1;
}
.etape h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.etape p { font-size: .92rem; color: var(--texte-doux); }

/* --- Formulaire --- */
.formulaire {
  background: rgba(237, 233, 226, 0.045);
  border: 1px solid var(--filet-rouille);
  border-radius: 3px; padding: 2.4rem;
  display: flex; flex-direction: column; gap: 1.3rem;
}
.champ label {
  display: block; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(237, 233, 226, 0.55); font-weight: 600; margin-bottom: .45rem;
}
.champ input, .champ textarea {
  width: 100%; background: rgba(32, 21, 18, 0.5);
  border: 1px solid rgba(237, 233, 226, 0.16); border-radius: var(--rayon);
  padding: .85rem 1rem; color: var(--calcaire);
  font-family: var(--sans); font-size: .95rem;
  transition: border-color .3s;
}
.champ input:focus, .champ textarea:focus { outline: none; border-color: var(--rouille); }
.champ textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.formulaire .cta { align-self: flex-start; }
.form-note { font-size: .78rem; color: rgba(237, 233, 226, 0.4); }

/* --- Coordonnées de contact --- */
.coordonnees { display: flex; flex-direction: column; gap: 1.6rem; }
.coordonnee { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.coordonnee-icone {
  width: 42px; height: 42px; border: 1px solid rgba(198, 127, 69, 0.4); border-radius: 50%;
  display: grid; place-items: center; color: var(--rouille);
}
.coordonnee b {
  display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(237, 233, 226, 0.5); font-weight: 600; margin-bottom: .15rem;
}
.coordonnee a:hover { color: var(--rouille); }

/* --- Carte article (listing blog + articles liés) --- */
.carte-article {
  display: flex; flex-direction: column;
  background: var(--calcaire);
  border: 1px solid var(--filet-oxyde);
  border-radius: var(--rayon); overflow: hidden;
  transition: transform .4s var(--sortie), box-shadow .4s;
}
.carte-article:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(32, 21, 18, 0.4); }
.carte-article-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--brou); }
.carte-article-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--sortie); }
.carte-article:hover .carte-article-img img { transform: scale(1.05); }
.carte-article-corps { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.carte-article-meta {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--oxyde); font-weight: 600;
}
.carte-article h3 { font-size: 1.35rem; line-height: 1.25; }
.carte-article p { font-size: .9rem; color: var(--texte-doux); flex: 1; }

/* --- Responsive composants --- */
@media (max-width: 960px) {
  .chiffres { flex-direction: column; }
  .chiffre + .chiffre { border-left: none; border-top: 1px solid var(--filet-oxyde); }
  .carte { aspect-ratio: 4 / 3.4; }
  .carte-texte p { max-height: 6rem; opacity: 1; }
  .tuile figcaption { opacity: 1; transform: none; }
}
