/* =========================================================
   Styles globaux - Site Eliane Desther
   Palette : Crème, Ivoire, Ocre, Brun doux
   ========================================================= */

/* Variables de design (palette chaleureuse) */
:root {
  /* Palette principale */
  --color-bg: #FAF6F1;
  --color-bg-card: #F2EBE0;
  --color-bg-dark: #E8DFD3;
  --color-text: #3D2B1F;
  --color-text-muted: #7A5C3A;
  --color-accent: #C8A96E;
  --color-accent-hover: #B8954A;
  --color-accent-light: rgba(200, 169, 110, 0.15);
  
  /* Typographie */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
  
  /* Transitions et effets */
  --transition: 0.3s ease;
  --radius: 6px;
  --max-width: 1400px;
  
  /* Ombres douces */
  --shadow-sm: 0 2px 8px rgba(61, 43, 31, 0.06);
  --shadow-md: 0 4px 16px rgba(61, 43, 31, 0.08);
  --shadow-lg: 0 8px 32px rgba(61, 43, 31, 0.12);
}

/* Reset minimal et base typographique */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Layout principal */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.section-subtitle {
  max-width: 70ch;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.8rem 1.35rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-outline {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--color-accent-hover);
  color: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #101010;
  font-weight: 600;
}

.btn-solid:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  transition: background-color var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
  background: transparent;
}

.site-header.is-scrolled {
  background: rgba(250, 246, 241, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
}

.nav-wrap {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--color-text);
  white-space: nowrap;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Sur la page d'accueil uniquement : masquer le titre brand avant le scroll */
body[data-page="home"] .brand {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Réafficher le titre brand quand on scroll sur la page d'accueil */
body[data-page="home"] .is-scrolled .brand {
  opacity: 1 !important;
  visibility: visible !important;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  position: relative;
  font-size: 0.97rem;
  color: var(--color-text);
  transition: color var(--transition), text-shadow var(--transition);
}

/* Menu lisible sur hero (avant scroll) */
body[data-page="home"] .site-header:not(.is-scrolled) {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
  backdrop-filter: blur(2px);
}

body[data-page="home"] .site-header:not(.is-scrolled) .nav-link {
  color: #FAF6F1;
  text-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

body[data-page="home"] .site-header:not(.is-scrolled) .nav-link:hover,
body[data-page="home"] .site-header:not(.is-scrolled) .nav-link.is-active {
  color: var(--color-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.45rem;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-accent);
}

.nav-link.is-active {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

/* Bouton hamburger mobile */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(122, 92, 58, 0.3);
  border-radius: var(--radius);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

/* =========================================================
   Hero accueil
   ========================================================= */
.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(61, 43, 31, 0.25) 0%,
    rgba(61, 43, 31, 0.15) 30%,
    rgba(61, 43, 31, 0.35) 60%,
    rgba(61, 43, 31, 0.65) 100%
  );
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 6.2rem);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.8rem;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  margin-bottom: 2rem;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

/* === Hero Effects - Modifiers === */

/* Backdrop blur sur l'image */
.hero--blur .hero-bg {
  filter: blur(var(--hero-blur, 3px));
  transform: scale(1.02); /* compense les bords flous */
}

/* Gradient radial centré pour assombrir derrière le texte */
.hero--radial::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 50%,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    transparent 80%
  );
  z-index: 1;
  pointer-events: none;
}

/* Bandeau semi-transparent derrière le contenu */
.hero--backdrop .hero-content {
  background: rgba(61, 43, 31, 0.55);
  padding: 2.5rem 3rem;
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 169, 110, 0.3);
}

/* Contour texte (stroke) pour le titre */
.hero--stroke .hero-title {
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.6);
  paint-order: stroke fill;
}

.hero--stroke .hero-subtitle {
  -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.4);
  paint-order: stroke fill;
}

