/* ================================================================
 * guides.css — guides.php + articles.php
 * Créé de zéro, indépendant de general.css et style.css
 * Aucun position:fixed, aucun débordement possible
 * ================================================================ */

/* ---- Conteneur page ---- */
.gp-page {
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-bottom: 24px;
}
.gp-page * {
    box-sizing: border-box;
}

/* ================================================================
 * HERO
 * ================================================================ */
.gp-hero {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    padding: 20px 16px 16px;
    margin-bottom: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.gp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 85% 5%,
            color-mix(in srgb, var(--primary, #0066cc) 12%, transparent), transparent 55%),
        radial-gradient(ellipse at 10% 95%,
            color-mix(in srgb, #7c3aed 8%, transparent), transparent 55%);
}
.gp-hero > * { position: relative; }

.gp-hero__icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary, #0066cc) 12%, transparent);
    color: var(--primary, #0066cc);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.25rem;
}
.gp-hero__title {
    margin: 0 0 5px;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-main, #1e2a3e);
    overflow-wrap: break-word;
}
.gp-hero__sub {
    margin: 0 0 16px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary, #5a6874);
}
.gp-hero__stats {
    display: flex;
    border-top: 1px solid var(--border, #e2e8f0);
    padding-top: 12px;
    margin-top: 2px;
}
.gp-hero__stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.gp-hero__stat + .gp-hero__stat {
    border-left: 1px solid var(--border, #e2e8f0);
}
.gp-hero__stat strong {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--primary, #0066cc);
    line-height: 1;
}
.gp-hero__stat span {
    font-size: 0.62rem;
    color: var(--text-secondary, #5a6874);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================
 * FILTRES — toujours static, jamais sticky
 * ================================================================ */
.gp-filters {
    position: static !important;
    top: unset !important;
    background: var(--bg-main, #f8f9fa);
    border-top: 1px solid var(--border, #e2e8f0);
    border-bottom: 1px solid var(--border, #e2e8f0);
    padding: 10px 0;
    margin: 0 0 16px;
    width: 100%;
    overflow: hidden;
}
.gp-filters__scroll,
.gp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: hidden;
    width: 100%;
}

/* Pills */
.gp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #ffffff);
    color: var(--text-main, #1e2a3e);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    cursor: pointer;
}
.gp-pill i { font-size: 0.68rem; }
.gp-pill:hover {
    border-color: var(--primary, #0066cc);
    color: var(--primary, #0066cc);
}
.gp-pill--active {
    background: var(--primary, #0066cc) !important;
    border-color: var(--primary, #0066cc) !important;
    color: #fff !important;
    font-weight: 700;
}
.gp-pill__n {
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(0,0,0,.12);
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.gp-pill--active .gp-pill__n { background: rgba(255,255,255,.25); }

/* ================================================================
 * SECTIONS
 * ================================================================ */
.gp-section { margin-bottom: 18px; }
.gp-section__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}
.gp-section__title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-main, #1e2a3e);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}
.gp-section__title i { color: var(--primary, #0066cc); font-size: 0.8rem; }
.gp-section__count {
    font-size: 0.72rem;
    color: var(--text-secondary, #5a6874);
    white-space: nowrap;
}

/* ================================================================
 * LISTE
 * ================================================================ */
.gp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ================================================================
 * CARTE
 * ================================================================ */
.gp-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,0,0,.08);
}

/* Cover */
.gp-card__cover {
    position: relative;
    width: 100%;
    height: 145px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-card__cover img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gp-card:hover .gp-card__cover img { transform: scale(1.04); }
.gp-card__cover > i {
    font-size: 3rem;
    color: rgba(255,255,255,.28);
    position: relative;
    z-index: 1;
}

/* Badges cover */
.gp-card__cat {
    position: absolute;
    top: 8px; left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,.58);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
}
.gp-card__cat i { font-size: 0.55rem; flex-shrink: 0; }

.gp-card__time {
    position: absolute;
    top: 8px; right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.92);
    color: var(--text-main, #1e2a3e);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 2;
}

/* Corps carte */
.gp-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.gp-card__author {
    font-size: 0.65rem;
    color: var(--primary, #0066cc);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gp-card__title {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-main, #1e2a3e);
    overflow-wrap: break-word;
    word-break: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gp-card__excerpt {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.48;
    color: var(--text-secondary, #5a6874);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.gp-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-secondary, #5a6874);
    border-top: 1px dashed var(--border, #e2e8f0);
    padding-top: 8px;
    margin-top: 2px;
    gap: 6px;
    flex-wrap: nowrap;
}
.gp-card__foot > span:first-child {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.gp-card__cta {
    color: var(--primary, #0066cc);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 0.72rem;
    white-space: nowrap;
}
.gp-card__cta i {
    font-size: 0.62rem;
    transition: transform 0.18s;
}
.gp-card:hover .gp-card__cta i { transform: translateX(3px); }

/* ================================================================
 * ÉTAT VIDE
 * ================================================================ */
.gp-empty {
    text-align: center;
    padding: 36px 16px;
    background: var(--surface, #ffffff);
    border: 1px dashed var(--border, #e2e8f0);
    border-radius: 14px;
    color: var(--text-secondary, #5a6874);
}
.gp-empty i {
    font-size: 2.2rem;
    color: var(--primary, #0066cc);
    margin-bottom: 10px;
    display: block;
}
.gp-empty p { margin: 0 0 12px; font-size: 0.85rem; }
.gp-empty a { color: var(--primary, #0066cc); font-weight: 700; text-decoration: none; }

/* ================================================================
 * DARK MODE
 * ================================================================ */
[data-theme="dark"] .gp-hero,
[data-theme="dark"] .gp-card,
[data-theme="dark"] .gp-empty {
    background: var(--surface, #1e293b);
    border-color: var(--border, #334155);
}
[data-theme="dark"] .gp-filters {
    background: var(--bg-main, #0f172a);
    border-color: var(--border, #334155);
}
[data-theme="dark"] .gp-pill {
    background: var(--surface, #1e293b);
    border-color: var(--border, #334155);
    color: var(--text-main, #f8fafc);
}
[data-theme="dark"] .gp-hero__title,
[data-theme="dark"] .gp-card__title,
[data-theme="dark"] .gp-section__title {
    color: var(--text-main, #f8fafc);
}
[data-theme="dark"] .gp-card__time {
    background: rgba(15,23,42,.9);
    color: var(--text-main, #f8fafc);
}

/* ================================================================
 * REDUCED MOTION
 * ================================================================ */
@media (prefers-reduced-motion: reduce) {
    .gp-card,
    .gp-card__cover img,
    .gp-pill,
    .gp-card__cta i { transition: none; }
    .gp-card:hover { transform: none; }
    .gp-card:hover .gp-card__cover img { transform: none; }
}

/* ================================================================
 * SUPPRESSION TOTALE DES MODALES PARTAGÉES SUR CETTE PAGE
 * ─────────────────────────────────────────────────────────────────
 * guides.php n'utilise AUCUNE promo-modal — les guides sont de
 * simples liens vers guide-details.php. Toute modale ouverte est
 * un artefact de script.js depuis une page précédente.
 *
 * Double sécurité : CSS (immédiat) + JS (guides.js, tri-couche).
 * ================================================================ */

/* Niveau 1 — masquer via display, avant toute classe is-open */
#signupModal,
#thanksModal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Niveau 2 — même si is-open est ajouté par script.js */
#signupModal.is-open,
#thanksModal.is-open {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Niveau 3 — ciblage générique par classe */
.promo-modal {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
