/* =========================================================
   VARIABLES CSS
========================================================= */
:root {
  --primary: #0d2a4d;
  --secondary: #d97c2b;
  --accent: #f3a04f;
  --text-dark: #222;
  --text-light: #f5f5f5;
  --bg-light: #fafafa;
  --bg-dark: #141414;
  --transition: 0.3s ease;
  --shadow-sm: 0 3px 10px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
  --shadow-lg: 0 6px 20px rgba(0,0,0,0.06);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

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

section {
  padding: 6rem 1rem;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
}

h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--text-dark);
  margin-bottom: 3rem;
  position: relative;
}

h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--secondary);
  display: block;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.intro {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 3rem;
  color: #555;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.7;
}

/* =========================================================
   HEADER
========================================================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 42, 77, 0.95);
  backdrop-filter: blur(6px);
  color: var(--text-light);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

header.scrolled {
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  padding: 1rem 2rem;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #fff;
  transition: transform 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.03);
}

.logo-img {
  height: 55px;
  width: 55px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background-color: #fff;
  box-shadow: 0 0 10px rgba(13, 42, 77, 0.4);
  object-fit: cover;
  transition: box-shadow var(--transition);
}

.logo-link:hover .logo-img {
  box-shadow: 0 0 15px rgba(243, 160, 79, 0.8);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-top {
  font-size: 0.9rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-bottom {
  font-size: 1.2rem;
  font-weight: 600;
}

.logo-bottom strong {
  color: var(--secondary);
}

/* Navigation */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: #fff;
  font-weight: 500;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--secondary);
}

/* =========================================================
   HERO SECTION
========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  background-image: url('../img/HeaderToiture.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(13, 42, 77, 0.45),
    rgba(0, 0, 0, 0.7)
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--text-light);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 500;
  color: var(--secondary);
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}

.hero p {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #ddd;
  margin-bottom: 2rem;
}

.hero-services {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2rem);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  font-weight: 500;
}

.hero-service i {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Hero Logo */
.hero-logo {
  position: absolute;
  top: 45%;
  left: 20%;
  transform: translate(-50%, -45%);
  width: 400px;
  max-width: 40vw;
  opacity: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  filter: brightness(1.1);
}

.hero-logo::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  z-index: -1;
  filter: blur(10px);
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(217, 124, 43, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 10px rgba(217, 124, 43, 0.4);
}

/* =========================================================
   SERVICES SECTION
========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  color: var(--secondary);
  margin-bottom: 0.8rem;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  letter-spacing: 0.3px;
}

.service-card p {
  color: #444;
  font-size: clamp(0.9rem, 2vw, 0.98rem);
}

.service-card p strong {
  color: var(--secondary);
}

/* =========================================================
   GARANTIE DÉCENNALE
========================================================= */
.garantie-section {
  background: #fff;
  padding: 5rem 2rem;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.garantie-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.garantie-logo img {
  width: clamp(120px, 30vw, 180px);
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  border-radius: 10px;
}

.garantie-content {
  max-width: 600px;
}

.garantie-content h2 {
  color: var(--text-dark);
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: 1rem;
}

.garantie-content p {
  color: #555;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

/* =========================================================
   AVIS CLIENTS
========================================================= */
#avis {
  padding: 5rem 1rem;
  background: var(--bg-light);
}

#avis h1 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.filters {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filters select {
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 0.95rem;
}

.note-globale {
  text-align: center;
  margin-bottom: 2.5rem;
}

.note-globale .etoiles {
  color: var(--accent);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  display: block;
  margin-bottom: 0.3rem;
  letter-spacing: 2px;
}

.avis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
}

.avis-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform 0.25s ease, opacity 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
}

.avis-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.avis-card:hover {
  transform: translateY(-3px);
}

.avis-card .stars {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.avis-card p {
  color: #444;
  font-style: italic;
  font-size: 0.95rem;
}

.avis-card span {
  display: block;
  margin-top: 0.6rem;
  font-weight: 600;
  color: var(--secondary);
}

.no-comments {
  text-align: center;
  font-style: italic;
  color: #777;
  font-size: 1.1rem;
  margin-top: 2rem;
}

/* Mini Avis (Top 5) */
.light-avis {
  background: #f9f9f9;
  padding: 4rem 1rem;
  text-align: center;
}

.light-avis h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.small-intro {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #555;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.6;
}

.avis-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
  margin: 2rem auto 2.5rem;
  max-width: 1000px;
}

.avis-mini-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  line-height: 1.4;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.6s ease;
}

.avis-mini-card.visible {
  transform: translateY(0);
  opacity: 1;
}

.avis-mini-card .stars {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.avis-mini-card p {
  color: #444;
  font-style: italic;
}

.avis-mini-card span {
  display: block;
  margin-top: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.9rem;
}

/* Formulaire Avis */
.add-comment {
  background: #fff;
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.add-comment h3 {
  text-align: center;
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: clamp(1.1rem, 3vw, 1.2rem);
}

.add-comment form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: auto;
}

.add-comment input,
.add-comment textarea,
.add-comment select {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0.8rem;
  font-size: 1rem;
  width: 100%;
}

.add-comment textarea {
  resize: vertical;
  min-height: 100px;
}

.comment-success {
  margin-top: 1rem;
  color: green;
  text-align: center;
  font-weight: 500;
}

/* =========================================================
   CONTACT
========================================================= */
.contact-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
}

