@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --primary-color: #F1A102;
  --primary-hover: #FADC6A;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-main: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --border-radius: 12px;
  --transition-speed: 0.3s;
  --container-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* direction is handled by html[dir] attribute */

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed) ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 77, 57, 0.2);
}

.btn-icon {
  gap: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-speed) ease;
  background-color: #fcfcfc;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
  background-color: #fff;
}

/* Price styling */
.part-price {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.part-price span {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-inline-start: 4px;
}

/* Header */
.header {
  background-color: transparent;
  padding: 20px 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header.solid {
  background-color: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: static;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 10px;
  padding-inline-start: 15px;
  padding-inline-end: 40px;
  border-radius: 20px;
  border: 1px solid #eee;
  background-color: #f8f9fa;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.header-search input:focus {
  background-color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  outline: none;
}

.header-search i {
  position: absolute;
  inset-inline-end: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.main-price {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.price-currency {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  color: var(--text-main);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: transparent;
  padding: 60px 0 20px;
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  flex: 1;
  min-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 15px;
  display: inline-block;
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #eee;
  color: var(--text-main);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
}

.footer-links-group {
  flex: 1;
  min-width: 150px;
}

.footer-links-group h4 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-group ul.grid-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 30px;
}

.footer-links-group a {
  color: var(--text-muted);
}

.footer-links-group a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Custom Modal */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.custom-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-modal {
  background-color: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-modal-overlay.show .custom-modal {
  transform: translateY(0) scale(1);
}

.custom-modal-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.custom-modal-icon.success {
  color: #28a745;
}

.custom-modal-icon.warning {
  color: #ffc107;
}

.custom-modal-icon.error {
  color: var(--primary-color);
}

.custom-modal-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text-main);
  font-family: inherit;
}

.custom-modal-message {
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.6;
}

.custom-modal-btn {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
}





@media (max-width: 768px) {
    
  .header-container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 10px 0;
    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
  }

  .header-search {
    order: 3;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .burger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
  }

  .burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .burger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .burger-btn.open span:nth-child(2) {
    opacity: 0;
  }
  .burger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Cacher le burger sur desktop */
.burger-btn {
  display: none;
}




.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    background: white;
    display: none;
    z-index: 999;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }

  nav.active {
    display: block !important;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  .nav-links li {
    text-align: right;
  }

  .nav-links a {
    display: block;
    padding: 10px;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: #f5f5f5;
  }
}

@media (max-width: 768px) {

  .nav-links {
    display: flex;
    flex-direction: column; /* toujours normal */
  }

  /* AR */
  html[dir="rtl"] .nav-links li a {
    text-align: right;
    direction: rtl;
  }

  /* FR */
  html[dir="ltr"] .nav-links li a {
    text-align: left;
    direction: ltr;
  }
}