/* ============================================================
   Combat Spirit Media — style.css
   Version propre, fix19
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --black:  #0a0a0a;
  --red:    #e74c3c;
  --white:  #ffffff;
  --grey:   #9a9a9a;
  --border: #222222;
}

/* ── BASE ── */
body {
  margin: 0;
  padding: 0;
  font-family: 'Barlow', Arial, sans-serif;
  background: var(--black);
  color: #bbb;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--grey); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red); }

h1, h2, h3 { color: var(--white); }

h1 {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 24px;
}

h2 {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 20px;
}

h3 {
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin: 32px 0 12px;
}

/* ── LAYOUT ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }

.section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 14px;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10,10,10,.97);
  height: 66px;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-link { display: flex; align-items: center; }

nav { display: flex; gap: 28px; align-items: center; }

nav a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  transition: color .2s;
}

nav a:hover, nav a.active { color: var(--white); }

nav a.active {
  border-bottom: 2px solid var(--red);
  padding-bottom: 3px;
}

.lang-btn {
  border: 1px solid var(--red);
  padding: 5px 11px;
  font-size: 12px;
  color: var(--red);
  letter-spacing: 1px;
  transition: background .2s, color .2s;
}
.lang-btn:hover { background: var(--red); color: var(--white); }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  nav { gap: 14px; }
}

/* ── HERO (HOME) ── */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 580px;
  max-height: 960px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg picture { display: block; width: 100%; height: 100%; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: brightness(.42);
}

/* Le container du hero doit aussi être positionné */
.hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content { max-width: 640px; }

.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  font-size: clamp(4.5rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 0.9;
  color: var(--white);
  margin: 0 0 22px;
  text-transform: uppercase;
}

.hero-title .line2 {
  color: var(--red);
  display: block;
}

.hero-line {
  width: 56px;
  height: 3px;
  background: var(--red);
  margin: 24px 0;
}

.hero-desc {
  font-size: .98rem;
  color: #aaa;
  line-height: 1.75;
  margin: 0 0 36px;
  max-width: 460px;
  font-weight: 300;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { height: 85vh; min-height: 500px; }
  .hero-title { font-size: clamp(3.5rem, 14vw, 5rem); }
  .hero-ctas { gap: 12px; }
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover {
  background: #c0392b;
  color: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 13px 30px;
  border: 1px solid rgba(255,255,255,.35);
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* ── main (pas de margin-top sur home — hero s'accroche au header) ── */
main { margin-top: 0; }

/* ── GALLERY PREVIEW (home) ── */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 28px 0;
}

.gp-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
  cursor: pointer;
}

.gp-item:first-child {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gp-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.82);
  transition: transform .4s, filter .3s;
}
.gp-item:hover img { transform: scale(1.04); filter: brightness(1); }

.gp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.45));
  pointer-events: none;
}

.gallery-more { text-align: center; margin-top: 30px; }

@media (max-width: 768px) {
  .gallery-preview { grid-template-columns: repeat(2,1fr); }
  .gp-item:first-child { grid-column: span 2; }
}

/* ── BLOG GRID (home) ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 28px 0;
}

.blog-card {
  background: #111;
  border: 1px solid #1a1a1a;
  overflow: hidden;
  transition: transform .3s;
}
.blog-card:hover { transform: translateY(-3px); }

.blog-card-img {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.blog-card-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(.82);
  transition: transform .4s, filter .3s;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); filter: brightness(1); }

.blog-card-body { padding: 20px 22px; }

.blog-card-date {
  font-size: 11px; color: var(--red);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}

.blog-card-title {
  font-size: 1.1rem; color: var(--white);
  margin: 0 0 10px; line-height: 1.3;
}

.blog-card-excerpt {
  font-size: .86rem; color: #666;
  line-height: 1.6; margin: 0 0 14px;
}

.blog-card-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--red);
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  margin-top: 28px;
}

.bio-lead {
  font-size: 1.05rem; color: #ccc;
  line-height: 1.75; font-style: italic; margin-bottom: 20px;
}

.bio-wink {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem; color: var(--red);
  letter-spacing: 1px; margin-top: 22px;
}

.spec-box {
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  padding: 26px;
  align-self: start;
}

.spec-list { list-style: none; padding: 0; margin: 12px 0 0; }
.spec-list li {
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: .88rem; color: #ccc;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list li::before { content: "›  "; color: var(--red); }

@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ── CONTACT ── */
.contact-wrap { max-width: 680px; }

