/* La DA suit le logo dessiné à la main, en noir et blanc :
   noir du coton, blanc et gris argent de la javel. */
:root {
  --noir: #000;
  --encre: #0d0d0d;
  --trait: #262626;
  --gris: #9a9a9a;
  --creme: #f4f4f4;
  --accent: #ffffff;
  --accent-fonce: #d9d9d9;
  --accent-doux: #bdbdbd;
  /* le dégradé du logo, du blanc au gris argent, pour les titres */
  --degrade: linear-gradient(180deg, #ffffff 0%, #ffffff 45%, #a6a6a6 100%);
  /* une seule police, sobre et moderne : les titres sont en DM Sans gras */
  --titre: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --texte: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --marge: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--noir);
  color: var(--creme);
  font-family: var(--texte);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grain posé sur toute la page. Il défile avec elle (absolute, pas fixed) et reste sous la barre :
   un calque fixe en haut de l'écran empêche Safari (iOS 26) de prolonger la barre sous l'heure. */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.defs { position: absolute; width: 0; height: 0; }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

::selection { background: var(--accent); color: var(--noir); }

/* Titres et noms : DM Sans gras, dégradé de javel découpé dans les lettres
   (la marge intérieure évite de couper les jambages). */
h2, .legal-titre, .drop-nom, .collection h3, .piece-infos h3 {
  font-family: var(--titre);
  font-weight: 700;
  letter-spacing: -.025em;
  background: var(--degrade);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: .08em .12em .16em 0;
}

/* ---------- Barre du haut ---------- */

.barre {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px var(--marge);
  /* fond noir opaque : Safari (iOS 26) prolonge alors la barre jusqu'en haut de l'écran,
     sous l'heure et la batterie ; avec un fond transparent, la page y défilait à la vue */
  background: var(--noir);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.barre-nom { display: block; flex: none; }
.barre-nom img { display: block; width: 128px; height: auto; }

.barre nav { display: flex; gap: clamp(12px, 3vw, 32px); }

.barre nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.barre nav a:hover, .barre nav a:focus-visible { border-bottom-color: var(--accent); color: var(--accent-doux); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(104px, 16vh, 168px) var(--marge) clamp(48px, 9vh, 88px);
  overflow: hidden;
}

.hero-texte { position: relative; z-index: 2; max-width: 720px; }

/* Les créations à droite du logo. Sur téléphone, la galerie arrive juste dessous. */
.hero-visuel { display: none; }

@media (min-width: 1000px) {
  .hero-visuel {
    display: block;
    position: absolute;
    inset: 0 0 0 auto;
    width: min(50vw, 760px);
    /* La photo se fond dans le noir à gauche et en bas */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 32%), linear-gradient(to top, transparent, #000 22%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 32%), linear-gradient(to top, transparent, #000 22%);
    mask-composite: intersect;
  }

  .hero-visuel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
    opacity: 0;
    transition: opacity 1.4s ease;
  }

  .hero-visuel img.active { opacity: 1; }
}

.promo {
  display: inline-block;
  margin-bottom: 22px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 22px; /* reste joli sur deux lignes, au téléphone */
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .02em;
}

.promo strong { font-weight: 700; color: var(--accent-doux); }
.promo[hidden] { display: none; }
.promo-commande { margin: -16px 0 36px; }

/* Sur-titres (« Tee-shirts décolorés à la javel », « Prochain drop ») */
.sur-titre {
  font: 500 16px/1.4 var(--texte);
  color: var(--accent-doux);
}

h1 { margin: 10px 0 18px; line-height: 0; }
h1 img { display: block; width: min(100%, 640px); height: auto; margin-left: -8px; }

.signature {
  margin-bottom: 22px;
  font-size: 13px;
  letter-spacing: .2em;
  color: #d9d9d9;
}

.signature:empty { display: none; }

.pied small { margin-left: 8px; font-size: 12px; letter-spacing: .12em; text-transform: none; }

.accroche { max-width: 34ch; font-size: 18px; color: #d9d9d9; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1.5px solid var(--creme);
  border-radius: 999px;
  background: transparent;
  color: var(--creme);
  font: 700 12px/1 var(--texte);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.bouton:hover, .bouton:focus-visible { background: var(--creme); color: var(--noir); }
.bouton-plein { border-color: var(--accent); background: var(--accent); color: var(--noir); }
.bouton-plein:hover, .bouton-plein:focus-visible { border-color: var(--accent-doux); background: var(--accent-doux); color: var(--noir); }
.bouton[disabled] { opacity: .5; cursor: wait; }

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

.defile {
  position: absolute;
  z-index: 2;
  right: var(--marge);
  bottom: 72px;
  color: var(--gris);
}

/* Apparition douce au défilement (posée par main.js ; rien ne bouge si le visiteur préfère moins d'animations) */
.js .apparait { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .apparait.vu { opacity: 1; transform: none; }

/* ---------- Sections ---------- */

.section {
  padding: clamp(64px, 12vw, 140px) var(--marge);
  border-top: 1px solid var(--trait);
}

.section-tete { max-width: 900px; margin-bottom: clamp(36px, 6vw, 72px); }
.section-tete p { max-width: 560px; font-size: 17px; color: #c8c8c8; }

.numero { font-size: 13px; font-weight: 500; letter-spacing: .08em; color: var(--accent); }
.numero::after { content: " —"; color: var(--trait); }

/* Grands titres serrés */
h2 {
  font-size: clamp(52px, 11vw, 128px);
  line-height: .92;
  letter-spacing: -.05em;
  margin: 6px 0 18px;
}

/* ---------- Collections ---------- */

/* Décompte de la prochaine collection limitée */
/* Décompte : pas de cadre, de très grands chiffres */
.decompte { margin-bottom: clamp(56px, 9vw, 110px); }
.drop-nom { font-size: clamp(56px, 12vw, 150px); line-height: .9; letter-spacing: -.055em; margin: 4px 0 12px; }
.drop-texte { max-width: 48ch; font-size: 17px; color: #d9d9d9; }
.compteur { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 clamp(10px, 2.4vw, 28px); margin: clamp(22px, 4vw, 40px) 0 18px; }
.compteur span { display: grid; gap: 6px; }
.compteur b { font: 700 clamp(44px, 11vw, 132px)/.85 var(--texte); letter-spacing: -.05em; font-variant-numeric: tabular-nums; color: var(--creme); }
.compteur .sep { font: 700 clamp(44px, 11vw, 132px)/.85 var(--texte); font-style: normal; color: #5c5c5c; }
.compteur small { padding-left: .15em; font-size: 13px; font-weight: 500; color: var(--gris); }
.drop-date { font-size: 14px; color: var(--gris); }

/* Une carte par collection en vente */
.collections { max-width: 1320px; display: grid; gap: 20px; }
.collection { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); overflow: hidden; border-radius: 28px; background: var(--encre); }
.collection-photos { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 2px; background: var(--trait); }
/* Hauteur fixe : une photo seule devient un bandeau, trois photos des portraits. */
.collection-photos img, .collection-vide { display: block; width: 100%; height: clamp(260px, 34vw, 460px); object-fit: cover; object-position: 50% 30%; background: var(--encre); }
.collection-texte { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; padding: clamp(22px, 4vw, 44px); }
.collection-etat { font: 500 15px/1.4 var(--texte); color: var(--accent-doux); }
.collection h3 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.collection-description { max-width: 40ch; color: #d9d9d9; }
.collection .bouton { margin-top: 8px; }

@media (max-width: 760px) {
  .collection { grid-template-columns: 1fr; }
  .collection-photos img, .collection-vide { height: min(64vw, 320px); }
}

/* Filtre de la galerie par collection */
.filtres-pieces { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filtres-pieces button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #444444;
  border-radius: 999px;
  background: none;
  color: var(--gris);
  font: 500 14px/1 var(--texte);
  cursor: pointer;
}
.filtres-pieces button span { margin-left: 8px; font: 500 12px/1 var(--texte); color: var(--accent-doux); }
.filtres-pieces button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--noir); }
.filtres-pieces button[aria-pressed="true"] span { color: var(--noir); }
.piece-collection { display: block; margin-bottom: 2px; font: 500 13px/1.3 var(--texte); color: var(--accent-doux); }

/* ---------- Galerie ---------- */

.galerie {
  max-width: 1320px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 48px 24px;
}
.galerie-vide { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.galerie-vide p { max-width: 36ch; font: 400 clamp(18px, 2.2vw, 22px)/1.5 var(--texte); color: var(--gris); }

/* Cartes sans cadre : la photo d'abord, les infos dessous */
.piece { display: flex; flex-direction: column; }


.piece-visuel {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: var(--encre);
}

.piece-visuel img, .piece-visuel svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform .6s ease;
}

.piece-visuel img { object-fit: cover; }

/* Pièce à plusieurs photos : une seule visible à la fois */
.piece-visuel img.vue { opacity: 0; transition: opacity .35s ease, transform .6s ease; }
.piece-visuel img.vue.active { opacity: 1; }

.vues { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }

.vues button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--creme);
  border-radius: 999px;
  background: rgba(0, 0, 0, .75);
  color: var(--creme);
  font: 500 11px/1 var(--texte);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.vues button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--noir); }

/* Option « photosEnNoirEtBlanc » des réglages */
.photos-nb .piece-visuel img { filter: grayscale(1) contrast(1.15); }

.piece:hover .piece-visuel img, .piece:hover .piece-visuel svg { transform: scale(1.04); }
/* Au survol (souris), la pièce se retourne : on voit l'autre photo */
@media (hover: hover) {
  .piece-visuel:has(img.vue + img.vue):hover img.vue.active { opacity: 0; }
  .piece-visuel:has(img.vue + img.vue):hover img.vue:not(.active) { opacity: 1; }
}
.badge-unique { position: absolute; top: 12px; right: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 12px; font-weight: 500; color: var(--creme); }

.a-venir {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--noir);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris);
}

