/* =========================================================
   GLAZ — Youenn Kerbrat, artiste peintre à Dinan
   Le désordre est la direction artistique.
   ========================================================= */

:root {
  --noir: #141414;
  --blanc-sale: #F2EEE3;
  --rose: #FF2E88;
  --bleu: #1F3DFF;
  --jaune: #E8FF00;
  --glaz: #3E7A75;
  --glaz-clair: #6FB3AC;
  --glaz-deep: #2B5D59; /* variante foncee du glaz, calibree pour le contraste texte */

  --display: "Rubik Mono One", system-ui, sans-serif;
  --manuscrite: "Permanent Marker", cursive;
  --machine: "Special Elite", monospace;

  --rot-1: -2deg;
  --rot-2: 1.5deg;
  --rot-3: -1deg;
  --rot-4: 2.5deg;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--blanc-sale);
  color: var(--noir);
  font-family: var(--machine);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  padding-bottom: 2.4rem; /* laisse la place au bandeau demo fixe */
}

img, svg {
  max-width: 100%;
}

a {
  color: inherit;
}

/* ---------- Focus visible : navigation clavier ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 4px solid var(--glaz);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--jaune);
  color: var(--noir);
  padding: 0.8rem 1.2rem;
  z-index: 9999;
  font-family: var(--machine);
  font-weight: bold;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---------- Curseur pinceau (désactivé si pas de souris fine / reduced motion) ---------- */
.brush-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-4px, -30px) rotate(-25deg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><path d='M8 32 L18 22 L24 28 L14 38 Z' fill='%233E7A75'/><rect x='16' y='10' width='8' height='16' rx='3' transform='rotate(-45 20 18)' fill='%23141414'/><rect x='20' y='2' width='6' height='12' rx='2' transform='rotate(-45 23 8)' fill='%23C9A227'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .brush-cursor {
    display: block;
  }
}

#splash-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* ---------- Bouton téléphone flottant ---------- */
.phone-float {
  position: fixed;
  bottom: 3.2rem;
  right: 1rem;
  z-index: 500;
  background: var(--rose);
  color: var(--noir);
  font-family: var(--machine);
  font-weight: bold;
  text-decoration: none;
  padding: 0.7rem 1rem;
  border: 3px solid var(--noir);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--noir);
  transform: rotate(-3deg);
  transition: transform 0.15s ease;
}
.phone-float:hover,
.phone-float:focus-visible {
  transform: rotate(0deg) scale(1.05);
}

/* ---------- Bouton N'APPUYEZ PAS ---------- */
.dont-press {
  position: fixed;
  top: 4.2rem;
  left: 1rem;
  z-index: 500;
  background: var(--jaune);
  color: var(--noir);
  font-family: var(--machine);
  font-weight: bold;
  font-size: 0.75rem;
  border: 3px dashed var(--noir);
  padding: 0.5rem 0.8rem;
  cursor: none;
  transform: rotate(4deg);
  box-shadow: 3px 3px 0 var(--noir);
}
.dont-press:hover {
  transform: rotate(0deg) scale(1.08);
}

body.inverted {
  filter: invert(1) hue-rotate(180deg);
}

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee-wrap {
  position: sticky;
  top: 0;
  z-index: 400;
  background: var(--noir);
  color: var(--jaune);
  border-bottom: 4px solid var(--glaz);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 0;
}

.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

.marquee-track span {
  font-family: var(--machine);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  padding-right: 1rem;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   LAYOUT GENERAL DES SECTIONS
   ========================================================= */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
}

.kicker {
  font-family: var(--machine);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--noir);
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 2rem 0;
  color: var(--noir);
}

.section-title--marker {
  font-family: var(--manuscrite);
  color: var(--rose);
  text-shadow: 2px 2px 0 var(--noir);
}

/* chaque section a une petite gifle de rotation + fond alterné */
.manifeste {
  background: var(--noir);
  color: var(--blanc-sale);
  transform: rotate(var(--rot-1));
  margin: 2rem -3vw;
  clip-path: polygon(0 2%, 100% 0, 99% 97%, 2% 100%);
  position: relative;
  z-index: 1;
}
.manifeste .section-inner { transform: rotate(calc(var(--rot-1) * -1)); }
.manifeste .kicker { color: var(--jaune); }
.manifeste .section-title--marker { color: var(--jaune); text-shadow: 2px 2px 0 var(--rose); }

