/* ==========================================================================
   Pages de catégorie de panne — Cyber Jay 2.0
   Portée : .cjp-* uniquement. Les anciennes règles #top-banner / #issues /
   #solutions de style.css ciblent des descendants qui n'existent plus dans
   ce gabarit, mais on neutralise ce qui pourrait encore mordre.
   ========================================================================== */

.cjp-hero,
.cjp-choices,
.cjp-contacts,
.cjp-edito {
    --cjp-violet: #8f15ff;
    --cjp-violet-deep: #7211cc;
    --cjp-violet-wash: #f4eaff;
    --cjp-ink: #0e0e13;
    --cjp-ink-2: #3a3646;
    --cjp-ink-3: #7d7789;
    --cjp-line: #e6e3ee;
    --cjp-paper: #fff;
    --cjp-wash: #f6f5f9;
}

/* ==========================================================================
   1. Héros
   ========================================================================== */

#top-banner.cjp-hero {
    background: linear-gradient(120deg, #faf7ff, #fff);
    padding: 24px 0 28px;
}

.cjp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
@media (min-width: 768px) {
    .cjp-hero-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; }
}
@media (min-width: 1200px) {
    .cjp-hero-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 44px; }
}

/* Le visuel était en d-none d-md-flex : invisible sous 768 px. Il reste
   affiché, simplement plus petit. */
.cjp-hero-shot { display: flex; justify-content: center; }
.cjp-hero-shot img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}
@media (min-width: 768px)  { .cjp-hero-shot img { max-height: 260px; } }
@media (min-width: 1200px) { .cjp-hero-shot img { max-height: 320px; } }

.cjp-hero .cjp-eyebrow {
    margin: 0 0 6px;
    color: var(--cjp-violet);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}

#top-banner.cjp-hero h1 {
    margin: 0;
    /* style.css impose « h1 { text-align:center; padding:.5rem } » a tous les
       h1 du site : le titre se retrouvait centre pendant que l eyebrow, le
       prix, les boutons et les chips restaient a gauche. */
    text-align: left;
    padding-left: 0;
    padding-right: 0;
    font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.6rem);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--cjp-ink);
    text-wrap: balance;
}

.cjp-hero .cjp-lead {
    margin: 10px 0 0;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--cjp-ink-2);
    max-width: 56ch;
}

.cjp-hero .cjp-meta {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--cjp-ink-2);
}
.cjp-hero .cjp-meta b { color: var(--cjp-violet); font-size: 1.08em; font-weight: 700; }
.cjp-hero .cjp-dot { color: var(--cjp-ink-3); margin: 0 4px; }

.cjp-cta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
#top-banner.cjp-hero .cjp-btn {
    /* #top-banner a impose display:block et margin-top:10px dans style.css */
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .16s, border-color .16s;
}
#top-banner.cjp-hero .cjp-btn-pri { background: var(--cjp-violet); color: #fff; }
#top-banner.cjp-hero .cjp-btn-pri:hover { background: var(--cjp-violet-deep); color: #fff; }
#top-banner.cjp-hero .cjp-btn-sec {
    background: var(--cjp-paper);
    border: 1px solid var(--cjp-line);
    color: var(--cjp-ink);
}
#top-banner.cjp-hero .cjp-btn-sec:hover { border-color: var(--cjp-violet); color: var(--cjp-ink); }

.cjp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.cjp-trust li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid var(--cjp-line);
    border-radius: 999px;
    background: var(--cjp-paper);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cjp-ink-2);
}
.cjp-trust .cjc-i,
.cjp-trust .cjm-i { color: var(--cjp-violet); }

/* ==========================================================================
   2. Grille des modèles
   ========================================================================== */

#issues.cjp-choices,
#modeles.cjp-choices { padding: 30px 0 34px; background: var(--cjp-paper); }

.cjp-choices-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.cjp-choices h2 {
    margin: 0;
    font-size: clamp(1.15rem, 1rem + .55vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--cjp-ink);
}
.cjp-choices .cjp-count { margin: 3px 0 0; font-size: 13.5px; color: var(--cjp-ink-3); }

.cjp-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 260px;
    padding: 10px 13px;
    border: 1px solid var(--cjp-line);
    border-radius: 10px;
    background: var(--cjp-wash);
}
.cjp-filter:focus-within { border-color: var(--cjp-violet); }
.cjp-filter .cjc-i, .cjp-filter .cjm-i { color: var(--cjp-ink-3); }
.cjp-filter input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    font: inherit;
    font-size: 14px;
    color: var(--cjp-ink);
}
.cjp-filter input::-webkit-search-cancel-button { cursor: pointer; }

