/* ============================================================
   PHOTOSPORT NORMANDY — magazine de la photographie sportive
   Design : noir / blanc / accent signal — galerie premium
   ============================================================ */

:root {
  --noir: #0b0b0c;
  --noir-85: rgba(11, 11, 12, .85);
  --noir-60: rgba(11, 11, 12, .6);
  --papier: #f6f4ef;
  --papier-creux: #ece9e1;
  --accent: #ff4d00;
  --accent-doux: #e04400;
  --accent-texte: #c23a00; /* orange lisible sur fond clair : contraste AA */
  --gris: #6f6c66;
  --gris-clair: #a8a49c;
  --filet: rgba(11, 11, 12, .12);
  --filet-clair: rgba(246, 244, 239, .16);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, "Segoe UI", system-ui, sans-serif;
  --mesure: 34rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--papier);
  color: var(--noir);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

/* ---------- en-tête ---------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--noir-85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--filet-clair);
}

.entete__inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.marque {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
  padding: .5rem 0;
}

.marque svg { display: block; }

.marque b { color: #ff6a1a; font-weight: 700; } /* orange éclairci : contraste AA sur header translucide */

.nav {
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  padding: .55rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav a:hover, .nav a[aria-current="page"] {
  color: #fff;
  border-color: var(--accent);
}

/* ---------- héros ---------- */

.heros {
  position: relative;
  background: var(--noir);
  color: #fff;
  overflow: hidden;
}

.heros img {
  width: 100%;
  height: clamp(26rem, 62vh, 44rem);
  object-fit: cover;
  object-position: center 38%;
}

.heros__texte {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  background: linear-gradient(180deg, rgba(11,11,12,0) 0%, rgba(11,11,12,.32) 38%, rgba(11,11,12,.86) 100%);
}

/* --- héros typographique (dégradé pur, sans photo) --- */

.heros--degrade {
  min-height: clamp(24rem, 58vh, 40rem);
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(54rem 32rem at 84% 30%, rgba(255, 77, 0, .32), transparent 62%),
    radial-gradient(38rem 24rem at 8% 96%, rgba(255, 128, 40, .14), transparent 58%),
    linear-gradient(168deg, #1a1a1f 0%, #0b0b0c 44%, #050506 100%);
}

.heros--degrade::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .026) 0 2px, transparent 2px 7px);
  pointer-events: none;
}

.heros--degrade::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(3rem, 9vw, 5.5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 77, 0, .55) 30%, rgba(255, 255, 255, .12) 62%, transparent 100%);
  pointer-events: none;
}

.heros--degrade .heros__texte {
  position: relative;
  inset: auto;
  background: none;
  padding-top: clamp(2rem, 5vw, 4.5rem);
}

.heros--degrade .heros h1 {
  text-shadow: 0 2px 34px rgba(0, 0, 0, .55);
}

.heros--marque {
  position: absolute;
  top: clamp(1.2rem, 4vw, 2.6rem);
  right: clamp(1.2rem, 4vw, 2.6rem);
  font-family: var(--sans);
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 800;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .055);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.surtitre {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent-texte); /* par défaut sur fond clair : contraste AA */
  display: block;
  margin-bottom: .9rem;
}

/* surtitre posé sur fond sombre : orange signal pleine intensité */
.heros .surtitre, .bandeau-page .surtitre, .section-sombre .surtitre, .encart .surtitre { color: #ff7a2e; }

.heros h1 {
  font-size: clamp(2rem, 5.4vw, 4rem);
  line-height: 1.06;
  font-weight: 500;
  max-width: 24ch;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.heros h1 em { font-style: italic; color: #fff; }

.heros p {
  margin-top: 1.1rem;
  max-width: 52ch;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, .82);
}

/* ---------- structure commune ---------- */

.conteneur {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.bandeau-page {
  background: var(--noir);
  color: #fff;
  padding: clamp(2.4rem, 6vw, 4.6rem) 0 clamp(2rem, 5vw, 3.6rem);
}

.bandeau-page h1 {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  line-height: 1.12;
  font-weight: 500;
  max-width: 26ch;
  text-wrap: balance;
}

.bandeau-page .surtitre { margin-bottom: 1rem; }

.bandeau-page p.chapeau {
  margin-top: 1rem;
  max-width: 58ch;
  color: rgba(255, 255, 255, .8);
  font-size: 1.05rem;
}

.fil-ariane {
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
  padding: 1.1rem 0 0;
}

.fil-ariane a { color: inherit; text-decoration: none; display: inline-block; padding: .5rem 0; }
.fil-ariane a:hover { color: var(--accent); }
.fil-ariane span[aria-hidden] { margin: 0 .45rem; color: var(--accent-texte); }

/* ---------- article ---------- */

.article {
  max-width: var(--mesure);
  margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.6rem) 1.25rem clamp(2.4rem, 5vw, 4rem);
}

.article__entete {
  margin-bottom: 2.2rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--filet);
}

.article h1 {
  font-size: clamp(1.65rem, 3.6vw, 2.5rem);
  line-height: 1.14;
  font-weight: 500;
  text-wrap: balance;
}

.article__meta {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris);
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.article__meta b { color: var(--accent-texte); font-weight: 700; }

.article h2 {
  font-size: 1.42rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 2.6rem 0 .9rem;
  text-wrap: balance;
}

.article h2::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: .8rem;
}