.contact-form {
  flex: 1;
  min-width: min(300px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  flex: 1;
  min-width: min(280px, 100%);
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.contact-info h3 {
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* =========================================================
   SERVICE PAGE
========================================================= */
.service-page {
  padding-top: 8rem;
  padding-bottom: 5rem;
  background: #f9f9f9;
  color: #333;
}

.service-page h1 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--primary);
  margin-bottom: 1rem;
}

.service-details {
  max-width: 900px;
  margin: auto;
  background: #fff;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.service-details h2 {
  color: var(--secondary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.service-details ul {
  list-style: disc;
  margin-left: 1.5rem;
  color: #444;
  line-height: 1.7;
}

.service-details p {
  color: #444;
  margin-bottom: 1rem;
}

/* =========================================================
   PAGES LÉGALES
========================================================= */
.legal-page {
  padding-top: 7rem;
  padding-bottom: 6rem;
  background: linear-gradient(to bottom, #f4f4f4 0%, #fdfdfd 100%);
  color: #333;
  line-height: 1.8;
}

.legal-page .container {
  max-width: 900px;
  margin: auto;
  background: #fff;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.legal-page h1 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.4rem;
}

.legal-page h2 {
  color: var(--secondary);
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 600;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  border-left: 4px solid var(--secondary);
  padding-left: 0.6rem;
}

.legal-page p {
  margin-bottom: 1rem;
  color: #444;
  text-align: justify;
}

.legal-page a {
  color: var(--secondary);
  transition: color 0.2s ease;
}

.legal-page a:hover {
  color: #b65a1c;
  text-decoration: underline;
}

.back-home {
  text-align: center;
  margin-top: 3rem;
}

.back-home a {
  display: inline-block;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.back-home a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 124, 43, 0.35);
}

/* =========================================================
   FOOTER
========================================================= */
footer {
  background: var(--bg-dark);
  color: #ccc;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--accent);
}

/* =========================================================
   ANIMATIONS
========================================================= */
.fade-in {
  opacity: 1;
  transform: none;
  transition: none;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  color: #fff;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: opacity var(--transition);
  z-index: 999;
}

.back-to-top:hover {
  opacity: 0.8;
}

/* =========================================================
   MEDIA QUERIES - MOBILE
========================================================= */
@media (max-width: 768px) {
  /* Header */
  .header-container {
    padding: 0.8rem 1rem;
  }
  
  .logo-img {
    height: 45px;
    width: 45px;
  }
  
  .logo-top {
    font-size: 0.8rem;
  }
  
  .logo-bottom {
    font-size: 1rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  nav a {
    font-size: 0.9rem;
  }
  
  /* Hero */
  .hero {
    background-attachment: scroll;
    min-height: 100svh;
  }
  
  .hero-logo {
    width: 250px;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -55%);
  }
  
  .hero-logo::before {
    inset: -25px;
  }
  
  .hero-content {
    padding: 1.5rem 1rem;
  }
  
  .hero-services {
    gap: 1rem;
  }
  
  /* Sections */
  section {
    padding: 4rem 1rem;
  }
  
  /* Services */
  .services-grid {
    gap: 1.5rem;
  }
  
  /* Garantie */
  .garantie-section {
    padding: 4rem 1rem;
  }
  
  .garantie-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  /* Avis */
  #avis {
    padding: 3rem 1rem;
  }
  
  .filters {
    justify-content: center;
  }
  
  .avis-grid,
  .avis-mini-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .add-comment {
    padding: 1.5rem 1rem;
  }
  
  /* Contact */
  .contact-flex {
    gap: 2rem;
  }
  
  /* Service Page */
  .service-page {
    padding-top: 6rem;
  }
  
  .service-details {
    padding: 1.5rem;
  }
  
  /* Legal Pages */
  .legal-page {
    padding-top: 6rem;
  }
  
  /* Back to top */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
  }
}

/* =========================================================
   MEDIA QUERIES - PETITS MOBILES
========================================================= */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .header-container {
    padding: 0.8rem 0.8rem;
  }
  
  nav ul {
    gap: 0.8rem;
  }
  
  .hero-content {
    padding: 1rem 0.8rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  section {
    padding: 3rem 0.8rem;
  }
  
  .service-details,
  .legal-page .container {
    padding: 1.5rem 1rem;
  }
}

/* =========================================================
   MEDIA QUERIES - TABLETTES
========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-logo {
    width: 320px;
  }
}

/* =========================================================
   UTILITAIRES
========================================================= */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* =========================================================
   ACCESSIBILITÉ
========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible pour navigation au clavier */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
/* =========================================================
   MENU BURGER RESPONSIVE
========================================================= */
.nav-mobile {
    position: relative;
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #fff;
    transition: transform 0.3s ease;
}

    .menu-toggle.active {
        transform: rotate(90deg);
    }

@media (max-width: 768px) {
    nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(23, 74, 124, 0.97);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        border-radius: 0 0 8px 8px;
        width: 200px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.3s ease;
    }

        nav ul.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

    nav li {
        margin-bottom: 0.8rem;
    }

    .menu-toggle {
        display: block;
    }

    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
}
