/* ═══════════════════════════════════════════════════
   FAP AUTO PIÈCES — Stylesheet
   Fonts: Barlow Condensed (headings) + Barlow (body)
   ═══════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────── */
:root {
  --brand-primary:      #0057A8;
  --brand-primary-dark: #003D7A;
  --brand-accent:       #F5A623;
  --brand-accent-dark:  #C98A1A;
  --brand-white:        #FFFFFF;
  --brand-light:        #E6F1FB;
  --brand-dark:         #1A2744;
  --brand--black:       #131014;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  3.5rem;
  --space-xl:  5rem;

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Shadows */
  --shadow-card:  0 2px 12px rgba(0, 61, 122, 0.10);
  --shadow-hover: 0 8px 28px rgba(0, 61, 122, 0.18);

  /* Transitions */
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--brand--black);
  background-color: var(--brand-white);
  -webkit-font-smoothing: antialiased;
  background-color: var(--brand-primary-dark);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ── Container ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: var(--space-md);
  text-align: left;
  padding-bottom: var(--space-md);
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}


.btn-primary {
  background-color: var(--brand-primary);
  color: var(--brand-white);
  box-shadow: 4px 4px 0 0 var(--brand-accent-dark);
}

.btn-primary:hover {
  background-color: var(--brand-white);
  box-shadow: 6px 6px 0 0 var(--brand-accent);
  color: var(--brand-accent);
}

.btn-accent {
  position: relative;
  background-color: var(--brand-accent);
  color: var(--brand-white);
  isolation: isolate;
  box-shadow: 4px 4px 0 0 var(--brand-accent-dark);
}



.btn-accent:hover {
  background-color: var(--brand-white);
  border-color: var(--brand-white);
  color: var(--brand-accent);
  box-shadow: 8px 8px 0 0 var(--brand-accent);
}
.btn-accent:hover .btn-icon {
  transform: translateX(4px);
  transition: transform var(--transition);
}

.btn-lg {
  padding: var(--space-sm) var(--space-lg);
  font-size: 1.5rem;
}


.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.btn-form{
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  color : var(--brand-white);
  box-shadow: 4px 4px 0 0 var(--brand-primary);
  background-color: var(--brand-accent);
  border: var(--brand-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-form:hover{
  background-color: var(--brand-primary);
  box-shadow: 8px 8px 0 0 var(--brand-accent);
}
.btn-form:hover .btn-icon {
  transform: translateX(4px);
  transition: transform var(--transition);
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 61, 122, 0.08);
}

.header-inner {
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  height: 80px;   
  width: auto;
}

/* ══════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════ */
.top{
  padding-top: 5vh;
  background-color: var(--brand-dark);
  background-image: url('src/img/hero-bg.jpg');
  background-size: cover;
  background-position: center right;
  margin-bottom: var(--space-sm);
}

.hero {
  position: relative;
  color: var(--brand-white);
  overflow: hidden;
  padding-bottom: 0;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.014), rgb(0, 0, 0));
}


.hero-content {
  text-align: left;
  z-index: 2;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  max-width: 1100px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--brand-white);
  line-height: 1.7;
}


.stats-bar {
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.stats-grid {
  margin-inline: auto;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding-block: var(--space-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem var(--space-sm);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--brand-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background-color: var(--brand-accent);
}

/* ══════════════════════════════════════════════════
   SECTIONS — Common
══════════════════════════════════════════════════ */
.section {
  padding-block: var(--space-md);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-accent);
  white-space: nowrap;
}

.section-rule {
  flex: 1;
  height: 2px;
  background: var(--brand-accent);
}
.section-rule-form {
  flex: 1;
  height: 2px;
  background: var(--brand-dark);
}

.section-intro {
  color: var(--brand-light);
  /* max-width: 620px; */
  margin-bottom: var(--space-md);
  line-height: 1.6;
}



/* ══════════════════════════════════════════════════
   EXPERTISE — Cards
══════════════════════════════════════════════════ */
.expertise .section-intro {
  margin-bottom: 0px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1100px;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--space-md);
  justify-items: center;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.card {
  background-color: rgba(115, 154, 192, 0.2);
  border: 1.5px solid rgba(115, 154, 192, 0.5);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-card);
  width: 100%;
  height: 175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;            /* ← centré */
  gap: 0.6rem;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-body {
  font-size: 0.9rem;
  color: var(--brand-white);
  line-height: 1.4;
}

.photo {
  width: min(1050px, 100%);
  margin-inline: auto;
  position: relative;
  height: 400px;
  background-image: url("src/img/mains-clé-2.jpg");
  background-size: cover;
  background-position: center 40%;
  overflow: visible;
  margin-bottom: var(--space-md);
}

.photo::after {
  content: '';
  position: absolute;
  inset: 0;
  translate: 4px 4px; /* décalage vers le bas à droite */
  border-right: 4px solid var(--brand-accent);
  border-bottom: 4px solid var(--brand-accent);
  z-index: -1;
}

.photo-band-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(26, 39, 68, 0.75) 0%,
    rgba(0, 87, 168, 0.45) 100%
  );
}

.photo-band-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-band-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-white);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
  padding: 0 var(--space-md);
}

/* ══════════════════════════════════════════════════
   CATALOGUE
══════════════════════════════════════════════════ */

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: var(--space-lg);
}

.cat-card {
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background-color: rgba(115, 154, 192, 0.2);
  border: 1.5px solid rgba(115, 154, 192, 0.5);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.25rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-light);
  box-shadow: 4px 4px 0 0 var(--brand-primary);
}

