/* ==========================================================================
   Cocoon Design — carnet d'échantillons
   Complète Tailwind Play CDN. Aucune dépendance externe.
   ========================================================================== */

:root {
  --ivoire: #faf5ed;
  --lin: #efe3d4;
  --encre: #221b1e;
  --prune: #5b2b3c;
  --terre: #c1663f;
  --or: #b08a4f;
  --mousse: #6e7a62;
  --brume: #6f6360;
}

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

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

::selection {
  background: var(--prune);
  color: var(--ivoire);
}

/* --- Accessibilité -------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 100;
  border-radius: 0.4rem;
  background: var(--encre);
  color: var(--ivoire);
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--terre);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Mise en page -------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 640px) {
  .wrap { padding-inline: 2rem; }
}
@media (min-width: 1024px) {
  .wrap { padding-inline: 2.5rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Karla", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or);
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.rule-or {
  width: 2.75rem;
  height: 2px;
  background: var(--or);
}

.display {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  letter-spacing: -0.015em;
  line-height: 1.05;
}

.lead {
  font-size: 1.06rem;
  line-height: 1.7;
  color: #4a3f3d;
}

/* --- En-tête ------------------------------------------------------------- */
.topbar {
  background: var(--encre);
  color: rgba(250, 245, 237, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.site-header {
  background-color: rgba(250, 245, 237, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34, 27, 30, 0.12);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.55rem;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--encre);
  border-radius: 2px;
  transition: color 0.16s ease;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--prune);
}
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.12rem;
  height: 1.5px;
  background: var(--terre);
}

.nav-group {
  position: relative;
}
.nav-group > .nav-link::before {
  content: "";
  position: absolute;
  right: 0.15rem;
  top: 50%;
  width: 0.32rem;
  height: 0.32rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  opacity: 0.6;
}
.nav-group > .nav-link { padding-right: 1.25rem; }

.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

@media (min-width: 1024px) {
  .nav-sub {
    position: absolute;
    left: 0;
    top: calc(100% + 0.45rem);
    min-width: 15rem;
    background: var(--ivoire);
    border: 1px solid rgba(34, 27, 30, 0.12);
    border-radius: 4px;
    box-shadow: 0 18px 40px -22px rgba(34, 27, 30, 0.45);
    padding: 0.45rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 50;
  }
  .nav-group:hover .nav-sub,
  .nav-group:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.nav-sublink {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.86rem;
  color: #4a3f3d;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.nav-sublink:hover,
.nav-sublink[aria-current="page"] {
  background: var(--lin);
  color: var(--prune);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0.6rem;
  border: 1px solid rgba(34, 27, 30, 0.25);
  border-radius: 3px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--encre);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Boutons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary {
  background: var(--terre);
  color: #fff;
}
.btn-primary:hover {
  background: #a9542f;
  transform: translateY(-1px);
}
.btn-dark {
  background: var(--encre);
  color: var(--ivoire);
}
.btn-dark:hover { background: #3a2f33; }
.btn-ghost {
  border-color: rgba(34, 27, 30, 0.35);
  color: var(--encre);
}
.btn-ghost:hover {
  border-color: var(--encre);
  background: var(--lin);
}
.btn-light {
  border-color: rgba(250, 245, 237, 0.5);
  color: var(--ivoire);
}
.btn-light:hover {
  background: rgba(250, 245, 237, 0.12);
  border-color: var(--ivoire);
}

.link-inline {
  color: var(--prune);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(91, 43, 60, 0.4);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.link-inline:hover {
  color: var(--terre);
  text-decoration-color: var(--terre);
}

/* --- Héros --------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--encre);
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 27, 30, 0.55) 0%, rgba(34, 27, 30, 0.18) 38%, rgba(34, 27, 30, 0.82) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  color: var(--ivoire);
}
.hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.1rem, 5.6vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lead {
  max-width: 38rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(250, 245, 237, 0.82);
}

/* --- Bandes et cartes ---------------------------------------------------- */
.band {
  background: var(--lin);
}
.band-dark {
  background: var(--encre);
  color: var(--ivoire);
}

.card {
  display: flex;
  flex-direction: column;
  background: #fffdf9;
  border: 1px solid rgba(34, 27, 30, 0.1);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 43, 60, 0.25);
  box-shadow: 0 22px 40px -30px rgba(34, 27, 30, 0.5);
}
.card-media,
.media {
  overflow: hidden;
  background: var(--lin);
}
.card-media img,
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card:hover .card-media img {
  transform: scale(1.035);
}

.tag {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border: 1px solid rgba(176, 138, 79, 0.5);
  color: #6b5a32;
  background: rgba(176, 138, 79, 0.08);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: var(--encre);
  isolation: isolate;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s ease;
  opacity: 0.92;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 27, 30, 0.05) 25%, rgba(34, 27, 30, 0.78) 100%);
}
.tile-label {
  position: absolute;
  z-index: 2;
  left: 1.35rem;
  right: 1.35rem;
  bottom: 1.2rem;
  color: var(--ivoire);
}
.tile:hover img {
  transform: scale(1.045);
  opacity: 1;
}

.price {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1rem;
  color: var(--prune);
}

/* --- Prose --------------------------------------------------------------- */
.prose-cocoon p {
  margin-bottom: 1.1rem;
  line-height: 1.78;
  color: #423836;
}
.prose-cocoon p:last-child { margin-bottom: 0; }
.prose-cocoon h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.3;
  margin: 2rem 0 0.7rem;
  color: var(--encre);
}
.prose-cocoon ul {
  margin: 0 0 1.2rem;
  padding-left: 1.1rem;
  list-style: none;
}
.prose-cocoon ul > li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  line-height: 1.7;
  color: #423836;
}
.prose-cocoon ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--or);
  transform: rotate(45deg);
}
.prose-cocoon strong { color: var(--encre); }
.prose-cocoon a { color: var(--prune); text-decoration: underline; text-underline-offset: 3px; }

