/* ============================================
   APN CAISSERIE - STYLES CSS 2025
   Polices système uniquement — aucune dépendance externe
   (Google Fonts retiré : plus de requêtes réseau vers fonts.gstatic.com)
   ============================================ */

/* CSS Variables for Brand Colors */
:root {
  --primary-color: #4A2C2A;
  --primary-dark: #3A1C1A;
  --primary-light: #6B4C4A;
  --accent-color: #D9C2A7;
  --accent-dark: #C9B297;
  --text-dark: #1a1a1a;
  --text-light: #6B705C;
  --bg-dark: #4A2C2A;
  --bg-accent: #8A8F7A;
  --bg-light: #D9C2A7;
  --bg-white: #ffffff;
  --border-color: #D9C2A7;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Piles de polices système — aucun fichier externe à charger */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-slab: Georgia, 'Times New Roman', Times, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--accent-color);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-slab);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent-color);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #111827, transparent);
  opacity: 0.7;
}

.hero-content-wrapper {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-image-container {
  position: relative;
  margin: 0 auto;
}

.hero-title-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 20px;
}

.hero-title-overlay h1 {
  font-size: 3rem;
  font-family: var(--font-slab);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ff3131;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000;
}

.hero-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 44, 42, 0.6);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  padding: 20px;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--accent-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: var(--text-light);
  color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-color);
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-color);
  font-size: 1rem;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
  transform: scale(1.05);
}

.btn-large {
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  margin: 0.5rem;
}

.btn-back {
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-back:hover {
  background-color: var(--primary-color);
  color: var(--accent-color);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  padding: 4rem 0;
  background-color: var(--bg-dark);
}

.main-content h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 2rem;
}

.main-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bg-accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.main-content p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--accent-color);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
  padding: 4rem 0;
  background-color: var(--bg-dark);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Service Card */
.card {
  background: var(--bg-accent);
  border: 2px solid var(--border-color);
  position: relative;
  overflow: hidden;
  height: 300px;
  cursor: pointer;
  transition: transform 0.3s ease;
  border-radius: 0.5rem;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.card .hover-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(74, 44, 42, 0.9);
  color: var(--accent-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
  text-align: center;
}

.card:hover .hover-text {
  opacity: 1;
}

.card:hover {
  transform: scale(1.03);
}

.card .hover-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.card .hover-text p {
  color: var(--accent-color);
}

/* ============================================
   DETAIL SECTIONS
   ============================================ */
.detail-section {
  display: block;
  padding: 2.5rem 0;
  background-color: var(--text-light);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .detail-content {
    flex-direction: row;
  }
}

.detail-text {
  flex: 2;
}

.detail-image {
  flex: 1;
}

.detail-section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.detail-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.detail-section p {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.detail-section ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.detail-section li {
  margin-bottom: 0.5rem;
}

.detail-section img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
  padding: 6rem 0;
  background-color: var(--bg-dark);
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
  margin-top: 3rem;
}

.faq-item {
  margin-bottom: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active {
  border-color: var(--text-light);
}

.faq-question {
  width: 100%;
  background: var(--primary-color);
  border: none;
  padding: 1.5rem;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-icon {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(217, 194, 167, 0.1);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 1.5rem;
  color: var(--accent-color);
  line-height: 1.8;
  font-size: 1rem;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials-section {
  padding: 6rem 0;
  background-color: var(--text-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--bg-dark);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.testimonial-rating {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #ffa500;
}

.testimonial-text {
  font-size: 1.05rem;
  color: var(--accent-color);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border-color);
}

.author-icon {
  font-size: 2.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 194, 167, 0.2);
  border-radius: 50%;
}

.author-name {
  font-weight: 700;
  color: var(--accent-color);
  font-size: 1rem;
}

.author-company {
  font-size: 0.9rem;
  color: var(--bg-accent);
}

/* Google Review CTA */
.google-review-cta {
  margin-top: 4rem;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-dark);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
}

.google-review-cta h3 {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.google-review-cta p {
  font-size: 1.1rem;
  color: var(--accent-color);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.review-note {
  font-size: 0.9rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
  background-color: var(--text-light);
  padding: 4rem 0;
  text-align: center;
}

.contact-content {
  max-width: 28rem;
  margin: 0 auto;
}

.contact-info {
  margin-bottom: 2rem;
}

.contact-content p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
  color: var(--accent-color);
}

.contact-content a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.contact-content a:hover {
  color: var(--bg-dark);
  text-decoration: underline;
}

.contact-content strong {
  color: var(--bg-dark);
}

/* ============================================
   BACK TO TOP
   ============================================ */
#back-to-top {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent-color);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 55px;
  text-align: center;
  font-weight: bold;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

#back-to-top:hover {
  background-color: var(--text-light);
  transform: translateY(-5px);
}

#back-to-top.show {
  display: block;
  animation: fadeInUp 0.3s ease-out;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero-title-overlay h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .main-content h2 {
    font-size: 1.75rem;
  }

  .main-content h3 {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .card {
    height: 250px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .detail-content {
    flex-direction: column;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.img-fluid {
  max-width: 100%;
  height: auto;
}

.text-center {
  text-align: center;
}