/* Couleurs du titre hero - Classes dynamiques */
.hero-title--white { color: #FFFFFF; }
.hero-title--cream { color: #FAF6F1; }
.hero-title--gold { color: #C8A96E; }
.hero-title--brown { color: #7A5C3A; }
.hero-title--dark { color: #3D2B1F; }
.hero-title--black { color: #1a1a1a; }

/* Couleurs du sous-titre hero */
.hero-subtitle--white { color: #FFFFFF; }
.hero-subtitle--cream { color: #FAF6F1; }
.hero-subtitle--gold { color: #C8A96E; }
.hero-subtitle--brown { color: #7A5C3A; }
.hero-subtitle--muted { color: var(--color-text-muted); }

.maintenance-note {
  max-width: 90%;
  width: clamp(280px, 60vw, 700px);
  margin: 1rem auto 0;
  padding: 2rem 2.5rem;
  border: 1px solid rgba(200, 169, 110, 0.35);
  border-radius: var(--radius);
  color: #FAF6F1;
  background: rgba(61, 43, 31, 0.08);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.maintenance-note p {
  margin: 0;
}

.maintenance-note p + p {
  margin-top: 1.25rem;
}

.maintenance-note strong {
  color: var(--color-accent);
  font-weight: 500;
}

/* =========================================================
   Cartes / grilles communes
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.card {
  background: var(--color-bg-card);
  border: 1px solid rgba(122, 92, 58, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.artwork-card {
  position: relative;
  overflow: hidden;
}

.artwork-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.artwork-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(61, 43, 31, 0.85), rgba(61, 43, 31, 0));
  opacity: 0;
  transition: opacity var(--transition);
}

.artwork-overlay h3,
.artwork-overlay p {
  color: #FAF6F1;
}

.artwork-overlay .artwork-meta p {
  color: rgba(250, 246, 241, 0.75);
}

.artwork-card:hover .artwork-overlay {
  opacity: 1;
}

.artwork-meta h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.artwork-meta p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =========================================================
   Section artiste accueil
   ========================================================= */
.artist-intro {
  align-items: center;
}

.artist-photo {
  border-radius: var(--radius);
  overflow: hidden;
}

.artist-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.artist-text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* Bloc exposition accent */
.expo-highlight {
  background: var(--color-accent);
  color: #17140f;
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 0.7rem;
}

.expo-highlight h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.expo-highlight p {
  max-width: 70ch;
}

/* =========================================================
   Pages internes (hero compact)
   ========================================================= */
.page-hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(122, 92, 58, 0.12);
  background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-card));
}

.page-hero--compact {
  padding-top: 5.5rem;
  padding-bottom: 1.5rem;
}

.page-hero--compact .page-intro {
  margin-bottom: 0.5rem;
  max-width: none;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.page-hero p {
  color: var(--color-text-muted);
  max-width: 70ch;
}

/* =========================================================
   Timeline (artiste)
   ========================================================= */
.timeline {
  position: relative;
  padding-left: 1.4rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.6rem 1.2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.2rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.timeline-item p {
  color: var(--color-text-muted);
}

/* =========================================================
   Formulaire contact
   ========================================================= */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.form-card {
  background: #FFFFFF;
  border: 1px solid rgba(122, 92, 58, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  border: 1px solid rgba(122, 92, 58, 0.25);
  background: #FFFFFF;
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea.form-control {
  min-height: 160px;
  resize: vertical;
}

.form-control:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.2);
}

.form-help,
.form-error,
.form-success {
  margin-top: 0.55rem;
  font-size: 0.92rem;
}

.form-help {
  color: var(--color-text-muted);
}

.form-error {
  color: #c0392b;
}

.form-success {
  color: #27ae60;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid rgba(122, 92, 58, 0.15);
  padding: 1.5rem 0;
  margin-top: 4rem;
  background: var(--color-bg-dark);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* =========================================================
   Animations d'entrée au scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 1rem;
    margin-top: 0.7rem;
    background: rgba(250, 246, 241, 0.98);
    border: 1px solid rgba(122, 92, 58, 0.15);
    border-radius: var(--radius);
    padding: 0.9rem;
    min-width: 230px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 680px) {
  .section {
    padding: 4.25rem 0;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-title {
    line-height: 1.05;
  }
}
