/* ==========================================================================
   guide-app.css
   Styles pour les guides utilisateur des apps Merci Facteur Pro.
   Dépendance : Bootstrap 5 + Bootstrap Icons (déjà dans la page hôte).
   ========================================================================== */



:root {
  --mf-violet: #5245FD;
  --mf-bg: #F4F4F8;
  --mf-text: #0A0A0A;
  --mf-gray-200: #e2e8f0;
  --mf-gray-500: #64748b;
  --mf-gray-700: #334155;
  --mf-radius: 14px;
}

/* --- Conteneur principal du guide --- */
.guide-wrapper {
    max-width: 880px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* --- Pastille numérotée d'étape (cercle violet) --- */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* --- Espacement vertical entre deux étapes --- */
.step-connector {
    margin-left: 17px;
    min-height: 120px;
}

/* --- Image de capture d'écran --- */
.guide-img {
    width: 90%;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
 transition: transform 0.3s ease;
    transform-origin: center;
}

.guide-img:hover {
    transform: scale(1.111);
}

/* --- Liens du sommaire --- */
.toc-link {
    text-decoration: none;
    color: #4b5563;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
}

.toc-link:hover {
    background: #f0f0ff;
    color: #6366f1;
}

/* --- Numéro rond dans le sommaire --- */
.toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f0f0ff;
    color: #6366f1;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.toc-link:hover .toc-num {
    background: #6366f1;
    color: #fff;
}

/* Sections catégorie (listing principal) */
.category-section { margin-bottom: 3.5rem; }
.category-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.category-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; flex-shrink: 0;
}
.category-header h2 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.badge-count {
  background: var(--mf-bg); color: var(--mf-gray-700);
  font-size: .75rem; font-weight: 600; border-radius: 50px; padding: .2rem .65rem; margin-left: .25rem;
}
 
/* Cards */
.guide-card {
  background: #fff; border-radius: var(--mf-radius); border: 1px solid var(--mf-gray-200);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
  height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.guide-card:hover {
  transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.06);
  border-color: var(--mf-violet); color: inherit; text-decoration: none;
}
.guide-card-img {
  width: 100%; height: 180px; overflow: hidden; background: var(--mf-bg);
  display: flex; align-items: center; justify-content: center;
}
.guide-card-img img { width: 100%; height: 100%; object-fit: cover; }
.guide-card-img .placeholder-icon { font-size: 3rem; color: var(--mf-violet); opacity: .4; }
.guide-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.guide-card-body h3 { font-size: 1rem; font-weight: 650; margin-bottom: .5rem; line-height: 1.4; }
.guide-card-body p {
  font-size: .875rem; color: var(--mf-gray-500); line-height: 1.55; margin-bottom: 1rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.guide-card-footer {
  display: flex; align-items: center; justify-content: flex-end;
  font-size: .8rem; color: var(--mf-gray-500);
}
.guide-card-footer .read-link {
  color: var(--mf-violet); font-weight: 600; text-decoration: none;
  display: flex; align-items: center; gap: .3rem;
}
 
/* Bouton "Voir tous les guides" */
.btn-voir-tous {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.25rem;
  padding: .55rem 1.25rem; border-radius: 50px; font-size: .875rem; font-weight: 600;
  background: #fff; color: var(--mf-violet); border: 1.5px solid var(--mf-violet);
  text-decoration: none; transition: all .15s ease;
}
.btn-voir-tous:hover { background: var(--mf-violet); color: #fff; text-decoration: none; }
 
/* Pagination (vue catégorie) */
.pagination-wrapper { display: flex; justify-content: center; margin: 3rem 0; }
.pagination .page-link {
  color: var(--mf-gray-700); border-color: var(--mf-gray-200); border-radius: 8px; margin: 0 .2rem;
  font-size: .9rem; font-weight: 500; padding: .5rem .85rem;
}
.pagination .page-link:hover { background: var(--mf-bg); border-color: var(--mf-violet); color: var(--mf-violet); }
.pagination .page-item.active .page-link {
  background: var(--mf-violet); border-color: var(--mf-violet); color: #fff;
}
.pagination .page-item.disabled .page-link { color: var(--mf-gray-200); pointer-events: none; }
 
/* Lien retour (vue catégorie) */
.back-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .9rem; font-weight: 500; color: var(--mf-gray-500); text-decoration: none;
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--mf-violet); }
 
/* ---- Responsive ---- */
 
/* Tablette (≤ 992px) */
@media (max-width: 992px) {
  .category-header h2 { font-size: 1.15rem; }
  .guide-card-body h3 { font-size: .95rem; }
  .guide-card-img { height: 160px; }
}
 
/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .category-section { margin-bottom: 2.5rem; }
  .category-header { gap: .5rem; margin-bottom: 1rem; }
  .category-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; }
  .category-header h2 { font-size: 1.05rem; }
  .badge-count { font-size: .7rem; padding: .15rem .5rem; }
  .guide-card-img { height: 140px; }
  .guide-card-body { padding: 1rem; }
  .guide-card-body h3 { font-size: .9rem; }
  .guide-card-body p { font-size: .8rem; -webkit-line-clamp: 2; margin-bottom: .75rem; }
  .guide-card-footer { font-size: .75rem; }
  .btn-voir-tous { font-size: .8rem; padding: .45rem 1rem; margin-top: 1rem; }
  .back-link { font-size: .85rem; margin-bottom: 1rem; }
  .row.g-4 { --bs-gutter-y: 1rem; --bs-gutter-x: .75rem; }
  .pagination .page-link { padding: .4rem .65rem; font-size: .8rem; }
  .pagination-wrapper { margin: 2rem 0; }
}
 
/* Petit mobile (≤ 480px) */
@media (max-width: 480px) {
  .guide-card { flex-direction: row; border-radius: 12px; }
  .guide-card-img { width: 110px; height: auto; min-height: 110px; flex-shrink: 0; border-radius: 12px 0 0 12px; }
  .guide-card-img img { border-radius: 12px 0 0 12px; }
  .guide-card-body { padding: .85rem; }
  .guide-card-body h3 { font-size: .85rem; margin-bottom: .35rem; }
  .guide-card-body p { font-size: .78rem; -webkit-line-clamp: 2; margin-bottom: .5rem; }
  .pagination .page-link { padding: .35rem .55rem; font-size: .75rem; margin: 0 .1rem; }
}