.section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* --- Citations et filets ------------------------------------------------ */
.pullquote {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  line-height: 1.42;
  color: var(--prune);
  border-left: 2px solid var(--or);
  padding-left: 1.4rem;
}

.hr-thin {
  height: 1px;
  background: rgba(34, 27, 30, 0.14);
  border: 0;
}

.swatch-line {
  display: flex;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 2px;
}
.swatch-line span { flex: 1; }

/* --- Tableaux ------------------------------------------------------------ */
.table-cocoon {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table-cocoon caption {
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brume);
  padding-bottom: 0.7rem;
}
.table-cocoon th,
.table-cocoon td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(34, 27, 30, 0.12);
  text-align: left;
  vertical-align: top;
}
.table-cocoon thead th {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b5a32;
  background: var(--lin);
  border-bottom: 1px solid rgba(34, 27, 30, 0.2);
}
.table-cocoon tbody tr:nth-child(even) { background: rgba(239, 227, 212, 0.35); }

/* --- Formulaires -------------------------------------------------------- */
.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5d504d;
  margin-bottom: 0.4rem;
}
.field-input {
  width: 100%;
  background: #fffdf9;
  border: 1px solid rgba(34, 27, 30, 0.22);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  color: var(--encre);
}
.field-input:focus {
  border-color: var(--prune);
  outline: none;
  box-shadow: 0 0 0 3px rgba(91, 43, 60, 0.14);
}

/* --- Accordéons --------------------------------------------------------- */
details.faq-item {
  border-bottom: 1px solid rgba(34, 27, 30, 0.14);
  padding: 1.15rem 0;
}
details.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.06rem;
  color: var(--encre);
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: "Karla", sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--terre);
}
details.faq-item[open] summary::after { content: "–"; }
details.faq-item .faq-body {
  padding-top: 0.75rem;
  color: #4a3f3d;
  line-height: 1.72;
  font-size: 0.95rem;
}

/* --- Pied de page ------------------------------------------------------- */
.site-footer {
  background: var(--encre);
  color: var(--ivoire);
}
.footer-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--or);
}
.footer-link {
  color: rgba(250, 245, 237, 0.7);
  transition: color 0.15s ease;
}
.footer-link:hover { color: var(--ivoire); }

/* --- Révélation --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card-media img, .tile img { transition: none; }
}
