/* =========================================================
   David Muguercia — Artiste peintre
   Feuille de style globale
   Palette : chaude et artistique (crème, terre, terracotta, ocre)
   ========================================================= */

:root {
  /* Couleurs */
  --cream:        #f7f1e6;
  --cream-deep:   #efe6d5;
  --paper:        #fbf8f1;
  --ink:          #2c2620;
  --ink-soft:     #5b5249;
  --terracotta:   #b5532f;
  --terracotta-d: #98421f;
  --ocre:         #c89b3c;
  --olive:        #6f7250;
  --line:         #e2d7c4;

  /* Typo */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Mesures */
  --maxw: 1180px;
  --gutter: clamp(1.2rem, 4vw, 3rem);
  --radius: 2px;
  --radius-img: 12px;   /* arrondi des images / vignettes */
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-d); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: 0.5px; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1em; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- Conteneur & sections ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream-deep); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--terracotta);
  margin: 0 0 1rem;
}

.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--terracotta);
  transition: all .2s ease;
  cursor: pointer;
}
.btn--solid { background: var(--terracotta); color: #fff; }
.btn--solid:hover { background: var(--terracotta-d); border-color: var(--terracotta-d); color: #fff; }
.btn--ghost { background: transparent; color: var(--terracotta); }
.btn--ghost:hover { background: var(--terracotta); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.5px;
  line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
  font-weight: 500;
}
.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); font-family: var(--sans);
  font-size: 0.93rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 4px 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--terracotta); transition: width .25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--terracotta); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Bandeau actualité ---------- */
.alert {
  background: var(--ink); color: var(--cream);
  text-align: center; font-size: 0.9rem; padding: 0.7rem var(--gutter);
}
.alert a { color: var(--ocre); font-weight: 600; }
.alert a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; min-height: 78vh; padding: clamp(2.5rem,6vw,5rem) 0;
}
.hero-text h1 { margin-bottom: 0.3em; }
.hero-text .lead { margin-bottom: 1.8rem; }
.hero-figure {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-img);
  overflow: hidden; box-shadow: 0 30px 60px -25px rgba(44,38,32,.45);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Image placeholder (sans photo) ---------- */
.ph {
  background:
    repeating-linear-gradient(135deg, rgba(181,83,47,.08) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, var(--cream-deep), var(--ocre) 280%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--sans); font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase; text-align: center; padding: 1rem;
  width: 100%; height: 100%; min-height: 100%;
}

/* ---------- Intro double (artiste / professeur) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.8rem, 3vw, 2.6rem);
}
.card .eyebrow { margin-bottom: 0.6rem; }

/* ---------- Galerie ---------- */
.gallery-nav { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.gallery-nav button {
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  padding: 0.5rem 1.2rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  transition: .2s;
}
.gallery-nav button.active, .gallery-nav button:hover {
  border-color: var(--terracotta); color: var(--terracotta);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
}
/* Aperçu de la home : colonnes fixes pour rester équilibré (6 = 3+3 / 2+2+2 / 6) */
.grid--featured { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid--featured { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid--featured { grid-template-columns: 1fr; } }
.tile {
  position: relative; aspect-ratio: 1/1; overflow: hidden;
  border-radius: var(--radius-img); background: var(--cream-deep); cursor: pointer;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.05); }
.tile .ph { min-height: 100%; }
.tile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(44,38,32,.85));
  color: var(--cream); padding: 1.6rem 1rem 0.9rem;
  font-family: var(--serif); font-size: 1.05rem;
  opacity: 0; transform: translateY(8px); transition: .3s;
}
.tile:hover figcaption { opacity: 1; transform: translateY(0); }
.tile figcaption span { display: block; font-family: var(--sans); font-size: 0.74rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ocre); }

/* Badge de statut (exposée / disponible / vendu) */
.tile[data-status]::before {
  content: ""; position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  padding: 0.3rem 0.65rem; border-radius: 999px;
}
.tile[data-status="exposee"]::before   { content: "Exposée";    background: rgba(44,38,32,.82); }
.tile[data-status="disponible"]::before { content: "Disponible"; background: var(--olive); }
.tile[data-status="vendu"]::before      { content: "Vendu";      background: var(--terracotta); }
.tile[data-status="vendu"] img          { filter: grayscale(.3) brightness(.92); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(28,24,20,.94); padding: 2rem;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; object-fit: contain;
  border-radius: var(--radius-img); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-cap { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center;
  color: var(--cream); font-family: var(--serif); font-size: 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem; padding: 0 1rem; }
.lightbox-buy { font-family: var(--sans); font-size: 0.85rem; }
.lightbox-close, .lightbox-nav {
  position: absolute; background: none; border: none; color: var(--cream);
  cursor: pointer; font-size: 2rem; padding: 0.5rem 1rem; line-height: 1;
}
.lightbox-close { top: 1rem; right: 1.2rem; font-size: 2.4rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-nav.prev { left: 0.5rem; } .lightbox-nav.next { right: 0.5rem; }
.lightbox-nav:hover, .lightbox-close:hover { color: var(--ocre); }

/* ---------- Cours ---------- */
.course-list { display: grid; gap: 1.4rem; }
.course {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem);
}
.course .badge {
  font-family: var(--serif); font-size: 2.2rem; color: var(--terracotta);
  line-height: 1; min-width: 2.5rem;
}
/* Formules de cours (sur mesure) */
.formules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.formule {
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius-img); padding: 1.4rem 1.3rem;
}
.formule.is-featured { border-color: var(--terracotta); box-shadow: 0 12px 28px -18px rgba(181,83,47,.6); }
.formule .pick { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 0.4rem; min-height: 1em; }
.formule h4 { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 0.2rem; }
.formule .who { font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 0.8rem; font-style: italic; }
.formule ul.feat { list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.92rem; }
.formule ul.feat li { padding: 0.25rem 0 0.25rem 1.3rem; position: relative; }
.formule ul.feat li::before { content: "✦"; position: absolute; left: 0; color: var(--ocre); font-size: 0.8rem; top: 0.35rem; }
.formule .price { margin-top: auto; font-family: var(--serif); font-size: 1.2rem; color: var(--terracotta); padding-top: 0.6rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; list-style: none; padding: 0; }
.tags li {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  background: var(--cream-deep); color: var(--ink-soft);
  padding: 0.3rem 0.8rem; border-radius: 999px;
}