.series {
  background: var(--glaz);
  color: var(--blanc-sale);
  transform: rotate(var(--rot-2));
  margin: 3rem -4vw;
  clip-path: polygon(1% 0, 100% 3%, 99% 100%, 0 98%);
  position: relative;
  z-index: 1;
}
.series .section-inner { transform: rotate(calc(var(--rot-2) * -1)); }
.series .section-title { color: var(--blanc-sale); }
.series .kicker { color: var(--jaune); }

.atelier {
  background: var(--bleu);
  color: var(--blanc-sale);
  transform: rotate(var(--rot-3));
  margin: 3rem -3vw;
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  position: relative;
  z-index: 1;
}
.atelier .section-inner { transform: rotate(calc(var(--rot-3) * -1)); }
.atelier .kicker { color: var(--jaune); }
.atelier .section-title { color: var(--blanc-sale); }

.expos {
  transform: rotate(var(--rot-4));
  margin: 3rem -3vw;
}
.expos .section-inner { transform: rotate(calc(var(--rot-4) * -1)); }

.acheter {
  background: var(--rose);
  color: var(--noir);
  transform: rotate(var(--rot-1));
  margin: 3rem -3vw;
  clip-path: polygon(2% 0, 100% 2%, 98% 100%, 0 99%);
  position: relative;
  z-index: 1;
}
.acheter .section-inner { transform: rotate(calc(var(--rot-1) * -1)); }
.acheter .section-title--marker { color: var(--noir); text-shadow: 2px 2px 0 var(--blanc-sale); }

.contact {
  background: var(--jaune);
  color: var(--noir);
  transform: rotate(calc(var(--rot-2) * -1));
  margin: 3rem -3vw 5rem;
  clip-path: polygon(0 0, 100% 1%, 100% 98%, 1% 100%);
  position: relative;
  z-index: 1;
}
.contact .section-inner { transform: rotate(var(--rot-2)); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.2rem 4rem;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(242, 238, 227, 0.88), rgba(242, 238, 227, 0.88)), url("images/hero-fond.jpg");
  background-size: cover;
  background-position: center;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(4rem, 22vw, 13rem);
  line-height: 0.85;
  margin: 0;
  color: var(--noir);
  letter-spacing: 0.02em;
  position: relative;
  transform: rotate(-2deg);
  -webkit-text-stroke: 3px var(--noir);
}

.hero-title-line {
  display: inline-block;
  position: relative;
  white-space: nowrap;
}

.glaz-letter {
  color: var(--glaz);
  -webkit-text-stroke: 3px var(--noir);
}

.hero-manifesto {
  font-family: var(--manuscrite);
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--glaz-deep);
  max-width: 40rem;
  margin: 1.5rem 0 2.2rem;
  transform: rotate(1deg);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--noir);
  opacity: 0.75;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  font-family: var(--machine);
  font-weight: bold;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border: 3px solid var(--noir);
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 5px 5px 0 var(--noir);
}
.btn:hover, .btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--noir);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--noir);
}
.btn--primary {
  background: var(--glaz-deep);
  color: var(--blanc-sale);
}
.btn--secondary {
  background: var(--jaune);
  color: var(--noir);
}
.btn--submit {
  cursor: none;
}

/* =========================================================
   STICKERS / TAMPONS
   ========================================================= */
