:root {
  --bg-color: #e5e5ea;
  --text-color: #1d1d1f;
  --section-bg: white;
  --section-text: #333;
  --button-bg: #0071e3;
  --button-hover: #005bb5;
  --border: #ccc;
  --shadow: rgba(0,0,0,0.06);
}

body.dark-mode {
  --bg-color: #1c1c1e;
  --text-color: #f2f2f7;
  --section-bg: #2c2c2e;
  --section-text: #e0e0e3;
  --button-bg: #0a84ff;
  --button-hover: #0060df;
  --border: #3a3a3c;
  --shadow: rgba(0,0,0,0.28);
}

body {
  margin: 0;
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  text-align: center;
  animation: fadeIn 1s ease-in;
  overflow-x: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fade-out {
  animation: fadeOut 1s ease forwards;
}

.site-header {
  background-color: #000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #333;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: bold;
  color: #f5c518;
  letter-spacing: 1px;
}

.logo .tifinagh {
  font-family: 'Courier New', monospace;
  margin-right: 8px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.main-nav li {
  display: inline;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav a:hover {
  background-color: rgba(255,255,255,0.1);
  color: #f5c518;
}

.main-nav a.active {
  color: #f5c518;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ✅ Amélioration 1 : Focus visible pour l'accessibilité */
a:focus,
button:focus {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-container input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  background-color: #f9f9f9;
  color: #000;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .search-container input {
  background-color: #2c2c2e;
  color: #f2f2f7;
}

.search-container input:focus {
  border-color: #999;
  outline: none;
  box-shadow: 0 0 6px rgba(0,0,0,0.12);
}

.search-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.search-button:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, opacity 0.2s ease;
}

.theme-toggle:hover {
  background-color: rgba(255,255,255,0.1);
  opacity: 0.9;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: white;
}

.hero {
  padding: 5rem 2rem;
}

.hero h2 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero .highlight {
  color: #f5c518;
  font-weight: bold;
}

.hero p {
  font-size: 1.2rem;
  color: var(--section-text);
  margin-bottom: 2rem;
}

.section {
  max-width: 800px;
  margin: 2rem auto;
  text-align: left;
  padding: 2rem;
  background-color: var(--section-bg);
  border-radius: 14px;
  box-shadow: 0 4px 12px var(--shadow);
  color: var(--section-text);
}

.section h3 {
  margin-top: 0;
  font-size: 1.6rem;
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section p {
  font-size: 1rem;
  color: var(--section-text);
}

.section img {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 1rem auto;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  object-fit: contain;
}

.button {
  background-color: var(--button-bg);
  color: white;
  padding: 0.9rem 1.6rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  background-color: var(--button-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.contact-form {
  max-width: 600px;
  margin: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 600;
  color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  background-color: var(--section-bg);
  color: var(--text-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--button-bg);
  box-shadow: 0 0 6px rgba(0, 113, 227, 0.4);
}

.zoho-form-wrapper iframe {
  width: 100%;
  height: 720px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--section-bg);
  box-shadow: 0 4px 12px var(--shadow);
}

.site-footer {
  background-color: #000;
  color: #f5f5f5;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid #333;
}

.footer-logo {
  font-family: 'Courier New', monospace;
  color: #f5c518;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#search-query {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--section-text);
}

#results {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

#results .card {
  background-color: var(--section-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: auto;
  max-width: none;
}

#results .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow);
}

#results .card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  color: var(--text-color);
}

#results .card a {
  color: var(--button-bg);
  text-decoration: none;
  font-weight: 600;
}

#results .card a:hover {
  text-decoration: underline;
}

#results .card p {
  font-size: 0.95rem;
  color: var(--section-text);
}


@media (max-width: 1024px) {
  .site-header {
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 1.2rem;
  }

  .hero {
    padding: 3.5rem 1.4rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .section {
    padding: 1.5rem;
    margin: 1.5rem auto;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 58px;
    right: 10px;
    background-color: #111;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 20;
  }

  .main-nav ul a {
    display: block;
    padding: 0.6rem 0.8rem;
  }

  .main-nav.open ul {
    display: flex;
  }
/* ✅ Transition douce sur l’apparition du menu mobile */
.main-nav ul {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.main-nav.open ul {
  opacity: 1;
}

  .menu-toggle {
    display: inline-block;
  }

  .header-actions {
    gap: 8px;
  }

  .search-container input {
    max-width: 150px;
  }

  .zoho-form-wrapper iframe {
    height: 640px;
  }
}

.share-buttons {
  text-align: center;
  padding: 25px 0;
}

.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 10px;
  text-decoration: none;
  transition: transform 0.2s ease-in-out;
}

.share-buttons i {
  font-size: 26px;
  color: #ffffff;
}

.share-buttons .facebook {
  background-color: #1877F2;
}

.share-buttons .twitter {
  background-color: #1DA1F2;
}

.share-buttons .linkedin {
  background-color: #0A66C2;
}

.share-buttons .whatsapp {
  background-color: #25D366;
}

.share-buttons a:hover {
  transform: scale(1.1) translateY(-2px);
  opacity: 0.9;
}

main.hero ul {
  list-style-type: none;
  padding-left: 0;
}

.project-cards {
  background-color: #f4f4f7; 
  padding: 60px 20px;
  text-align: center;
}

.dark-mode .project-cards {
  background-color: #1c1c1e;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: #333;
}

.dark-mode .section-title {
  color: #f5f5f7;
}

.cards-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.cards-container .card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
  width: 100%;
  max-width: 350px;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.dark-mode .cards-container .card {
  background-color: #2c2c2e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cards-container .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cards-container .card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.cards-container .card p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.6;
}

.dark-mode .cards-container .card p {
  color: #c7c7c7;
}

.button-secondary {
  background-color: transparent;
  border: 2px solid #007AFF;
  color: #007AFF;
  padding: 10px 20px;
}

.button-secondary:hover {
  background-color: #007AFF;
  color: #ffffff;
}

.button-secondary.disabled {
  border-color: #aaa;
  color: #aaa;
  background-color: transparent;
  pointer-events: none;
}

.feature-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.feature-section.alt {
  flex-direction: row-reverse;
}

.feature-image-link {
  flex: 1;
  min-width: 250px;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.feature-image-link:hover {
  opacity: 0.85;
}

.feature-image-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.feature-text {
  flex: 1;
  min-width: 250px;
}
@media (max-width: 768px) {
  .section {
    flex-direction: column !important;
  }

  .section a,
  .section div {
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .section img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1rem auto !important;
  }
}
/* ✅ Ajustement typographique pour mobile */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 2rem;
  }
}