.article p { margin-bottom: 1.15rem; }

.article p:first-of-type::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: .82;
  padding: .08em .12em 0 0;
  font-weight: 600;
  color: var(--accent-doux);
}

.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; }
.article li { margin-bottom: .45rem; }
.article li::marker { color: var(--accent); }

.article strong { font-weight: 700; }

.article a.lien-inline {
  color: var(--accent-texte);
  text-decoration: underline;
  text-decoration-color: rgba(255, 77, 0, .35);
  text-underline-offset: .18em;
}

.article a.lien-inline:hover { text-decoration-color: var(--accent); }

/* lien dans un encart sombre : orange pleine intensité */
.encart a.lien-inline { color: var(--accent); }

.encart {
  background: var(--noir);
  color: #fff;
  padding: 1.5rem 1.6rem;
  margin: 2rem 0;
  border-left: 4px solid var(--accent);
}

.encart p { margin: 0; color: rgba(255,255,255,.88); }
.encart .surtitre { margin-bottom: .5rem; }

.figure {
  margin: 2.2rem 0;
}

.figure figcaption {
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .06em;
  color: var(--gris);
  padding-top: .6rem;
  border-top: 1px solid var(--filet);
  margin-top: .6rem;
  line-height: 1.55;
}

/* --- planche visuelle CSS pure (en attendant l'injection photo) --- */

.plancha {
  aspect-ratio: 3 / 2;
  border: 1px solid var(--filet);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(34rem 20rem at 82% 26%, rgba(255, 77, 0, .22), transparent 60%),
    linear-gradient(168deg, #1a1a1f 0%, #0b0b0c 48%, #050506 100%);
}

.plancha::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 7px);
}

.plancha span {
  position: relative;
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .92);
}

.plancha small {
  position: relative;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #ff6a1a;
}

/* ---------- galeries / grilles ---------- */

.grille-galeries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1.4rem;
  padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(2.6rem, 6vw, 4.4rem);
}

.carte {
  background: #fff;
  border: 1px solid var(--filet);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -18px rgba(11, 11, 12, .35);
  border-color: var(--accent);
}

.carte__visuel {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--noir);
}

.carte__visuel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s, filter .5s;
}

.carte:hover .carte__visuel img { transform: scale(1.045); }

.carte__visuel--motif {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(-45deg, #141414 0 14px, #0b0b0c 14px 28px);
}

.carte__visuel--motif span {
  font-family: var(--sans);
  color: rgba(255,255,255,.85);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.carte__corps { padding: 1.15rem 1.25rem 1.35rem; }

.carte__etiquette {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-texte);
  display: block;
  margin-bottom: .45rem;
}

.carte h2, .carte h3 {
  font-size: 1.18rem;
  line-height: 1.28;
  font-weight: 600;
}

.carte p {
  margin-top: .5rem;
  font-size: .92rem;
  line-height: 1.6;
  color: var(--gris);
}

/* ---------- mosaïque lightbox (CSS pur) ---------- */

.mosaique {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: .8rem;
  margin: 2.2rem 0;
}

.vignette {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--noir);
  border: 1px solid var(--filet);
}

.vignette img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .45s, opacity .45s;
}

.vignette::after {
  content: "+";
  position: absolute;
  inset: auto .7rem .55rem auto;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s;
}