.piece-infos {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 18px 4px 6px;
}

.piece-infos h3 { font-size: 22px; line-height: 1.2; }
.piece-prix { font-size: 13px; color: var(--gris); white-space: nowrap; text-align: right; }
.piece-prix strong { font-weight: 700; font-size: 16px; color: var(--accent-doux); }
.piece-prix s { margin-right: 6px; }
.piece-prix small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.piece-note { padding: 0 4px; font-size: 14px; color: var(--gris); }

.piece-lien {
  margin: 12px 4px 0;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  padding: 6px 0;
}
.piece-lien:hover { color: var(--accent-doux); }

/* ---------- Formulaire ---------- */

.formulaire {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(20px, 4vw, 48px);
  max-width: 860px;
}

.champ-large { grid-column: 1 / -1; }

.champ label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-doux);
  margin-bottom: 4px;
}

.champ input, .champ select, .champ textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #555555;
  border-radius: 0;
  background: transparent;
  color: var(--creme);
  font: 400 16px/1.5 var(--texte);
  appearance: none;
}

.champ input[type="file"] { margin-top: 6px; padding: 12px; border: 1px dashed #555555; border-radius: 16px; font-size: 13px; color: #c8c8c8; cursor: pointer; }
.champ input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 9px 14px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--creme);
  font: 700 11px/1 var(--texte);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}

