/* ═══════════════════════════════════════════════════════
   GARAGE A.P.C.S — Styles v4.0
   Accueil (one-page) + Page Galerie complète
═══════════════════════════════════════════════════════ */

:root {
  --red:         #D42B2B;
  --red-dark:    #A81E1E;
  --dark:        #1A1A1A;
  --dark2:       #1E1C1A;
  --anthracite:  #2D2D2D;
  --concrete:    #B0ADA8;
  --concrete-bg: #C2BFB9;
  --steel:       #6B6763;
  --white:       #FFFFFF;
  --font-display:'Bebas Neue', cursive;
  --font-cond:   'Barlow Condensed', sans-serif;
  --font-body:   'Barlow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--anthracite); background: var(--concrete-bg); -webkit-font-smoothing: antialiased; }
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

.concrete-bg {
  background-color: var(--concrete-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}
.concrete-dark {
  background-color: var(--dark2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E");
}

.apcs-wrap { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Typo ─────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-cond); font-size: .72rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--red); display: block; margin-bottom: .75rem;
}
.section-title { font-family: var(--font-display); line-height: .95; }
.red-bar { width: 4rem; height: 4px; background: var(--red); margin: 1rem auto 0; }
.section-header { text-align: center; margin-bottom: 4rem; }

/* ── Boutons ──────────────────────────────────────────── */
.btn-red {
  background: var(--red); color: var(--white);
  font-family: var(--font-cond); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 2rem; border: 2px solid var(--red);
  display: inline-flex; align-items: center; gap: .6rem;
  transition: background .25s, color .25s, transform .2s;
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.btn-red:hover  { background: transparent; color: var(--red); transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--white);
  font-family: var(--font-cond); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 2rem; border: 2px solid rgba(255,255,255,.45);
  display: inline-flex; align-items: center; gap: .6rem;
  transition: border-color .25s, background .25s;
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.07); }
.btn-large { padding: 1.1rem 2.5rem; font-size: 1.1rem; }
.btn-badge { background: rgba(255,255,255,.25); color: var(--white); font-size: .72rem; font-weight: 700; padding: .15rem .5rem; margin-left: .25rem; }

/* ── Reveal ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ════════════════════════════════════
   NAVBAR
════════════════════════════════════ */
#apcs-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; transition: background .3s, box-shadow .3s; }
#apcs-nav.is-scrolled { background: rgba(26,26,26,.97); backdrop-filter: blur(14px); box-shadow: 0 2px 24px rgba(0,0,0,.55); }
.admin-bar #apcs-nav { top: 32px; }
@media (max-width:782px) { .admin-bar #apcs-nav { top: 46px; } }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo  { display: flex; align-items: center; gap: .75rem; }
.nav-badge { width: 40px; height: 40px; background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-badge span { font-family: var(--font-display); color: var(--white); font-size: .8rem; letter-spacing: .05em; }
.nav-name  { font-family: var(--font-display); color: var(--white); font-size: 1.3rem; letter-spacing: .2em; line-height: 1; }
.nav-sub   { font-family: var(--font-cond); color: var(--concrete); font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; line-height: 1.3; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-family: var(--font-cond); font-weight: 600; text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; color: var(--concrete); transition: color .2s; }
.nav-links a:hover { color: var(--white); }
#nav-burger { display: none; background: none; border: none; color: var(--white); font-size: 1.3rem; cursor: pointer; padding: .4rem; }
#nav-mobile { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s, opacity .3s; background: var(--dark2); }
#nav-mobile.is-open { max-height: 400px; opacity: 1; }
.nav-mobile-inner { padding: 1rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
#nav-mobile a { font-family: var(--font-cond); font-weight: 600; text-transform: uppercase; letter-spacing: .15em; font-size: 1rem; color: var(--concrete); transition: color .2s; }
#nav-mobile a:hover { color: var(--red); }

/* ════════════════════════════════════
   HERO
════════════════════════════════════ */
#apcs-hero { min-height: 100vh; display: flex; align-items: center; position: relative; background: var(--dark) center/cover no-repeat; }
#apcs-hero::before { content:''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg,rgba(26,26,26,.91) 0%,rgba(26,26,26,.60) 55%,rgba(212,43,43,.18) 100%); }
.hero-bar  { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); z-index: 2; }
.hero-body { position: relative; z-index: 2; padding: 7rem 2rem 4rem; max-width: 780px; }
.hero-loc  { font-family: var(--font-cond); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--red); margin-bottom: 1rem; }
.hero-h1   { font-family: var(--font-display); color: var(--white); line-height: .95; font-size: clamp(3.5rem,10vw,8rem); }
.hero-h2   { font-family: var(--font-display); color: var(--red); line-height: .95; font-size: clamp(3.5rem,10vw,8rem); margin-bottom: 1.5rem; }
.hero-desc { color: var(--concrete); font-size: 1.1rem; max-width: 500px; line-height: 1.7; margin-bottom: 2.5rem; }
.hero-desc strong { color: var(--white); font-weight: 600; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; margin-top: 3.5rem; }
.stat-sep  { width: 1px; height: 40px; background: rgba(255,255,255,.12); }
.stat-n    { font-family: var(--font-display); color: var(--red); font-size: 2.4rem; line-height: 1; }
.stat-l    { font-family: var(--font-cond); color: var(--concrete); text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.3); z-index: 2; animation: bounce 2s infinite; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }
.diagonal-top { clip-path: polygon(0 3%,100% 0,100% 100%,0 100%); margin-top: -2px; }

