/* Variables */
:root {
  --bg-main: #F8FAFC;
  --bg-secondary: #EFEDE3;
  --bg-tabs: #D9D4C7;  /* nouvelle couleur pour le bloc onglets */
  --bg-pix: #AD4949;
  --primary: #1D2C3A;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --gray-dark: #4B5563;
  --gray-medium: #6B7280;
}

/* Reset et structure */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Arial", sans-serif;
    background-color: var(--bg-main);
    color: var(--primary);
    display: flex;
    flex-direction: column;
}

.help-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
.help-header {
    background-color: var(--bg-secondary);
    padding: 30px 20px;
}

.help-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
}

.help-logo {
    height: 60px;
    width: auto;
}

/* Row pour les sections */
.help-sections-row {
    display: flex;
    flex-wrap: wrap;        
    gap: 20px;
    justify-content: center; /* étire les encadrés */
    margin-top: 40px;
}

/* Chaque section */
.help-section-box {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1 1 45%;
    max-width: 45%;
    min-width: 250px;
    height: 150px;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: bold;
    transition: background-color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.help-section-box:hover {
    background-color: var(--bg-secondary);
    border-color: var(--bg-pix);
}

/* Titre */
.help-section-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--gray-dark);
}

/* Liste des catégories */
.help-section-box ul {
    padding-left: 20px;
    margin: 0;
}

.help-section-box li {
    font-size: 1rem;
    color: var(--gray-medium);
    margin-bottom: 8px;
}

.help-section-box li a {
    text-decoration: none;
    color: var(--primary);
}

.help-section-box li a:hover {
    text-decoration: underline;
}

/* Empty center (si aucune section) */
.empty-center {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 50px;
}

.header-text h1 {
    margin: 0;
    font-size: 2rem;
    color: var(--gray-dark);
}

.header-text p {
    margin: 5px 0 0;
    font-size: 1rem;
    color: var(--gray-dark);
}

/* BLOC ONGLETS */
.help-tabs-block {
    background-color: var(--bg-tabs);
    padding: 10px 0;
}

.help-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.tab-link {
    padding: 8px 18px;
    border-radius: 8px;
    background-color: var(--white);
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.tab-link:hover,
.tab-link:focus {
    background-color: var(--bg-pix);
    color: var(--white);
}

/* MAIN */
.help-main {
    flex: 1;
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 10px;
}

/* FAQ */
.faq-tab {
    margin-bottom: 40px;
}

.faq-item {
    background-color: var(--white);
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--gray-dark);
}

.faq-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-medium);
}

/* FOOTER */
.footer {
  padding: 40px 0 20px;
  text-align: center;
  font-size: 0.9rem;
  background-color: var(--bg-secondary);
  color: var(--primary);
  margin-top: 20px;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  margin: 0 12px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #4B5563;
}

.footer-legal p {
  margin: 4px 0;
}

.footer-copy {
  font-size: 0.8rem;
  color: #6B7280;
}

/* Footer – icône Facebook */
.footer-social {
  margin-bottom: 24px;
  text-align: center;
}

.facebook-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary); /* bleu foncé */
  color: white;
  border-radius: 50%;
  text-decoration: none;
  font-size: 18px;
  transition: background-color 0.3s, transform 0.3s;
}

.facebook-icon:hover {
  background-color: #16232B; /* un peu plus foncé au survol */
  transform: scale(1.1);
}



/* Conteneur section */
.help-section-container {
    display: flex;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap; /* responsive */
}

/* Colonne gauche : catégories */
.help-categories {
    flex: 0 0 220px; /* largeur fixe */
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

.help-categories h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: var(--gray-dark);
}

.help-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-categories li {
    margin-bottom: 10px;
}

.help-categories a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
}

.help-categories a.active,
.help-categories a:hover {
    color: var(--bg-pix);
    font-weight: bold;
}

/* Colonne droite : articles */
.help-articles {
    flex: 1;
    min-width: 300px;
    border: 1px solid var(--bg-pix);
    padding: 5px 10px;

    display: flex;
    flex-direction: column; /* Colonne verticale */
}

.help-articles article {
    display: flex;
    flex-direction: column;
    flex: 1;              /* prend toute la hauteur dispo */
}

.article-inner {
    flex: 1;                  /* prend tout l’espace restant */
    display: flex;
    flex-direction: column;    /* contenu en colonne */
    justify-content: space-between; /* pousse la date en bas */
    padding: 0;
}

.faq-item {
    background-color: var(--white);
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--gray-dark);
    font-size: 1.2rem;
}

.faq-item p {
    font-size: 1rem;
    color: var(--gray-medium);
    line-height: 1.5;
}

/* Header de la catégorie */
.category-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.category-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-dark);
}

.category-description {
    margin: 5px 0 0;
    font-size: 1rem;
    color: var(--gray-medium);
}

/* Liste des articles (page catégorie) */
.article-list {
    list-style: none;
    padding: 15px 10px;
    margin: 0;
}

.article-list li {
    margin-bottom: 12px;
    font-size: 1rem;
}

.article-list li a {
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.article-list li a:hover {
    color: var(--bg-pix);
}

.article-icon {
    color: var(--bg-pix);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.article-content {
    padding: 15px 10px 20px;
    font-size: 1rem;
    color: var(--gray-medium);
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul,
.article-content ol {
    margin: 10px 0 15px 20px;
}

.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.article-updated {
    text-align: right;
    font-size: 0.85rem;
    color: var(--gray-medium);
    font-style: italic;
    margin-top: 20px; /* optionnel, on peut ajuster */
}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--bg-pix);
}

.breadcrumb-sep {
    margin: 0 5px;
}

@media (max-width: 600px) {
    .breadcrumb-ancestor {
        display: none;
    }
    
    .breadcrumb a,
    .breadcrumb span {
        white-space: nowrap; /* éviter le retour à la ligne */
    }

    .breadcrumb {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Header responsive */
@media (max-width: 768px) {
    .help-header {
        padding: 20px 15px;
    }

    .help-header .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .help-logo {
        height: 50px; /* réduit un peu le logo */
        width: auto;
    }

    .header-text h1 {
        font-size: 1.5rem; /* un peu plus petit */
        margin: 0;
    }

    .header-text p {
        font-size: 0.9rem; /* plus petit pour le sous-titre */
        margin: 3px 0 0;
    }

    .help-section-container {
        flex-direction: column;
    }

    .help-categories {
        width: 100%;
        margin-bottom: 20px;
    }

    .help-articles {
        width: calc(100% - 20px);
    }
}

/* Très petit écran : cacher le sous-titre */
@media (max-width: 400px) {
    .header-text p {
        display: none;
    }

    .header-text h1 {
        font-size: 1.3rem;
    }
}