.contact-email-block {
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-left: 3px solid var(--red);
  padding: 28px 32px;
  margin-top: 24px;
}

.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.contact-email-link {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem; letter-spacing: 1px;
  color: var(--white); margin-top: 8px;
}
.contact-email-link:hover { color: var(--red); }
.contact-email-link.tel { font-size: 1.1rem; }

@media (max-width: 600px) { .contact-cols { grid-template-columns: 1fr; } }

/* ── GALERIE (page /galerie) ── */
.masonry-wall {
  columns: 3;
  column-gap: 6px;
  margin: 28px 0;
}

.mw-item {
  break-inside: avoid;
  margin: 0 0 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.mw-item img {
  width: 100%; display: block;
  filter: brightness(.85);
  transition: transform .4s, filter .3s;
}
.mw-item:hover img { transform: scale(1.03); filter: brightness(1); }

.gal-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px;
}

.gf-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 7px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all .2s;
}
.gf-btn:hover, .gf-btn.active { border-color: var(--red); color: var(--white); }
.gf-btn.active { background: var(--red); }

.gf-count {
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  margin-left: 4px;
}

@media (max-width: 900px) { .masonry-wall { columns: 2; } }
@media (max-width: 540px) { .masonry-wall { columns: 1; } }

/* ── BLOG LIST (/blog) ── */
.blog-hero { margin-bottom: 10px; }
.blog-hero-link {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 21/9;
  overflow: hidden;
  text-decoration: none;
}
.blog-hero-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(.5);
  transition: transform .5s, filter .4s; display: block;
}
.blog-hero-link:hover img { transform: scale(1.02); filter: brightness(.62); }

.blog-hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 36px 40px;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 70%, transparent 100%);
}

.blog-hero-title {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--white); margin: 10px 0 8px;
  letter-spacing: 2px; line-height: 1.15;
}

.blog-hero-exc {
  font-size: .93rem; color: #bbb;
  max-width: 580px; margin: 0 0 14px; line-height: 1.6;
}

.blog-hero-cta {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red);
  border-bottom: 1px solid var(--red); padding-bottom: 2px;
}

.bcb {
  display: inline-block;
  background: var(--red); color: var(--white);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px; margin-bottom: 10px;
}
.bcb-sm { position: absolute; top: 12px; left: 12px; margin: 0; font-size: 10px; }

.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.bf-btn {
  background: transparent; border: 1px solid #333; color: #888;
  padding: 8px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all .2s;
}
.bf-btn:hover, .bf-btn.active { border-color: var(--red); color: var(--white); }
.bf-btn.active { background: var(--red); }

.blog-masonry { columns: 3; column-gap: 24px; }
.bm-card {
  break-inside: avoid; margin: 0 0 28px;
  background: #111; border: 1px solid #1a1a1a; overflow: hidden;
}
.bm-card.hidden { display: none; }
.bm-img { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; }
.bm-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.82); transition: transform .4s, filter .3s; display: block;
}
.bm-card:hover .bm-img img { transform: scale(1.04); filter: brightness(1); }
.bm-body { padding: 18px 20px; }
.bm-date { font-size: 11px; color: var(--red); letter-spacing: 1px; text-transform: uppercase; margin: 0 0 8px; }
.bm-title { font-size: 1.05rem; margin: 0 0 10px; line-height: 1.25; }
.bm-title a { color: var(--white); }
.bm-title a:hover { color: var(--red); }
.bm-exc { font-size: .85rem; color: #666; line-height: 1.6; margin: 0 0 14px; }
.bm-link { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--red); }