.champ textarea { resize: vertical; border: 1px solid #555555; border-radius: 16px; padding: 12px 14px; margin-top: 6px; }

.champ select {
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 11px) 55%, calc(100% - 6px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.champ select option { background: var(--noir); color: var(--creme); }

.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--accent); }
.champ ::placeholder { color: #777777; }

.champ.invalide input, .champ.invalide select, .champ.invalide textarea { border-color: var(--accent-doux); border-style: dashed; }

.erreur { min-height: 1.4em; margin-top: 4px; font-size: 13px; color: var(--accent-doux); }

.tel { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #555555; }
.tel:focus-within { border-color: var(--accent); }
.tel-indicatif { font: 400 16px/1.5 var(--texte); color: var(--gris); }
.champ .tel input { border-bottom: 0; }
.champ.invalide .tel { border-bottom: 1px dashed var(--accent-doux); }
.discret-champ { margin-top: 6px; font-size: 12px; color: var(--gris); }

.champ #code { text-transform: uppercase; letter-spacing: .12em; }

.prix-choisi { margin-top: 8px; font-size: 12px; line-height: 1.5; color: #d9d9d9; }
.prix-choisi:empty { display: none; }

.mention-donnees { margin: -8px 0 0; font-size: 12px; line-height: 1.6; color: var(--gris); }
.mention-donnees a { color: var(--accent-doux); text-underline-offset: 4px; white-space: nowrap; }

.legal section[id] { scroll-margin-top: 110px; }

.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.envoi { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.etat { font-size: 13px; max-width: 46ch; }
.etat:empty { display: none; }
.etat.ok { border-left: 3px solid var(--accent); padding-left: 14px; }
.etat.ko { border-left: 3px dashed var(--accent-doux); padding-left: 14px; color: var(--accent-doux); }

/* ---------- Pied ---------- */

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 32px var(--marge) 48px;
  border-top: 1px solid var(--trait);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gris);
}

.pied-marque { display: flex; align-items: center; gap: 4px; }
.pied-marque img { display: block; width: 120px; height: auto; }
.pied a { margin-right: 20px; text-underline-offset: 5px; text-decoration-color: var(--accent); }
.pied a:last-child { margin-right: 0; }

/* ---------- Mentions légales ---------- */

.legal { max-width: 760px; margin: 0 auto; padding: clamp(120px, 18vh, 170px) var(--marge) clamp(56px, 10vw, 110px); }
.legal-titre { font-size: clamp(40px, 7.5vw, 64px); line-height: 1.05; margin: 0 0 8px; }
.legal-date { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); margin-bottom: 40px; }
.legal section { padding: 28px 0; border-top: 1px solid var(--trait); }
.legal h2 { font-size: clamp(28px, 5vw, 36px); margin: 0 0 14px; }
.legal p, .legal li { color: #d9d9d9; }
.legal p + p, .legal ul + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal strong { font-weight: 700; color: var(--creme); }
.legal a { text-underline-offset: 4px; text-decoration-color: var(--accent); }
.legal-retour { padding-top: 28px; border-top: 1px solid var(--trait); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Téléphone ---------- */

@media (max-width: 640px) {
  .formulaire { grid-template-columns: 1fr; }
  /* Deux liens au plus : « Pièces » (ou « Collections » s'il y en a) et « Commander ». */
  .barre nav a[data-lien-collections]:not([hidden]) ~ a[href="#pieces"] { display: none; }
  .hero { padding-bottom: 56px; }
  .defile { display: none; }
  .actions .bouton { flex: 1 1 100%; }
  .envoi .bouton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .js .apparait { opacity: 1; transform: none; }
}
