/* ===========================
   Menuiserie Hillairet – Style
   Couleur primaire : #d62128
   Couleur secondaire : #fce71c
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #d62128;
  --primary-dark: #a81820;
  --secondary: #fce71c;
  --black: #111;
  --gray-dark: #374151;
  --gray-mid: #6b7280;
  --gray-light: #f3f4f6;
  --white: #ffffff;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.14);
  --radius: 4px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  font-size: 16px;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === TOPBAR === */
.topbar {
  background: var(--primary);
  padding: .5rem 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
}
.topbar a {
  color: var(--white);
  font-size: .875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: opacity var(--transition);
}
.topbar a:hover { opacity: .8; }
.topbar svg { flex-shrink: 0; }

/* === NAVBAR === */
.navbar {
  background: var(--white);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.navbar__logo img { height: 56px; }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.navbar__links a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-dark);
  transition: color var(--transition);
  position: relative;
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.navbar__links a:hover { color: var(--primary); }
.navbar__links a:hover::after { width: 100%; }

.navbar__cta {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary);
  color: var(--white) !important;
  padding: .6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background var(--transition);
}
.navbar__cta:hover { background: var(--primary-dark); }
.navbar__cta::after { display: none !important; }

/* Mobile burger */
.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}
.navbar__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gray-dark);
  transition: all var(--transition);
}

/* === CATEGORY NAV === */
.cat-nav {
  background: #e5e7eb;
  border-bottom: 1px solid #d1d5db;
}
.cat-nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow-x: auto;
  padding: .6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }
.cat-nav__inner a {
  white-space: nowrap;
  font-size: .85rem;
  font-weight: 600;
  color: #4b5563;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.cat-nav__inner a:hover,
.cat-nav__inner a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* === HERO === */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero__logo { text-align: center; }
.hero__logo img { max-width: 260px; margin: 0 auto; }
.hero__text { text-align: center; }
.hero__text h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--primary);
  line-height: 1.1;
}
.hero__text h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin: 1rem 0;
}
.hero__text p { font-size: 1.1rem; color: var(--gray-mid); }
.hero__text strong { color: var(--black); }
.hero__divider {
  display: none;
  width: 80px; height: 3px;
  background: var(--primary);
  margin: 1.5rem auto;
  border: none;
}

/* === SECTION HEADERS === */
.section-header { margin-bottom: 2rem; }
.section-header h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .5rem;
}
.section-header p { color: var(--gray-mid); font-size: 1.05rem; }

/* === SECTIONS === */
section { padding: 4rem 0; }
section:nth-child(even) { background: var(--gray-light); }