.vignette:hover img { transform: scale(1.05); opacity: .92; }
.vignette:hover::after { opacity: 1; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 12, .94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox:target { display: flex; }

.lightbox figure {
  max-width: min(68rem, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
  border: 1px solid var(--filet-clair);
}

.lightbox figcaption {
  color: rgba(255, 255, 255, .75);
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .06em;
  text-align: center;
  max-width: 60ch;
  margin: 0 auto;
}

.lightbox .fermer {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.4);
  padding: .5rem .9rem;
  border-radius: 2rem;
}

.lightbox .fermer:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- sections ---------- */

.section-sombre { background: var(--noir); color: #fff; }

.section-sombre .conteneur { padding-top: clamp(2.6rem, 6vw, 4.2rem); padding-bottom: clamp(2.6rem, 6vw, 4.2rem); }

.section-sombre h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 500;
  max-width: 24ch;
  text-wrap: balance;
}

.section-sombre .surtitre { margin-bottom: .8rem; }

.section-sombre p.introduction {
  margin-top: 1rem;
  max-width: 56ch;
  color: rgba(255, 255, 255, .78);
}

.colonnes-piliers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.4rem;
  margin-top: 2.2rem;
}

.pilier {
  border-top: 3px solid var(--accent);
  background: #141416;
  padding: 1.4rem 1.4rem 1.6rem;
}

.pilier h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: .55rem; }

.pilier p { font-size: .93rem; line-height: 1.65; color: rgba(255, 255, 255, .72); }

.pilier a {
  display: inline-block;
  margin-top: .8rem;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 77, 0, .4);
  padding: .55rem 0 .5rem;
}

.pilier a:hover { color: #fff; border-color: #fff; }

/* ---------- maillage bas d'article ---------- */

.maillage {
  border-top: 1px solid var(--filet);
  margin-top: 3rem;
  padding-top: 1.8rem;
}

.maillage h2 {
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gris);
  margin: 0 0 1rem;
}

.maillage h2::before { display: none; }

.maillage ul {
  list-style: none;
  margin: 0;
  display: grid;
  gap: .6rem;
}

.maillage a {
  text-decoration: none;
  display: block;
  padding: .7rem .9rem;
  background: #fff;
  border: 1px solid var(--filet);
  font-size: .98rem;
  transition: border-color .2s, transform .2s;
}

.maillage a:hover { border-color: var(--accent); transform: translateX(3px); }

.maillage small {
  display: block;
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-texte);
  margin-bottom: .15rem;
}

/* ---------- page contact / formulaires ---------- */

.encart-contact {
  background: #fff;
  border: 1px solid var(--filet);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  margin: clamp(2rem, 5vw, 3.2rem) 0;
}

.champ { margin-bottom: 1.2rem; }

.champ label {
  display: block;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .45rem;
  color: var(--gris);
}

.champ input, .champ textarea, .champ select {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--filet);
  background: var(--papier);
  color: var(--noir);
}

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

.bouton {
  display: inline-block;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--accent-texte);
  color: #fff;
  border: none;
  padding: .95rem 1.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}

.bouton:hover { background: var(--noir); }

.bouton--contour {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .5);
  color: #fff;
}

.bouton--contour:hover { border-color: var(--accent); background: var(--accent); }

/* ---------- pied de page ---------- */

.pied {
  background: var(--noir);
  color: rgba(255, 255, 255, .66);
  font-family: var(--sans);
  font-size: .875rem;
  letter-spacing: .05em;
  border-top: 3px solid var(--accent);
  margin-top: auto;
}

.pied__inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 2.6rem;
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.pied h3 {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: .8rem;
}

.pied ul { list-style: none; }
.pied li { margin-bottom: .4rem; }
.pied a { color: inherit; text-decoration: none; display: inline-block; padding: .5rem 0; }
.pied a:hover { color: var(--accent); }

.pied__bas {
  border-top: 1px solid var(--filet-clair);
  padding: 1.1rem 1.25rem 1.4rem;
  text-align: center;
  font-size: .875rem;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .66);
}

.corps-flex { display: flex; flex-direction: column; min-height: 100vh; }
.corps-flex .conteneur-flex { flex: 1 0 auto; width: 100%; }

/* ---------- divers ---------- */

.grille-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}

.grille-2col img { border: 1px solid var(--filet); }

.note-transactionnelle {
  font-family: var(--sans);
  font-size: .875rem;
  color: var(--gris);
  line-height: 1.6;
}

@media (max-width: 40rem) {
  .nav { gap: .9rem; }
  .heros img { height: clamp(22rem, 88vw, 30rem); object-position: center 30%; }
  .mosaique { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
}
