/* responsive.css
   Gère le responsive design du hero section pour PC, tablette et mobile
   - PC: hero-pc.jpg
   - Tablette: hero-tablet.jpg
   - Mobile: hero-mobile.jpg
*/

/* Mobile First (par défaut) */
.hero {
  width: 100vw;
  height: 200vw;
  min-height: 480px;
  max-height: 700px;
  background: url('images/hero-mobile.jpg') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  color: #fff;
  position: relative;
  padding-top: 120px;
}
.hero p {
  padding-bottom: 260px;}

/* A-Propos - story leading title and desktop layout tweak */
.story-leading {
  text-align: center;
  font-size: 28px;
  color: var(--primary);
  margin: 30px auto 20px auto;
}

/* Desktop-only layout: place image and text side-by-side on PC (>=1024px) */
@media (min-width: 1024px) {
  .story-section {
    display: flex;
    flex-direction: row; /* force row on LTR */
    align-items: center;
    gap: 40px;
    align-items: flex-start;
  }
  /* Give the image slightly more width so it reads like a hero/photo */
  .story-image {  max-width: 50%; }
  .story-text { flex: 0 0 45%; max-width: 50%; }
  .story-image img { width: 500px; height: auto; display: block; }
  /* LTR: left-align paragraphs on desktop for readability */
  body:not([dir="rtl"]) .story-text { text-align: left; }
}

/* For RTL pages keep visual flow (image on right) on desktop */
@media (min-width: 1024px) {
  html[dir="rtl"] .story-section {
    flex-direction: row-reverse;
  }
  html[dir="rtl"] .story-text { text-align: right; }
}

/* Tablette (>= 600px) */
@media (min-width: 600px) and (max-width: 1023px) {
  .hero {
    height: 40vw;
    min-height: 350px;
    max-height: 600px;
    background-image: url('images/hero-tablet.jpg');
  }
}

/* PC (>= 1024px) */
@media (min-width: 1024px) {
  .hero {
    height: 38vw;
    min-height: 520px;
    max-height: 820px;
    background-image: url('images/hero-pc.jpg');
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding-left: 10px;
    padding-top: 120px;
  }
  .blog-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);  /* ← 3 colonnes */
    gap: 30px; 
}
}

/* Optionnel : ajustements du texte et du contenu du hero */
.hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
@media (min-width: 600px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
    margin-left: 0;
    margin-right: 0;
  }
}

.hero p {
  font-size: 1rem;
  max-width: 90vw;
  margin: 20px auto;
  padding-bottom: 30px;
}
@media (min-width: 600px) {
  .hero p {
    font-size: 1.2rem;
    max-width: 70vw;
  }
}
@media (min-width: 1024px) {
  .hero p {
    font-size: 1.3rem;
    max-width: 50vw;
    margin-left: 0;
    margin-right: 0; padding-top: 60px;
  }
  body.ar .hero {
    height: 38vw;
    min-height: 520px;
    max-height: 820px;
    background-image: url('images/hero-pc-arabic.jpg');
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: right;
    padding-left: 10px;
    padding-top: 120px;
  }
/* Boutons côte à côte dans le hero */
.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
  margin-top: 24px;
}
    .hero-buttons {
      justify-content: flex-start;
    }
    body.ar .hero-buttons {
      justify-content: flex-start; padding-top: 20px;
    }
  }

/* Pour garantir la lisibilité du texte sur l'image */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1;
}
.hero > * {
  position: relative;
  z-index: 2;
}

/* Responsive Mentions légales modernisées */
@media (max-width: 900px) {
    .legal-content {
        padding: 18px 8px;
        margin: 18px 4px;
    }
    .legal-content h2 { font-size: 1.1em; }
}
    @media (max-width: 900px) {
        .legal-content {
            padding: 18px 8px;
            margin: 18px 4px;
        }
        .legal-content h2 { font-size: 1.1em; }
    }
    .legal-content strong { color: #1a3a6c; }
    .legal-content .fa-building { color: #0099ff; }
    .legal-content .fa-server { color: #25d366; }
    .legal-content .fa-copyright { color: #ffb347; }
    .legal-content .fa-gavel { color: #1a3a6c; }
    .legal-content .fa-exclamation-triangle { color: #ff6b35; }




/* Correction supplémentaire pour les cartes de service */
@media (max-width: 768px) {
    .service-block, 
    .service-block:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .service-image {
        min-width: 100%;
    }
    
    .service-info {
        width: 100%;
    }
}


/* Amélioration générale de la lisibilité mobile */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .card-category {
        font-size: 12px;
    }
    
    .widget-title {
        font-size: 18px;
    }
}