/* === GALLERY GRID (prestations) === */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.gallery-left { display: grid; grid-template-rows: 480px 240px; gap: 4px; }
.gallery-right { display: grid; grid-template-rows: 240px 480px; gap: 4px; }
.gallery-left-bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.gallery-right-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .6s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 1.5rem;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__overlay h3 {
  font-size: 1.5rem;
  color: var(--primary);
  font-family: var(--font-display);
  text-align: center;
  margin-bottom: .5rem;
}
.gallery-item__overlay p {
  font-size: .85rem;
  color: var(--white);
  text-align: center;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-item__overlay a {
  background: var(--white);
  color: var(--primary);
  padding: .4rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .8rem;
  transition: all var(--transition);
}
.gallery-item__overlay a:hover {
  background: var(--primary);
  color: var(--white);
}
.gallery-item--small .gallery-item__overlay h3 { font-size: 1rem; }

/* === ABOUT === */
.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about__text p { color: var(--gray-dark); margin-bottom: 1rem; }
.about__text ul {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
}
.about__img { display: flex; justify-content: center; align-items: flex-end; }
.about__img img { max-width: 80%; }

/* === TEAM === */
.team-slider-wrapper {
  position: relative;
  overflow: hidden;
}
.team-slider {
  display: flex;
  gap: 2rem;
  transition: transform .5s ease;
}
.team-card {
  flex-shrink: 0;
  width: 300px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}
.team-card img {
  width: 300px; height: 400px;
  object-fit: cover;
  display: block;
}
.team-card__info {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.team-card:hover .team-card__info { opacity: 1; }
.team-card__info .name {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: .4rem;
}
.team-card__info .role {
  font-size: .9rem;
  color: var(--white);
  text-align: center;
}
.team-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}
.team-nav button {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.team-nav button:hover {
  background: var(--primary);
  color: var(--white);
}

/* === PROJECTS CAROUSEL === */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.carousel__track {
  display: flex;
  transition: transform .5s ease;
}
.carousel__slide {
  flex-shrink: 0;
  width: 100%;
  position: relative;
}
.carousel__slide img {
  width: 100%; height: 480px;
  object-fit: cover;
}
.carousel__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  padding: 3rem 2rem 2rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.carousel__slide:hover .carousel__caption { opacity: 1; }
.carousel__caption h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: .25rem;
}
.carousel__caption .place { color: var(--white); font-weight: 600; margin-bottom: .5rem; }
.carousel__caption p { color: rgba(255,255,255,.8); font-size: .9rem; margin-bottom: 1rem; }
.carousel__caption a {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: .4rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .85rem;
  transition: all var(--transition);
}
.carousel__caption a:hover { background: var(--primary); color: var(--white); }

.carousel__btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  border: none;
  color: var(--white);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  z-index: 10;
}
.carousel__btn:hover { background: rgba(214,33,40,.7); }
.carousel__btn--prev { left: 1rem; }
.carousel__btn--next { right: 1rem; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.carousel__dot {
  width: 32px; height: 4px;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background var(--transition);
}
.carousel__dot.active { background: var(--primary); }

/* === GUARANTEES === */
.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.guarantee-card {
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: box-shadow var(--transition);
}
.guarantee-card:hover { box-shadow: var(--shadow-lg); }
.guarantee-card h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: .75rem;
}
.guarantee-card p { color: var(--gray-dark); font-size: .95rem; margin-bottom: 1.5rem; }
.guarantee-card img { width: 96px; height: 96px; object-fit: contain; margin: 0 auto; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* === ALERT === */
.alert {
  padding: .875rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.alert-success { background: #dcfce7; border: 1px solid #4ade80; color: #15803d; }
.alert-error   { background: #fee2e2; border: 1px solid #f87171; color: #b91c1c; }

/* === CONTACT PAGE === */
.contact-wrapper {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 8px;
  padding: 3rem;
  box-shadow: var(--shadow);
}
.contact-wrapper h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: .5rem;
}
.contact-wrapper > p { color: #4b5563; margin-bottom: 2.5rem; }
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: .5rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #9ca3af;
  padding: .5rem 0;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--black);
  outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-bottom-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { cursor: pointer; }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check label { font-size: .85rem; color: #6b7280; line-height: 1.5; }
.form-actions { display: flex; justify-content: flex-end; }

/* === CATEGORY PAGE === */
.cat-hero {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  overflow: hidden;
}
.cat-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.cat-title {
  text-align: center;
  padding: 3rem 0 2rem;
}
.cat-title h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary);
}
.cat-title p { color: var(--gray-dark); max-width: 700px; margin: 1rem auto 0; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 4rem;
}
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.project-card__img {
  height: 256px;
  overflow: hidden;
  cursor: pointer;
}
.project-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.project-card:hover .project-card__img img { transform: scale(1.05); }
.project-card__label {
  padding: .875rem 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: .95rem;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal__content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 700px;
  width: 90%;
  margin: 2rem auto;
  overflow: hidden;
  position: relative;
}
.modal__header { padding: 1.5rem; }
.modal__header h2 { font-family: var(--font-display); color: var(--primary); margin-bottom: .5rem; }
.modal__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  cursor: pointer; padding: .25rem;
}
.modal__close img { width: 20px; height: 20px; }
.modal__img img { width: 100%; }

/* === PROJECT PAGE === */
.project-hero {
  padding: 3rem 0;
  text-align: center;
}
.project-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.project-hero p { color: var(--gray-dark); max-width: 700px; margin: 0 auto 1.5rem; }
.project-hero .place { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.project-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-bottom: 4rem;
}
.project-images .project-card { box-shadow: var(--shadow); }

/* === LEGALS / STATIC PAGES === */
.static-page { padding: 4rem 0; }
.static-page h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 3rem;
}
.static-page h2 {
  font-size: 1.2rem;
  color: var(--black);
  font-weight: 700;
  text-decoration: underline;
  margin: 2rem 0 .75rem;
}
.static-page p { color: var(--gray-dark); margin-bottom: 1rem; }
.static-page .address {
  text-align: center;
  line-height: 2;
  margin: 2rem 0;
}
.static-page ul { list-style: disc; padding-left: 2rem; color: var(--gray-dark); margin-bottom: 1rem; }
.static-page a { color: var(--primary); text-decoration: underline; }
.sitemap-section { margin-bottom: 2.5rem; }
.sitemap-section h2 {
  font-family: var(--font-display);
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 1rem;
}
.sitemap-section ul { list-style: disc; padding-left: 1.5rem; }
.sitemap-section li { margin-bottom: .5rem; }
.sitemap-section a { color: var(--primary); transition: opacity var(--transition); }
.sitemap-section a:hover { opacity: .75; }

/* === FOOTER === */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer__col h6 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.footer__col p,
.footer__col a {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: #9ca3af;
  margin-bottom: .75rem;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--white); }
.footer__col svg { flex-shrink: 0; color: var(--primary); }
.footer__col--links a { display: block; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.footer__col--links a:hover { color: var(--white); border-bottom-color: var(--primary); }
.footer__map iframe { width: 100%; height: 160px; border: 0; border-radius: var(--radius); }
.footer__project-cta a {
  display: block;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  padding: .7rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  margin-top: 1rem;
  transition: background var(--transition);
}
.footer__project-cta a:hover { background: var(--primary-dark); }
.footer__bottom {
  background: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1.5rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer__bottom p, .footer__bottom a {
  font-size: .85rem;
  color: var(--white);
  font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-left { grid-template-rows: auto auto; }
  .gallery-left > .gallery-item:first-child { height: 300px; }
  .gallery-left-bottom { grid-template-columns: 1fr 1fr; }
  .gallery-right { grid-template-rows: auto auto; }
  .gallery-right > .gallery-item:last-child { height: 300px; }
  .gallery-right-top { grid-template-columns: 1fr 1fr; }
  .guarantees-grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .navbar__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    gap: 1rem;
    z-index: 200;
  }
  .navbar__cta { display: none; }
  .navbar__burger { display: flex; }
  .navbar { position: relative; }

  .hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero__divider { display: block; }
  .about__inner { grid-template-columns: 1fr; }
  .about__img { display: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-images { grid-template-columns: 1fr 1fr; }
  .guarantees-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-wrapper { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-images { grid-template-columns: 1fr; }
  .gallery-left-bottom { grid-template-columns: 1fr; }
  .gallery-right-top { grid-template-columns: 1fr; }
}