.stamp {
  position: absolute;
  font-family: var(--machine);
  font-weight: bold;
  border: 4px solid currentColor;
  border-radius: 50%;
  padding: 0.8rem 0.4rem;
  width: 7rem;
  height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.stamp--vendu {
  color: var(--rose);
  top: 8%;
  right: 6%;
  transform: rotate(14deg);
}

.stamp--peut-etre {
  color: var(--bleu);
  bottom: 10%;
  left: 4%;
  transform: rotate(-10deg);
}

.stamp--pas-a-vendre {
  color: var(--noir);
}

.stamp--revenez {
  color: var(--glaz);
}

/* =========================================================
   MANIFESTE — corrections a la main
   ========================================================= */
.manifeste-text p {
  font-family: var(--machine);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 42rem;
  margin: 0 auto 1.6rem;
}

.strike {
  text-decoration: line-through;
  text-decoration-color: var(--rose);
  text-decoration-thickness: 3px;
  opacity: 0.55;
}

.correction {
  font-family: var(--manuscrite);
  color: var(--jaune);
  font-size: 1.1em;
  margin-left: 0.3em;
}

/* =========================================================
   SERIES
   ========================================================= */
.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.series-card {
  background: var(--blanc-sale);
  color: var(--noir);
  border: 3px solid var(--noir);
  padding: 1.6rem;
  box-shadow: 6px 6px 0 var(--noir);
}
.series-card--1 { transform: rotate(-2deg); }
.series-card--2 { transform: rotate(1.5deg); }
.series-card--3 { transform: rotate(-1deg); }

.series-card-img {
  display: block;
  width: calc(100% + 3.2rem);
  margin: -1.6rem -1.6rem 1rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 3px solid var(--noir);
}

.series-card h3 {
  font-family: var(--manuscrite);
  color: var(--glaz);
  font-size: 1.6rem;
  margin: 0 0 0.6rem;
}

.series-card p {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* =========================================================
   GALERIE CHAOTIQUE
   ========================================================= */
.galerie {
  background: var(--blanc-sale);
}

.galerie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem 1.4rem;
  align-items: start;
}

.toile {
  position: relative;
  border: 3px solid var(--noir);
  background: var(--blanc-sale);
  padding: 0.6rem;
  box-shadow: 6px 6px 0 var(--noir);
  transition: transform 0.2s ease, box-shadow 0.2s ease, z-index 0s;
}
.toile:hover,
.toile:focus-within {
  transform: rotate(0deg) scale(1.04) !important;
  box-shadow: 10px 10px 0 var(--noir);
  z-index: 5;
}

.toile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--noir);
}

.toile-caption {
  font-family: var(--machine);
  font-size: 0.78rem;
  margin-top: 0.6rem;
  line-height: 1.4;
}

.toile-titre {
  font-weight: bold;
  display: block;
}

.toile-prix {
  color: var(--glaz-deep);
  font-weight: bold;
}

.galerie-cta {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-family: var(--machine);
  font-size: 1rem;
}

/* variations de taille / rotation / position — le desordre volontaire */
.toile:nth-child(1) { grid-column: span 2; transform: rotate(-3deg); }
.toile:nth-child(2) { transform: rotate(2deg); margin-top: 2.4rem; }
.toile:nth-child(3) { transform: rotate(-1.5deg); }
.toile:nth-child(4) { grid-column: span 2; transform: rotate(1deg); margin-top: -1rem; }
.toile:nth-child(5) { transform: rotate(3deg); }
.toile:nth-child(6) { transform: rotate(-2deg); margin-top: 1.6rem; }
.toile:nth-child(7) { grid-column: span 2; transform: rotate(-1deg); }
.toile:nth-child(8) { transform: rotate(2.5deg); }
.toile:nth-child(9) { transform: rotate(-2.5deg); margin-top: 1rem; }
.toile:nth-child(10) { grid-column: span 2; transform: rotate(1.5deg); }

/* =========================================================
   ATELIER
   ========================================================= */
.section-inner--split {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.atelier-address {
  font-family: var(--manuscrite);
  font-size: 1.6rem;
  color: var(--jaune);
  margin: 0.6rem 0 1.2rem;
}

.atelier-visual {
  display: flex;
  justify-content: center;
}

.atelier-photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 4 / 7;
  object-fit: cover;
  border: 6px solid var(--noir);
  border-radius: 6px 6px 60px 60px;
  transform: rotate(3deg);
  box-shadow: 8px 8px 0 var(--noir);
}

/* =========================================================
   EXPOS
   ========================================================= */
.expos-note {
  font-family: var(--manuscrite);
  color: var(--glaz-deep);
  font-size: 1.1rem;
  max-width: 36rem;
}

.expos-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.expos-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 2px dashed var(--noir);
  padding-bottom: 0.9rem;
  font-size: 0.95rem;
}

.expos-date {
  font-weight: bold;
  min-width: 9rem;
}

.expos-lieu {
  flex: 1;
}

.expos-tag {
  font-family: var(--machine);
  text-transform: uppercase;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 2px solid var(--noir);
}

.expos-item--past .expos-tag {
  background: var(--blanc-sale);
}

.expos-item--future .expos-tag {
  background: var(--jaune);
}

/* =========================================================
   ACHETER
   ========================================================= */
.acheter-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.acheter-step {
  background: var(--blanc-sale);
  border: 3px solid var(--noir);
  padding: 1.2rem;
  box-shadow: 5px 5px 0 var(--noir);
  position: relative;
}
.acheter-step:nth-child(odd) { transform: rotate(-1.5deg); }
.acheter-step:nth-child(even) { transform: rotate(1.5deg); }