@media (max-width: 900px) { .blog-masonry { columns: 2; } }
@media (max-width: 600px) {
  .blog-masonry { columns: 1; }
  .blog-hero-link { aspect-ratio: 4/3; }
  .blog-hero-exc { display: none; }
  .blog-hero-overlay { padding: 20px; }
}

/* ── ARTICLE BLOG ── */
.article-meta {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
}

.article-body { color: #bbb; line-height: 1.8; font-size: .96rem; }

.article-body h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; color: var(--white);
  letter-spacing: 3px; margin: 36px 0 12px;
}

.article-body p { margin: 0 0 20px; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.96);
  z-index: 2000;
  padding: 20px;
}
.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lb-img-wrap {
  position: relative;
  width: 100%; max-width: 960px; max-height: 82vh;
}
#lb-img {
  max-width: 100%; max-height: 82vh;
  object-fit: contain; display: block; margin: 0 auto;
  transition: opacity .15s;
}
#lb-counter {
  position: absolute; bottom: -28px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px; color: #666; letter-spacing: 2px;
}
.lb-close {
  position: fixed; top: 20px; right: 24px;
  color: var(--white); font-size: 36px; cursor: pointer;
  background: none; border: none; line-height: 1;
  transition: color .2s;
}
.lb-close:hover { color: var(--red); }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.12); color: var(--white);
  border: none; font-size: 28px; padding: 18px 22px;
  cursor: pointer; transition: background .2s;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }

/* ── FOOTER ── */
footer {
  background: #111;
  border-top: 1px solid #2a2a2a;
  padding: 36px 0;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

footer p {
  font-size: 12px;
  color: #bbb;
  letter-spacing: 1px;
  margin: 0 0 4px;
  line-height: 1.65;
}

footer strong { color: var(--white); }
footer a { color: #bbb; transition: color .2s; }
footer a:hover { color: var(--red); }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; }
  .footer-inner div:last-child { text-align: left; }
}

/* ── BLOG list legacy (blog.php simple) ── */
.blog-list { margin: 40px 0; }
.blog-item { padding: 28px 0; border-bottom: 1px solid var(--border); }
.blog-item h2 { margin-top: 0; }
.blog-item h2 a { color: var(--white); }
.blog-item h2 a:hover { color: var(--red); }
.blog-date {
  font-size: 11px; color: var(--red);
  letter-spacing: 1px; text-transform: uppercase; margin: 10px 0;
}

/* ── ARTICLE HERO IMAGE ── */
.article-hero {
  width: 100%;
  aspect-ratio: 21/9;
  max-height: 520px;
  overflow: hidden;
}
.article-hero img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  filter: brightness(.85);
}

/* ── MISC ── */
@media (max-width: 480px) {
  h1 { font-size: 2rem; }
}

/* ════════════════════════════════════════
   ARTICLE GALLERY — images ratio naturel
════════════════════════════════════════ */

/* Breakout du container : plein écran */
.article-gallery {
  column-count: 3;
  column-gap: 4px;
  margin: 40px calc(50% - 50vw);
  width: 100vw;
  padding: 0;
}

.masonry-item {
  break-inside: avoid;
  display: block;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* PAS de height ni aspect-ratio — ratio naturel */
}

.masonry-item picture {
  display: block;
  line-height: 0;
}

.masonry-item img {
  width: 100%;
  height: auto;        /* ratio naturel OBLIGATOIRE */
  display: block;
  filter: brightness(.88);
  transition: transform .5s ease, filter .3s ease;
}

.masonry-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .3s;
  pointer-events: none;
}

.masonry-item:hover .masonry-overlay {
  background: rgba(0,0,0,.12);
}

@media (max-width: 900px) {
  .article-gallery { column-count: 2; }
}

@media (max-width: 540px) {
  .article-gallery { column-count: 1; }
}