.cjp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
@media (min-width: 700px)  { .cjp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1000px) { .cjp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

#issues.cjp-choices .cjp-card,
#modeles.cjp-choices .cjp-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--cjp-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--cjp-paper);
    color: var(--cjp-ink);
    text-decoration: none;
    transition: border-color .16s, transform .16s, box-shadow .16s;
}
#issues.cjp-choices .cjp-card:hover,
#modeles.cjp-choices .cjp-card:hover {
    border-color: var(--cjp-violet);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -16px rgba(14, 14, 19, .45);
    color: var(--cjp-ink);
}
@media (prefers-reduced-motion: reduce) {
    #issues.cjp-choices .cjp-card { transition: none; }
    #issues.cjp-choices .cjp-card:hover { transform: none; }
}

.cjp-card-shot {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: linear-gradient(150deg, #efe9fc, #f8f6fd);
    overflow: hidden;
}
.cjp-card-shot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}
.cjp-card-shot .cjm-i,
.cjp-card-shot .cjc-i { width: 30px; height: 30px; color: var(--cjp-violet); }

.cjp-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    padding: 11px 12px 13px;
}
.cjp-card-name { font-size: 13px; font-weight: 500; line-height: 1.32; }
.cjp-card-price {
    margin-top: auto;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--cjp-violet);
    font-variant-numeric: tabular-nums;
}

/* Repli des cartes au-dela du plafond.

   Le masquage est fait par la CSS et non par le JavaScript : la page est
   donc courte des le premier rendu, sans reflow. Sur la page MacBook,
   270 prestations affichees d emblee faisaient 24 353 px.

   Les cartes restent dans le HTML : les liens sont explorables par les
   moteurs et le filtre porte sur l ensemble. */
#issues.cjp-choices .cjp-grid.is-replie .cjp-au-dela,
#modeles.cjp-choices .cjp-grid.is-replie .cjp-au-dela { display: none; }

/* Pendant une recherche, le plafond ne s applique plus : sinon le filtre
   mentirait sur le nombre de resultats. */
#issues.cjp-choices .cjp-grid.is-recherche .cjp-au-dela,
#modeles.cjp-choices .cjp-grid.is-recherche .cjp-au-dela { display: flex; }

/* Le masquage par le filtre l emporte toujours. */
#issues.cjp-choices .cjp-card[hidden],
#modeles.cjp-choices .cjp-card[hidden] { display: none !important; }

.cjp-plus { margin: 18px 0 0; text-align: center; }
.cjp-choices .cjp-plus-btn {
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--cjp-violet-deep);
    background: var(--cjp-paper);
    border: 1px solid var(--cjp-line);
    border-radius: 999px;
    padding: 11px 22px;
    min-height: 46px;
    cursor: pointer;
    transition: border-color .16s, background .16s;
}
.cjp-choices .cjp-plus-btn:hover { border-color: var(--cjp-violet); background: var(--cjp-violet-wash); }

/* Deuxieme grille de la page : on la separe de la premiere. */
#modeles.cjp-choices + #issues.cjp-choices { padding-top: 0; }

.cjp-empty {
    margin: 18px 0 0;
    padding: 16px;
    border: 1px dashed var(--cjp-line);
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--cjp-ink-2);
}
#issues.cjp-choices .cjp-empty a,
#modeles.cjp-choices .cjp-empty a { color: var(--cjp-violet-deep); font-weight: 600; }

/* ==========================================================================
   3. Moyens de contact
   ========================================================================== */

#solutions.cjp-contacts { padding: 26px 0; background: var(--cjp-wash); }

.cjp-contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
@media (min-width: 900px) { .cjp-contacts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }

.cjp-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 1px solid var(--cjp-line);
    border-radius: 12px;
    background: var(--cjp-paper);
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cjp-ink-2);
}
.cjp-contact .cjc-i, .cjp-contact .cjm-i { color: var(--cjp-violet); }
#solutions.cjp-contacts .cjp-contact a { color: var(--cjp-violet-deep); font-weight: 600; text-decoration: none; }
#solutions.cjp-contacts .cjp-contact a:hover { text-decoration: underline; }

/* ==========================================================================
   4. Blocs éditoriaux — contenu ACF inchangé, largeur de lecture bornée
   ========================================================================== */

/* Pas de largeur maximale ici : les blocs ACF (.cj-service, .cj-faq-section)
   portent leur propre mise en page sur deux colonnes. Le cap a 74ch les
   comprimait a 651 px dans un conteneur de 1320, avec 387 px de vide de
   chaque cote. */
.cjp-edito #edito-text { max-width: none; margin: 0; }
.cjp-edito #edito-text img { max-width: 100%; height: auto; }
#edito-grey.cjp-edito { background: var(--cjp-wash); }

/* ==========================================================================
   5. Neutralisation du CSS additionnel du Customizer

   « header nav ul li a » ne touche pas ces sections, mais les anciennes
   règles .issues .box de style.css pourraient encore mordre si un bloc
   éditorial contient ce balisage.
   ========================================================================== */

.cjp-choices .box { all: unset; }
