/* ============================================================
   MOULIN DE MALFRAGNER — style.css
   Design éditorial maroquinerie · cuir · mode
   Palette : beige, brun cuir, noir, blanc cassé
   Typographies : Cormorant Garamond (titres) + Jost (corps)
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  /* Couleurs */
  --color-cream:        #f5f0e8;
  --color-warm-white:   #faf8f4;
  --color-beige-mid:    #e8dece;
  --color-beige-dark:   #c9b99a;
  --color-leather:      #8b5c2a;
  --color-leather-dark: #5c3510;
  --color-leather-light:#b8895a;
  --color-noir:         #1a1714;
  --color-text:         #2e2820;
  --color-text-muted:   #7a6a56;
  --color-border:       #d4c5ae;

  /* Typographies */
  --font-serif:    'Cormorant Garamond', Georgia, serif;
  --font-sans:     'Jost', Helvetica, sans-serif;

  /* Espacements */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;

  /* Conteneur */
  --container-width: 1200px;
  --container-narrow: 820px;
}


/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-warm-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}


/* ============================================================
   UTILITAIRES
   ============================================================ */

/* Conteneur principal */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* Conteneur étroit pour l'éditorial */
.container-narrow {
  max-width: var(--container-narrow);
}

/* Section générique */
.section {
  padding-block: var(--space-xl);
}


/* ============================================================
   TYPOGRAPHIE GLOBALE
   ============================================================ */

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-noir);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-style: italic;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.01em;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

p {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-text);
}

/* Lien éditorial */
.link-editorial {
  color: var(--color-leather);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}

.link-editorial:hover {
  color: var(--color-leather-dark);
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 244, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
  padding-block: 1.1rem;
}

/* Tagline gauche */
.site-tagline {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  justify-self: start;
}

/* Logo central */
.site-logo {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-noir);
  white-space: nowrap;
  justify-self: center;
  transition: color 0.2s;
}

.site-logo span {
  font-weight: 300;
  font-style: italic;
  color: var(--color-leather);
}

.site-logo:hover {
  color: var(--color-leather);
}

/* Nav droite */
.site-nav {
  justify-self: end;
}

.site-nav ul {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-leather);
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: min(90vh, 820px);
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Image hero */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

/* Overlay dégradé cuir */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26, 23, 20, 0.75) 0%,
    rgba(90, 53, 16, 0.35) 55%,
    rgba(26, 23, 20, 0.15) 100%
  );
}

/* Contenu hero */
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-cream);
  max-width: 700px;
}

.hero-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-beige-dark);
  border: 1px solid var(--color-beige-dark);
  padding: 0.35em 0.9em;
  margin-bottom: var(--space-md);
}

.hero-content h1 {
  color: var(--color-cream);
  margin-bottom: var(--space-md);
}

.hero-intro {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(245, 240, 232, 0.85);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: var(--space-lg);
}

/* Bouton hero */
.btn-hero {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-cream);
  border: 1px solid var(--color-cream);
  padding: 0.85em 2.2em;
  transition: background-color 0.25s, color 0.25s;
}

.btn-hero:hover {
  background-color: var(--color-cream);
  color: var(--color-noir);
}


/* ============================================================
   EN-TÊTES DE SECTION
   ============================================================ */
.section-header {
  margin-bottom: var(--space-lg);
}

/* Version centrée */
.section-header--center {
  text-align: center;
}

/* Numéro de section */
.section-number {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-leather);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

/* Sous-titre de section */
.section-sub {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.4;
}


/* ============================================================
   SECTION 1 — ÉDITORIAL
   ============================================================ */
.section-editorial {
  background-color: var(--color-warm-white);
}

/* Texte éditorial */
.editorial-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.editorial-text p {
  font-size: clamp(1rem, 1.6vw, 1.08rem);
}

/* Première lettre majuscule */
.editorial-text p:first-child::first-letter {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 600;
  float: left;
  line-height: 0.75;
  padding-right: 0.12em;
  padding-top: 0.1em;
  color: var(--color-leather);
}

/* Figure image éditoriale */
.editorial-figure {
  margin-top: var(--space-lg);
}

.editorial-figure img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.editorial-figure figcaption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xs);
}


/* ============================================================
   SECTION 2 — TYPES (CARDS)
   ============================================================ */