.cat-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(115, 154, 192, 0.2);
  background-color: var(--brand-light);
  border-radius: var(--radius-sm);
  color: var(--brand-primary);
  margin-top: 2px;
}


.cat-icon svg {
  width: 18px;
  height: 18px;
}

.cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-white);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.cat-body {
  font-size: 0.83rem;
  color: var(--brand-white);
  line-height: 1.5;
}

/* CTA */
.cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--space-md);
}

/* ══════════════════════════════════════════════════
   FORMULAIRE
══════════════════════════════════════════════════ */
.devis-form {
  width: 100%;
  margin: var(--space-md) auto 0;
  padding: var(--space-md);
  background: var(--brand-white);
  border-radius: var(--radius-md);
  border: 1.5px solid #d6e6f7;
  display: none;
}

.devis-form.visible {
  display: block;
}

.form-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-dark);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
}

.form-full {
  grid-column: 1 / -1;
}

.form-grid input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid #eeeeee;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  background-color: #eeeeee;
}

.form-full {
  grid-column: 1 / -1;
  height: 100px;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid #eeeeee;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  background-color: #eeeeee;
  resize: none;
}


.form-grid input,
.form-grid textarea {
  color: var(--brand-dark);
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: #acacac;
}

.form-feedback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-family: var(--font-display);
  text-align: center;
  min-height: 0px;
}

.form-feedback.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--brand-primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.3s linear infinite;
  vertical-align: middle;
}

.form-feedback.error {
  color: #ee5342;
  font-weight: 700;
}

.form-grid input:disabled,
.form-grid textarea:disabled {
  background-color: #f5f5f5;
  color: #acacac;
  cursor: not-allowed;
}
.form-feedback.success {
  color: var(--brand-primary);
  font-weight: 700;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.site-footer {
  background-color: var(--brand-dark);
  color: var(--brand-white);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
  text-align: center;
  padding-top: var(--space-md);
  line-height: 2rem;
}

.footer-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo .logo-line1 {
  color: var(--brand-light);
}

.footer-logo .logo-line2 {
  color: rgba(255,255,255,0.70);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.5;
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--brand-accent);
  margin-top: 3px;
}

/* Map */
.footer-map iframe {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--brand-accent);
}

.map-placeholder {
  background-color: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.50);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.6;
}

.map-placeholder svg {
  width: 36px;
  height: 36px;
  color: var(--brand-accent);
  opacity: 0.7;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-sm);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.40);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 950px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
}

@media (max-width: 768px) {
  :root {
    --space-lg: 2.5rem;
    --space-xl: 3rem;
  }
  .header-inner{
    max-width: 600px;
    
  }
  .hero-content{
    max-width: 600px;
  }


 .stats-grid {
  
    max-width: 600px;
    grid-template-columns: repeat(3,auto);  
    grid-template-rows: repeat(2,auto);
  }

  .stat-divider {
    display: block;
    width: 1px;
    height: 40px;
    background-color: var(--brand-accent);

    justify-self: center; /* horizontal */
    align-self: center;   /* vertical */
  }

  .stat-divider:nth-of-type(3) {
    display: none;
  }

  .stat-divider:nth-child(4) {
    display: none;
  }

  
  /* sections */
  .section-heading {
    margin-bottom: var(--space-sm);
  }

  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .footer-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top {
  padding-top: 2vh;
  }

  .logo {
    height: 45px;   
    width: auto;
  }

  .stats-bar{ 
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.014), rgb(0, 0, 0));
  }
  
  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.45rem;
    letter-spacing: 0.05em;
  }

  .btn-form{
    font-size: 0.95rem;
  }

  .hero-content {
    padding-bottom: var(--space-lg);
  }

  .hero-title{
    font-size: 1.5rem;
  }

  .hero-subtitle {
    width: 70%;
    font-size: 0.8rem ;
  }
  /* .container{
    padding-bottom: 0;
  } */

  .section-title {
    font-size: 1rem;
  }

  .header-inner {
    height: 56px;
  }

  .stat-number{
    font-size: 1rem ;
  }

  .stat-label{
    font-size: 0.6rem;
  }

  .section-intro{
    font-size: 0.65rem ;
    line-height: 1.5;
  }

  .cards-grid{
    justify-items: stretch;
  }
  
  .card{
    height: 100px;
    padding: 0.2rem 0.5rem;
    width: auto;
  }

  .card-title {
    font-weight: 400;
    font-size: 0.48rem;
    line-height: 1.3;
    margin-bottom: 0px;
  }

  .card-body {
    font-size: 0.52rem;
    color: var(--brand-white);
    line-height: 1.1;
    letter-spacing: -0.01em;
  }
  .photo {
    width: calc(100% - var(--space-md) * 2);
    height: 260px;
  }
  .btn-lg {
    padding: var(--space-sm) var(--space-sm);
    font-size: 0.8rem;
  }
  

  .cat-title{
    font-size: 0.65rem;
  }
  
  .cat-body{
    font-size: 0.52rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-heading{
    font-size: 1.2rem;
  }
  .contact-item{
    font-size: 0.8rem;
  }
  .footer-map iframe {
    width: 100%;
    height: 250px;
  }

  .site-footer{
    padding-bottom: var(--space-sm);
  }
  .footer-bottom p {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.40);
    letter-spacing: 0.04em;
  }

}

/* ── Animations ───────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content {
  animation: fadeInUp 0.7s ease both;
}

.stats-bar {
  animation: fadeInUp 0.7s 0.2s ease both;
}