/* ════════════════════════════════════
   SERVICES
════════════════════════════════════ */
#apcs-services { padding: 6rem 1.5rem 5rem; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1rem; margin-bottom: 3.5rem; }
.srv-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); padding: 1.75rem; position: relative; overflow: hidden; transition: transform .3s,border-color .3s,box-shadow .3s; }
.srv-card::after { content:''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.srv-card:hover { transform: translateY(-5px); border-color: rgba(212,43,43,.45); box-shadow: 0 14px 44px rgba(212,43,43,.14); }
.srv-card:hover::after { transform: scaleX(1); }
.srv-icon { width: 3rem; height: 3rem; background: rgba(212,43,43,.15); border: 1px solid rgba(212,43,43,.35); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.srv-icon i { color: var(--red); font-size: 1.3rem; }
.srv-name { font-family: var(--font-cond); color: var(--white); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.srv-desc { color: var(--concrete); font-size: .84rem; line-height: 1.65; }
.services-cta { text-align: center; }
.services-cta p { font-family: var(--font-cond); color: var(--concrete); letter-spacing: .1em; font-size: 1.1rem; margin-bottom: 1.25rem; }

/* ════════════════════════════════════
   GALERIE — commun aux 2 pages
════════════════════════════════════ */
#apcs-galerie { padding: 6rem 1.5rem 5rem; }
.galerie-top  { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }
.galerie-note { font-size: .9rem; color: var(--steel); text-align: right; line-height: 1.8; }

/* Filtres */
.gal-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.gal-filter {
  font-family: var(--font-cond); font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; font-size: .78rem; padding: .4rem 1rem;
  border: 1px solid rgba(26,26,26,.25); color: rgba(26,26,26,.6);
  background: transparent; cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: .4rem;
}
.page-galerie .gal-filters .gal-filter { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.55); }
.gal-filter:hover, .gal-filter.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.filter-count { font-size: .7rem; opacity: .7; background: rgba(0,0,0,.1); padding: .1rem .35rem; }

/* Grille */
.gal-grid { display: grid; grid-template-columns: repeat(4,1fr); grid-auto-rows: 220px; gap: .75rem; }
.gal-grid--full { grid-auto-rows: 240px; }

.gal-item { overflow: hidden; position: relative; cursor: pointer; background: var(--dark); }
.gal-item.is-featured { grid-column: span 2; grid-row: span 2; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; display: block; }
.gal-item:hover img { transform: scale(1.07); }
.gal-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(20,18,16,.88) 0%,transparent 60%); opacity: 0; transition: opacity .35s; display: flex; align-items: flex-end; padding: 1rem 1.1rem; }
.gal-item:hover .gal-overlay { opacity: 1; }
.gal-tag  { font-family: var(--font-cond); color: var(--red); text-transform: uppercase; letter-spacing: .2em; font-size: .68rem; margin-bottom: .2rem; }
.gal-name { font-family: var(--font-cond); color: var(--white); text-transform: uppercase; letter-spacing: .12em; font-size: .88rem; }

/* CTA galerie accueil */
.galerie-cta { text-align: center; margin-top: 2.5rem; padding: 2.5rem 2rem; border: 1px solid rgba(26,26,26,.12); background: rgba(26,26,26,.04); }
.galerie-cta-txt { font-family: var(--font-cond); color: var(--steel); font-size: 1rem; letter-spacing: .08em; margin-bottom: 1.25rem; }

/* Aucune photo */
.gal-empty { text-align: center; padding: 4rem 2rem; }
.gal-empty i { font-size: 3.5rem; color: var(--concrete); display: block; margin-bottom: 1.25rem; }
.gal-empty p { font-size: 1rem; color: var(--steel); }
.gal-empty-hint { font-size: .85rem !important; margin-top: .5rem; opacity: .8; }

/* ════════════════════════════════════
   PAGE GALERIE COMPLÈTE
════════════════════════════════════ */
.gal-page-header { padding: 7rem 1.5rem 3rem; }
.gal-page-header-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.gal-breadcrumb { font-family: var(--font-cond); color: var(--concrete); font-size: .82rem; letter-spacing: .15em; text-transform: uppercase; display: inline-flex; align-items: center; gap: .4rem; transition: color .2s; margin-bottom: .75rem; }
.gal-breadcrumb:hover { color: var(--red); }
.gal-page-count { text-align: right; }
.gal-page-main  { padding: 3rem 1.5rem 5rem; }

/* Pagination */
.gal-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 3rem; }
.gal-pagination .page-numbers {
  font-family: var(--font-cond); font-weight: 600; font-size: .9rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .55rem 1.1rem;
  border: 1px solid rgba(26,26,26,.25); color: var(--anthracite); transition: all .2s;
}
.gal-pagination .page-numbers:hover,
.gal-pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: var(--white); }