.acheter-num {
  font-family: var(--display);
  color: var(--glaz);
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.acheter-commande {
  font-size: 1rem;
  max-width: 38rem;
}

.acheter-punch {
  font-family: var(--manuscrite);
  font-size: 1.8rem;
  color: var(--noir);
  text-shadow: 2px 2px 0 var(--blanc-sale);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-phone-big {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--noir);
  text-decoration: none;
  background: var(--blanc-sale);
  border: 4px solid var(--noir);
  padding: 0.8rem 1.4rem;
  margin-bottom: 2rem;
  box-shadow: 6px 6px 0 var(--noir);
  transform: rotate(-1deg);
}
.contact-phone-big:hover, .contact-phone-big:focus-visible {
  transform: rotate(0deg);
}

.contact-form {
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-family: var(--machine);
  font-weight: bold;
  font-size: 0.9rem;
}

.form-row input,
.form-row textarea {
  font-family: var(--machine);
  font-size: 1rem;
  padding: 0.7rem;
  border: 3px solid var(--noir);
  border-radius: 3px;
  background: var(--blanc-sale);
  color: var(--noir);
  resize: vertical;
}

.contact-form-result {
  margin-top: 1.2rem;
  font-family: var(--manuscrite);
  font-size: 1.3rem;
  color: var(--glaz-deep);
  min-height: 1.5em;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--noir);
  color: var(--blanc-sale);
  padding-bottom: 1rem;
}

.footer-brand {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--glaz-clair);
  margin: 0 0 0.4rem;
}

.footer-heading {
  font-weight: bold;
  color: var(--jaune);
  margin-bottom: 0.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  font-size: 0.85rem;
}

.footer-grid p {
  margin: 0.3rem 0;
}

.footer-grid a {
  color: var(--glaz-clair);
  text-decoration: underline;
}

/* =========================================================
   BANDEAU DEMO FIXE
   ========================================================= */
.demo-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  background: var(--noir);
  color: var(--blanc-sale);
  font-family: var(--machine);
  font-size: 0.72rem;
  text-align: center;
  padding: 0.4rem 0.6rem;
  border-top: 2px solid var(--glaz);
}

/* =========================================================
   RESPONSIVE — le chaos se calme sur mobile
   ========================================================= */
@media (max-width: 900px) {
  .series-grid {
    grid-template-columns: 1fr;
  }
  .galerie-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .toile:nth-child(n) {
    grid-column: auto;
    margin-top: 0;
  }
  .section-inner--split {
    grid-template-columns: 1fr;
  }
  .acheter-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 640px) {
  body {
    cursor: auto;
  }
  .brush-cursor {
    display: none !important;
  }

  :root {
    --rot-1: -0.6deg;
    --rot-2: 0.5deg;
    --rot-3: -0.4deg;
    --rot-4: 0.6deg;
  }

  .manifeste, .series, .atelier, .expos, .acheter, .contact {
    margin-left: 0;
    margin-right: 0;
    clip-path: none;
  }

  .hero-title {
    transform: none;
    -webkit-text-stroke: 2px var(--noir);
  }
  .glaz-letter {
    -webkit-text-stroke: 2px var(--noir);
  }
  .hero-manifesto {
    transform: none;
  }

  .stamp {
    width: 5rem;
    height: 5rem;
    font-size: 0.6rem;
    padding: 0.4rem;
  }
  .stamp--vendu { top: 2%; right: 2%; }
  .stamp--peut-etre { bottom: 2%; left: 2%; }

  .series-card--1, .series-card--2, .series-card--3 {
    transform: none;
  }

  .galerie-grid {
    grid-template-columns: 1fr;
  }
  .toile:nth-child(n) {
    transform: none !important;
  }
  .toile:hover, .toile:focus-within {
    transform: none !important;
  }

  .acheter-steps {
    grid-template-columns: 1fr;
  }
  .acheter-step:nth-child(odd), .acheter-step:nth-child(even) {
    transform: none;
  }

  .contact-phone-big {
    transform: none;
    font-size: 1.6rem;
  }

  .phone-float {
    transform: none;
    bottom: 2.6rem;
  }

  .dont-press {
    transform: none;
    font-size: 0.68rem;
  }

  body {
    padding-bottom: 3.2rem;
  }
}

/* =========================================================
   PREFERS REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
  .btn, .toile, .phone-float, .dont-press, .contact-phone-big {
    transition: none;
  }
  .toile:hover, .toile:focus-within,
  .btn:hover, .btn:focus-visible {
    transform: none !important;
  }
}
