/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #2b2b2b;
  background-image: url("./fond.jpg");
  background-position: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: relative;
  overflow-x: hidden;
  /* Empêche le scroll horizontal dû aux onglets */
}

h1 {
  margin-top: 0;
  padding-left: 5px;
  color: #6b4a2d;
}

h4 {
  margin-top: 0;
  padding-left: 5px;
  color: #6b4a2d;
}

/* Texte justifié sur tout le site pour un rendu plus propre */
/* Texte justifié uniquement dans les pages du classeur */
.page p,
.page li {
  text-align: justify;
}

header,
.binder {
  position: relative;
  z-index: 1;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
  width: 80vw;
  /* Alignement avec la largeur du classeur */
  max-width: 1300px;
  display: flex;
  align-items: center;

  justify-content: space-between;
  padding: 20px 0;
  margin-bottom: 20px;
}

.logo {
  height: 160px;
  width: auto;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

nav a:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Couleurs spécifiques pour les liens du header (comme les onglets) */
nav a:nth-child(1) {
  background: linear-gradient(90deg, #c9a36a, #d4b57d);
}

/* Accueil */
nav a:nth-child(2) {
  background: linear-gradient(90deg, #b5b5b5, #c8c8c8);
  display: none;
}

/* Services */
nav a:nth-child(3) {
  background: linear-gradient(90deg, #c47a3c, #d68d51);
  display: none;
}

/* À propos */
nav a:nth-child(4) {
  background: linear-gradient(90deg, #9e9e9e, #b1b1b1);
  display: none;
}

/* Tarifs */
nav a:nth-child(5) {
  background: linear-gradient(90deg, #7b8f6a, #8fa87d);
  display: none;
}

/* Contact */
nav a:nth-child(6) {
  background: linear-gradient(90deg, #6a7b8f, #7d8fa8);
}

/* Rendez-vous */

nav a.active {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Menu hamburger (Desktop: hidden) */
.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #653301;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================
   3. CLASSEUR (BINDER) STRUCTURE
   ========================================= */
.binder {
  width: 80vw;
  /* Réduit pour laisser de la place aux onglets à droite */
  max-width: 1300px;
  min-height: 75vh;
  background: #653301;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
  border-radius: 14px;
  padding: 25px;
  display: flex;
  position: relative;
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.3),
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 50px 100px rgba(0, 0, 0, 0.3);
}

/* Cadre intérieur avec couture */
.binder::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  pointer-events: none;
}

/* =========================================
   4. PAGES
   ========================================= */
.page {
  background: #f8f6f2;
  width: 50%;
  padding: 40px;
  position: relative;
  z-index: 5;
  /* Suppression de l'overflow pour que la hauteur s'adapte au texte */
}

.left {
  border-radius: 10px 0 0 10px;
}

.right {
  border-radius: 0 10px 10px 0;
}

/* Photo de profil intégrée au texte */
.profile-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  float: right;
  margin: 0 0 15px 20px;
  shape-outside: circle(50%);
}

@media (max-width: 768px) {
  .profile-photo {
    float: none;
    display: block;
    margin: 0 auto 20px auto;
  }
}

/* =========================================
   5. RELIURE & ONGLETS (BINDING & TABS)
   ========================================= */
/* Centre du classeur (reliure avec ombre) */
.binding {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 40px;
  transform: translateX(-50%);
  background: linear-gradient(to right,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0.1) 100%);

  z-index: 6;
}

.binding-hole {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 2px solid #333;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    0 1px 2px rgba(255, 255, 255, 0.1);
}

/* Onglets */
.tabs {
  position: absolute;
  left: 100%;
  /* S'accroche au bord droit exact du classeur */
  margin-left: -40px;
  /* Léger chevauchement pour l'effet "attaché" */
  top: 60px;
  /* Position fixe en haut */
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* z-index: 4;  <-- Supprimé pour que les enfants puissent dépasser z-index: 5 */
  /* Passe au-dessus des pages du classeur (qui sont à z-index: 5) */
}

.tabs a {
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 0 10px 10px 0;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 140px;
  text-align: left;
  /* transform: translateX(-12px); <-- Supprimé pour simplifier le placement */
  position: relative;
  z-index: 2;
  text-decoration: none;
  display: block;
}

.tabs a.active {
  transform: translateX(10px);
  z-index: 100;
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.4);
}

.tabs a:hover {
  transform: translateX(5px);
}

.tabs a.active:hover {
  transform: translateX(5px);
}

.tabs a:nth-child(1) {
  background: linear-gradient(90deg, #c9a36a, #d4b57d);
}

.tabs a:nth-child(2) {
  background: linear-gradient(90deg, #b5b5b5, #c8c8c8);
}

.tabs a:nth-child(3) {
  background: linear-gradient(90deg, #c47a3c, #d68d51);
}

.tabs a:nth-child(4) {
  background: linear-gradient(90deg, #9e9e9e, #b1b1b1);
}

.tabs a:nth-child(5) {
  background: linear-gradient(90deg, #7b8f6a, #8fa87d);
}

/* 6ème onglet : Rendez-vous (Bleu ardoise / Gris bleuté) */
.tabs a:nth-child(6) {
  background: linear-gradient(90deg, #6a7b8f, #7d8fa8);
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
  width: 100%;
  text-align: center;
  padding: 20px;
  color: #653301;
  font-size: 14px;
  margin-top: 30px;
  z-index: 10;
  position: relative;
}

footer p {
  margin: 5px 0;
}

footer a {
  color: #653301;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #8a4601;
  text-shadow: 0 0 10px rgba(212, 181, 125, 0.5);
}

/* =========================================
   7. RESPONSIVE DESIGN (MOBILE)
   ========================================= */
@media (max-width: 768px) {
  body {
    padding: 10px 0;
  }

  /* Header mobile */
  header {
    padding: 15px 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1000;
  }

  .logo {
    height: 80px;
    /* Reduced logo size on mobile */
  }

  /* Menu hamburger visible */
  .menu-toggle {
    display: block;
  }

  /* Navigation desktop cachée => dropdown */
  nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    background: rgba(17, 17, 17, 0.95);
    border-radius: 8px;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  nav.active {
    display: flex;
  }

  nav a {
    width: 200px;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    display: block !important;
  }

  /* Couleurs Onglets Mobile (Identique au Classeur) */
  nav a:nth-child(1) {
    background: linear-gradient(90deg, #c9a36a, #d4b57d);
  }

  nav a:nth-child(2) {
    background: linear-gradient(90deg, #b5b5b5, #c8c8c8);
  }

  nav a:nth-child(3) {
    background: linear-gradient(90deg, #c47a3c, #d68d51);
  }

  nav a:nth-child(4) {
    background: linear-gradient(90deg, #9e9e9e, #b1b1b1);
  }

  nav a:nth-child(5) {
    background: linear-gradient(90deg, #7b8f6a, #8fa87d);
  }

  nav a:nth-child(6) {
    background: linear-gradient(90deg, #6a7b8f, #7d8fa8);
  }

  /* Classeur mobile (Column layout) */
  .binder {
    flex-direction: column;
    height: auto;
    padding: 15px;
    max-width: 100%;
    width: 95vw;
  }

  /* Pages empilées verticalement */
  .page {
    width: 100%;
    padding: 25px;
    border-radius: 10px !important;
    margin-bottom: 15px;
  }

  .page:last-of-type {
    margin-bottom: 0;
  }

  /* Cacher la reliure sur mobile */
  .binding {
    display: none;
  }

  /* Cacher les onglets latéraux sur mobile */
  .tabs {
    display: none;
  }

  /* Ajuster le cadre couture */
  .binder::before {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }

  /* Footer mobile */
  footer {
    font-size: 12px;
    padding-bottom: 30px;
  }
}

/* =========================================
   8. BUTTONS
   ========================================= */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #fff !important;
  font-size: 1.05em;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-contact {
  background: linear-gradient(135deg, #6a7b8f, #4a5b6f);
}

.btn-rdv {
  background: linear-gradient(135deg, #c9a36a, #a68551);
}

.title-icon {
  color: #c9a36a;
  margin-right: 10px;
  width: 25px;
  text-align: center;
}