/* 
 * Ostrakia - Main CSS
 * Fichier CSS principal optimisé
 */

:root {
  --primary-color: #4E598C;
  --secondary-color: #8661C1;
  --accent-color: #F9C784;
  --text-color: #333333;
  --light-bg: #F7F7F7;
  --white: #FFFFFF;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--light-bg);
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-color);
}

.btn-white:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: fixed;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 60px;
  width: auto;
  margin-right: 10px;
  border-radius: 5px;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-text span {
  color: var(--secondary-color);
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}

.nav-menu {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

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

.nav-link.active {
  color: var(--secondary-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

/* ===== LANGUAGE SELECTOR ===== */
.language-nav {
  display: flex;
  align-items: center;
  margin-left: 20px;
  position: relative;
  margin-right: 0;
}

.language-selected {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.language-selected:hover {
  background-color: var(--light-bg);
}

.language-flag {
  margin-right: 8px;
  font-size: 1.2rem;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: var(--shadow);
  width: 150px;
  z-index: 1001;
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-option:hover {
  background-color: var(--light-bg);
}

.language-option-flag {
  margin-right: 10px;
  font-size: 1.2rem;
}

.language-dropdown.show {
  display: flex;
}

.language-selected-text {
  display: inline-block;
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 200px 0 120px;
  background-color: var(--light-bg);
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1;
  padding-right: 30px;
  position: relative;
  z-index: 2;
  background-color: rgba(247, 247, 247, 0.85);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 600px;
  backdrop-filter: blur(5px);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 100vw;
  height: 100%;
  margin-left: calc(-50vw + 50%);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* Solution page hero */
.solution-hero {
  padding: 150px 0 500px;
  overflow: visible;
}

.solution-hero-text {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 40px;
}

.solution-hero-image {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  width: 80%;
  height: 400px;
  margin: 50px auto -300px;
  z-index: 3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.solution-hero-image img {
  border-radius: 10px;
}

/* ===== FEATURES SECTION ===== */
.features {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 50px;
  color: var(--primary-color);
}

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

.feature-card {
  flex-basis: 30%;
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.feature-description {
  color: #666;
}

/* ===== CTA SECTION ===== */
.cta {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
}

.cta-title {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.cta-description {
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--text-color);
  color: var(--white);
  padding: 50px 0 20px;
}

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

.footer-column {
  flex-basis: 22%;
  margin-bottom: 30px;
}

.footer-title {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-link {
  margin-bottom: 10px;
}

.footer-link a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link a:hover {
  color: var(--white);
}

.social-media {
  display: flex;
  margin-top: 20px;
}

.social-icon {
  margin-right: 15px;
  font-size: 1.5rem;
  color: #ccc;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: var(--white);
}

.copyright {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #444;
  color: #ccc;
}

/* ===== HOW IT WORKS PAGE ===== */
.process-section {
  padding: 80px 0;
}

.steps-container {
  margin-top: 50px;
}

.step-item {
  display: flex;
  margin-bottom: 80px;
  position: relative;
}

.step-number {
  flex: 0 0 80px;
  height: 80px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin-right: 30px;
  z-index: 1;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.step-description {
  margin-bottom: 20px;
}

.step-image {
  margin-top: 20px;
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.step-item:nth-child(5) .step-image {
  max-width: 100%;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 80px;
  left: 40px;
  width: 2px;
  height: calc(100% + 20px);
  background-color: var(--light-bg);
  z-index: 0;
}

.tips-section {
  background-color: var(--light-bg);
  padding: 80px 0;
}

.tips-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 50px;
}

.tip-card {
  flex-basis: 48%;
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.tip-icon {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: 20px;
}

.tip-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* ===== SOLUTION PAGE ===== */
.solution-section {
  padding: 80px 0;
}

.solution-section:nth-child(even) {
  background-color: var(--light-bg);
}

.solution-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.solution-text {
  flex: 1;
}

.solution-image {
  flex: 1;
}

.solution-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.solution-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.solution-benefits {
  margin-top: 30px;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.benefit-icon {
  color: var(--secondary-color);
  margin-right: 15px;
  font-size: 1.2rem;
}

/* ===== CONTACT PAGE ===== */
.contact-section {
  padding: 80px 0;
}

.contact-container {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  margin-top: 50px;
}

.contact-form-container {
  flex: 1;
  background-color: var(--white);
  padding: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.contact-info {
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.info-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.info-card-title {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.info-card-title i {
  margin-right: 15px;
  color: var(--secondary-color);
}

.contact-item {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.contact-icon {
  width: 40px;
  color: var(--secondary-color);
}

.map-container {
  margin-top: 30px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 991px) {
  .language-selected-text {
    display: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow);
  }

  .nav-item {
    margin: 16px 0;
  }

  .nav-menu.active {
    left: 0;
  }
  
  .language-nav {
    position: absolute;
    top: 25px;
    right: 60px;
  }
  
  .language-selected-text {
    display: inline-block;
  }

  .hero-content {
    flex-direction: column;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: 30px;
    text-align: center;
    width: 90%;
    margin: 0 auto;
  }

  .hero-image {
    position: absolute;
    height: 100%;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  
  .solution-hero {
    padding: 150px 0 400px;
  }
  
  .solution-hero-image {
    width: 90%;
    height: 300px;
    margin: 30px auto -200px;
  }

  .feature-card {
    flex-basis: 100%;
  }

  .footer-column {
    flex-basis: 45%;
  }
  
  /* How it works page responsive */
  .step-item {
    flex-direction: column;
  }
  
  .step-number {
    margin-bottom: 20px;
  }
  
  .step-item:not(:last-child)::after {
    display: none;
  }
  
  .tip-card {
    flex-basis: 100%;
  }
  
  /* Solution page responsive */
  .solution-content {
    flex-direction: column;
  }
  
  .solution-content.reverse {
    flex-direction: column-reverse;
  }
  
  .solution-image {
    margin-bottom: 30px;
  }
  
  /* Contact page responsive */
  .contact-container {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .footer-column {
    flex-basis: 100%;
  }
}