/* CTA bas page galerie */
.gal-cta-section { padding: 4rem 1.5rem; }
.gal-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }

/* ════════════════════════════════════
   LIGHTBOX (prev/next + swipe)
════════════════════════════════════ */
#apcs-lb { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.93); align-items: center; justify-content: center; backdrop-filter: blur(6px); }
#apcs-lb.is-open { display: flex; }
#apcs-lb img { max-width: 88vw; max-height: 80vh; object-fit: contain; box-shadow: 0 0 60px rgba(0,0,0,.8); }
#lb-close { position: absolute; top: 1.2rem; right: 1.2rem; background: var(--red); color: var(--white); border: none; cursor: pointer; width: 42px; height: 42px; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background .2s; z-index: 2; }
#lb-close:hover { background: var(--red-dark); }
#lb-prev, #lb-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: var(--white); border: none; cursor: pointer; width: 50px; height: 50px; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: background .2s; z-index: 2; }
#lb-prev { left: 1rem; }
#lb-next { right: 1rem; }
#lb-prev:hover, #lb-next:hover { background: var(--red); }
#lb-caption { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); font-family: var(--font-cond); font-weight: 600; color: var(--white); letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; white-space: nowrap; max-width: 88vw; overflow: hidden; text-overflow: ellipsis; }
#lb-counter { position: absolute; top: 1.2rem; left: 1.5rem; font-family: var(--font-cond); color: rgba(255,255,255,.45); font-size: .82rem; letter-spacing: .15em; }

/* ════════════════════════════════════
   HORAIRES & CARTE
════════════════════════════════════ */
#apcs-infos { padding: 6rem 1.5rem 5rem; }
.infos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.hours-box  { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); padding: 2rem; }
.hours-title { font-family: var(--font-cond); color: var(--white); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 1.5rem; display: flex; align-items: center; gap: .75rem; }
.hours-ico { width: 2rem; height: 2rem; background: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hours-ico i { color: var(--white); font-size: .75rem; }
.h-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.h-row:last-child { border-bottom: none; }
.h-day  { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--concrete); }
.h-day.is-today  { color: var(--red); font-weight: 700; }
.h-time { font-family: var(--font-cond); font-size: .85rem; color: rgba(255,255,255,.8); }
.h-time.is-today { color: var(--white); font-weight: 700; }
.h-time.is-closed { color: var(--steel); }
.rdv-box { margin-top: 1.5rem; padding: 1rem; border: 1px solid rgba(212,43,43,.4); background: rgba(212,43,43,.1); }
.rdv-box p { font-family: var(--font-cond); color: var(--red); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 700; }
.contact-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.c-row { display: flex; align-items: flex-start; gap: .75rem; }
.c-row i { color: var(--red); margin-top: 3px; flex-shrink: 0; }
.c-row span { color: var(--concrete); font-size: .95rem; }
.c-row a { font-family: var(--font-cond); color: var(--white); font-size: 1.35rem; letter-spacing: .15em; transition: color .2s; }
.c-row a:hover { color: var(--red); }
.map-frame { border: 2px solid rgba(255,255,255,.1); overflow: hidden; height: 420px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.3) contrast(1.05); }
.map-btns { display: flex; gap: .75rem; margin-top: .75rem; }
.map-btns a { flex: 1; justify-content: center; font-size: .9rem; padding: .75rem 1rem; }

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
#apcs-footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,.1); padding: 2.5rem 1.5rem; }
.footer-row  { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-logo { display: flex; align-items: center; gap: .75rem; }
.footer-legal { text-align: center; font-size: .82rem; color: var(--steel); line-height: 1.6; }
.footer-sub   { opacity: .5; font-size: .72rem; margin-top: .2rem; }
.footer-right { display: flex; align-items: center; gap: 1rem; }
.footer-phone { color: var(--steel); font-size: 1.1rem; transition: color .2s; }
.footer-phone:hover { color: var(--red); }
.footer-top { width: 2rem; height: 2rem; border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; color: var(--steel); font-size: .7rem; transition: all .2s; }
.footer-top:hover { border-color: var(--red); color: var(--red); }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1024px) {
  .gal-grid, .gal-grid--full { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .nav-links  { display: none; }
  #nav-burger { display: block; }
  .infos-grid { grid-template-columns: 1fr; }
  .map-frame  { height: 300px; }
  .gal-grid, .gal-grid--full { grid-template-columns: repeat(2,1fr); grid-auto-rows: 160px; }
  .gal-item.is-featured { grid-column: span 2; grid-row: span 1; }
  .galerie-note { display: none; }
  .gal-cta-inner { flex-direction: column; text-align: center; }
  #lb-prev { left: .25rem; } #lb-next { right: .25rem; }
  .gal-page-header-inner { flex-direction: column; }
}
@media (max-width: 520px) {
  .hero-ctas, .map-btns { flex-direction: column; }
  .btn-red, .btn-ghost  { justify-content: center; }
}