.section-types {
  background-color: var(--color-cream);
}

/* Grille de cartes */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* Carte individuelle */
.card {
  background-color: var(--color-warm-white);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card-img-wrap {
  overflow: hidden;
  height: 240px;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.card-body {
  padding: var(--space-md);
}

.card-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}


/* ============================================================
   SECTION 3 — GUIDE / CHOISIR
   ============================================================ */
.section-guide {
  background-color: var(--color-warm-white);
}

/* Layout 2 colonnes : image + texte */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-xl);
  align-items: start;
}

.guide-image {
  position: sticky;
  top: 100px;
}

.guide-image img {
  width: 100%;
  height: 650px;
  object-fit: cover;
}

.guide-blocks {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.guide-block {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.guide-block:last-child {
  border-bottom: none;
}

.guide-block h3 {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--color-leather);
  margin-bottom: 0.65rem;
}

.guide-block p {
  font-size: 0.97rem;
}


/* ============================================================
   SECTION 4 — TENDANCES
   ============================================================ */
.section-tendances {
  background-color: var(--color-noir);
}

.section-tendances .section-number {
  color: var(--color-leather-light);
}

.section-tendances h2 {
  color: var(--color-cream);
}

.section-tendances .section-sub {
  color: var(--color-beige-dark);
}

/* Liste des tendances */
.tendances-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tendance-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: start;
}

.tendance-item:last-child {
  border-bottom: none;
}

.tendance-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-leather-light);
  line-height: 1.5;
}

.tendance-item h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--color-cream);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.tendance-item p {
  font-size: 0.95rem;
  color: rgba(245, 240, 232, 0.65);
  line-height: 1.8;
}


/* ============================================================
   SÉPARATEUR IMAGE PLEINE LARGEUR
   ============================================================ */
.full-bleed-image {
  height: 420px;
  overflow: hidden;
}

.full-bleed-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}


/* ============================================================
   SECTION 5 — ENTRETIEN
   ============================================================ */
.section-entretien {
  background-color: var(--color-cream);
}

.entretien-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg) var(--space-xl);
}

.entretien-block {
  border-top: 2px solid var(--color-leather);
  padding-top: var(--space-md);
}

.entretien-icon {
  font-size: 1.4rem;
  color: var(--color-leather);
  margin-bottom: 0.75rem;
}

.entretien-block h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

/* Liste entretien */
.entretien-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.entretien-list li {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  padding-left: 1.2em;
  position: relative;
  line-height: 1.6;
}

.entretien-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--color-leather);
  font-size: 1.2rem;
  line-height: 1.3;
}


/* ============================================================
   SECTION 6 — RESSOURCES
   ============================================================ */
.section-ressources {
  background-color: var(--color-warm-white);
}

.section-ressources .editorial-text {
  gap: var(--space-md);
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--color-leather-dark);
  color: var(--color-beige-mid);
  padding-top: var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.02em;
}

.footer-tagline-text {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(232, 222, 206, 0.65);
  max-width: 400px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-nav a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 222, 206, 0.55);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-cream);
}

/* Copyright */
.footer-bottom {
  padding-block: var(--space-md);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: rgba(232, 222, 206, 0.4);
}

.footer-bottom a {
  color: rgba(232, 222, 206, 0.6);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: var(--color-cream);
}


/* ============================================================
   RESPONSIVE — TABLETTE (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  /* Masquer la nav desktop et le tagline sur tablette */
  .site-nav,
  .site-tagline {
    display: none;
  }

  /* Cards : 2 colonnes */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Guide : une seule colonne */
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-image {
    position: static;
  }

  .guide-image img {
    height: 380px;
  }

  /* Entretien : 2 colonnes maintenues */
}


/* ============================================================
   RESPONSIVE — MOBILE (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {

  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  /* Header simplifié */
  .header-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding-block: 0.9rem;
  }

  /* Hero */
  .hero {
    height: 85vh;
    min-height: 500px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  /* Cards : 1 colonne */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }

  .card-img-wrap {
    height: 200px;
  }

  /* Entretien : 1 colonne */
  .entretien-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Image pleine largeur */
  .full-bleed-image {
    height: 260px;
  }

  /* Tendances : ajustement grille */
  .tendance-item {
    grid-template-columns: 1.5rem 1fr;
    gap: var(--space-sm);
  }
}