/* ---------- Tarifs sur commande ---------- */
.price-table { width: 100%; border-collapse: collapse; }
.price-table caption { text-align: left; font-family: var(--serif); font-size: 1.4rem;
  color: var(--ink); margin-bottom: 0.6rem; }
.price-table th, .price-table td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
.price-table thead th { font-family: var(--sans); font-size: 0.74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.price-table td.price { color: var(--terracotta); font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; }

/* ---------- Étapes (déroulé d'une commande) ---------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.4rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--terracotta); color: #fff;
  font-family: var(--serif); font-size: 1.15rem; display: flex; align-items: center; justify-content: center; }
.steps h4 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 0.15rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Bio / timeline ---------- */
.bio-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.bio-figure { aspect-ratio: 3/4; border-radius: var(--radius-img); overflow: hidden;
  box-shadow: 0 24px 50px -22px rgba(44,38,32,.45); position: sticky; top: 96px; }
.bio-figure img { width:100%; height:100%; object-fit: cover; }
.timeline { list-style: none; margin: 2rem 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--terracotta); }
.timeline .year { font-family: var(--serif); font-size: 1.2rem; color: var(--terracotta); font-weight: 600; }

/* ---------- Listes CV (biographie) ---------- */
.cv-block { margin-top: 2.6rem; }
.cv-block h2 { margin-bottom: 1.1rem; }
.cv-list { list-style: none; padding: 0; margin: 0; }
.cv-list li { display: grid; grid-template-columns: 130px 1fr; gap: 1.2rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.cv-list li:last-child { border-bottom: 0; }
.cv-list .yr { font-family: var(--serif); font-size: 1.05rem; color: var(--terracotta); font-weight: 600; }
.cv-columns { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
@media (max-width: 720px) { .cv-columns { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cv-list li { grid-template-columns: 1fr; gap: 0.1rem; } }

/* ---------- Techniques ---------- */
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); }
.tech { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-img); overflow: hidden; }
.tech .tech-img { aspect-ratio: 16/10; }
.tech .tech-body { padding: clamp(1.5rem,3vw,2.2rem); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.field { margin-bottom: 1.2rem; }
.field label { display:block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; letter-spacing: 0.03em; }
.field input, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); }
/* Message de retour du formulaire */
.form-msg { padding: 0.9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.4rem;
  font-size: 0.94rem; border: 1.5px solid; }
.form-msg.ok { background: var(--olive); border-color: var(--olive); color: #fff; font-weight: 500; }
.form-msg.ko { background: rgba(181,83,47,.08); border-color: var(--terracotta); color: var(--terracotta-d); }

/* Piège à robots, invisible */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-info p { margin-bottom: 0.6rem; }
.contact-info .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--terracotta); font-weight: 600; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.site-footer h4 { font-family: var(--serif); color: #fff; font-size: 1.3rem; margin: 0 0 1rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--ocre); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-bottom { border-top: 1px solid rgba(247,241,230,.18); padding-top: 1.5rem;
  font-size: 0.82rem; color: rgba(247,241,230,.6); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-credit { text-align: center; margin: 1.2rem 0 0; font-size: 0.78rem; letter-spacing: 0.04em;
  color: rgba(247,241,230,.5); }
.footer-credit a { color: rgba(247,241,230,.75); font-weight: 600; }
.footer-credit a:hover { color: var(--ocre); }

/* ---------- Questions fréquentes ---------- */
.faq { display: grid; gap: 1.2rem; margin-top: 1.8rem; }
.faq-item { background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-img); padding: 1.4rem 1.5rem; }
.faq-item h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 0.4rem; }
.faq-item p { margin: 0; color: var(--ink-soft); }
@media (min-width: 780px) { .faq { grid-template-columns: 1fr 1fr; } }

.maj { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2rem; }

/* ---------- Mention légale (tarifs) ---------- */
.legal { font-size: 0.8rem; color: var(--ink-soft); margin-top: 1.4rem; }

/* ---------- Utilitaires ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; right: 0; left: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 1rem var(--gutter); }
  .nav-links a::after { display: none; }

  .hero-grid, .duo, .tech-grid, .bio-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { min-height: 0; padding-top: 0; }
  .hero-figure { order: -1; }
  .bio-figure { position: static; }
  .course { grid-template-columns: 1fr; }
  .course .badge { font-size: 1.8rem; }
}
