/* =====================================================================
   Page de sous-rubrique 2026 — articles/sous-rubrique.php (préfixe sr26-)
   Même vocabulaire que rubrique-2026.css. Les cartes produit viennent des includes existants
   (article-sous-rubrique.php, i-sr-tringles-encart.php…) : on ne fait que les mettre en forme ici,
   en neutralisant les anciennes règles de base.css / rd.css (.produit-item, .produits-wrap-rubrique).
   ===================================================================== */
main.sr26-page {
    --sr-orange: #c8641e; --sr-orange-d: #a9500f; --sr-rouge: #bd2425;
    --sr-txt: #3d3d3d; --sr-txt-l: #7a7268; --sr-ligne: #e3dccf; --sr-creme: #faf8f4; --sr-sable: #f1ebe2;
    color: var(--sr-txt); font-family: 'Poppins', 'Urbanist', Arial, sans-serif; font-size: 15px; line-height: 1.55; text-align: left;
}
main.sr26-page * { box-sizing: border-box; }
main.sr26-page { overflow-x: hidden; overflow-x: clip; }
main.sr26-page [hidden] { display: none !important; }
main.sr26-page section#contenu { padding: 10px 30px 40px; max-width: 1200px; margin: 0 auto; background: none; }

/* En-tête */
.sr26-hero { padding: 4px 0 18px; }
.sr26-hero-photo { background-size: cover; background-position: center; border-radius: 14px; padding: 28px 30px; margin-bottom: 20px; position: relative; overflow: hidden; }
.sr26-hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.93) 0%, rgba(255,255,255,.78) 55%, rgba(255,255,255,.2) 100%); }
.sr26-hero-photo > * { position: relative; }
.sr26-ariane { font-size: 13px; color: var(--sr-txt-l); margin: 0 0 8px; }
.sr26-ariane a { color: var(--sr-txt-l); text-decoration: none; }
.sr26-ariane a:hover { color: var(--sr-orange); }
main.sr26-page h1 { font-size: 32px; font-weight: 600; text-transform: none; margin: 4px 0 4px; padding: 0; left: auto; line-height: 1.2; text-align: left; color: var(--sr-txt); }
.sr26-compte { margin: 0; font-size: 14px; color: var(--sr-txt-l); }

/* Accès rapide aux catégories */
.sr26-choix { background: var(--sr-creme); border: 1px solid var(--sr-ligne); border-radius: 12px; padding: 14px 16px; margin: 0 0 24px; }
.sr26-choix-titre { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sr-orange-d); margin-bottom: 10px; }
.sr26-choix div { display: flex; flex-wrap: wrap; gap: 8px; }
.sr26-choix a { display: inline-block; background: #fff; border: 1px solid var(--sr-ligne); border-radius: 99px; padding: 6px 14px; font-size: 14px; color: var(--sr-txt); text-decoration: none; transition: border-color .15s, color .15s; }
.sr26-choix a:hover { border-color: var(--sr-orange); color: var(--sr-orange-d); }

/* Textes de la base */
.sr26-texte { margin: 0 0 24px; color: #4a443c; text-align: justify; }
.sr26-texte p { margin: 0 0 12px; }
.sr26-texte a { color: var(--sr-orange-d); }
.sr26-texte img { max-width: 100%; height: auto; border-radius: 10px; }
.sr26-texte table { max-width: 100%; margin: 0 auto; }
.sr26-texte table a img { transition: transform .2s, box-shadow .2s; }
.sr26-texte table a:hover img { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.sr26-texte h2, .sr26-texte h3 { text-transform: none; text-align: left; color: var(--sr-txt); font-weight: 600; }
.sr26-ai { border-top: 1px solid var(--sr-ligne); padding-top: 20px; }

/* Galerie de la SR (global/includes/sous-rubrique/images.php) */
.sr26-galerie:empty { display: none; }
main.sr26-page .srub_photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
main.sr26-page .srub_photos a { display: block; width: 110px; height: 110px; border: 1px solid var(--sr-ligne); border-radius: 10px; overflow: hidden; background: #fff; }
main.sr26-page .srub_photos img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cartes produit (types 0 et 1 : .produit-item) ---------- */
main.sr26-page .sr26-grille { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin: 0 0 30px; justify-content: stretch; }
main.sr26-page .sr26-grille-large { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
main.sr26-page .sr26-grille > .produit-item { width: auto !important; min-width: 0 !important; max-width: none !important; margin: 0 !important; padding: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--sr-ligne); border-radius: 12px; box-shadow: none; text-align: left; position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; }
main.sr26-page .sr26-grille > .produit-item:hover { border-color: var(--sr-orange); box-shadow: 0 10px 26px rgba(60,40,10,.10); transform: translateY(-2px); }
main.sr26-page .produit-item > a { display: flex; flex-direction: column; height: 100%; padding: 0 0 14px; text-decoration: none; color: var(--sr-txt); }
main.sr26-page .produit-item h3 { order: 2; font-size: 15px; font-weight: 600; line-height: 1.35; text-transform: none; margin: 12px 14px 4px; color: var(--sr-txt); text-align: left; }
main.sr26-page .produit-item h4 { order: 3; font-size: 13px; font-weight: 400; color: var(--sr-txt-l); margin: 0 14px 4px; text-transform: none; text-align: left; }
main.sr26-page .produit-item a:hover h3 { color: var(--sr-orange-d); }
main.sr26-page .produit-item > a > div { order: 1; width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0; background: var(--sr-creme); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px 12px 0 0; }
main.sr26-page .produit-item > a > div img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
main.sr26-page .produit-item > a > br { display: none; }
main.sr26-page .produit-item .prix { order: 4; margin: 4px 14px 2px; font-size: 16px; font-weight: 700; color: var(--sr-txt); }
main.sr26-page .produit-item p:not(.prix) { order: 5; margin: 2px 14px 0; font-size: 13px; color: var(--sr-txt-l); line-height: 1.4; }
main.sr26-page .produit-item a:hover p { color: var(--sr-txt-l); }
main.sr26-page .produit-item .bouton { order: 6; margin: auto 14px 0; padding: 10px 0 0; background: none; border: 0; border-radius: 0; color: var(--sr-orange-d); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; text-transform: none; box-shadow: none; cursor: pointer; }
main.sr26-page .produit-item .bouton::after { content: " →"; }
main.sr26-page .produit-item .action { position: absolute; left: 10px; top: 10px; width: auto; padding: 3px 10px; border-radius: 99px; background: var(--sr-rouge); color: #fff; font-size: 12px; font-weight: 600; z-index: 1; }

/* ---------- Cartes produit en tableau (i-sr-tringles-encart.php : types 2 et 3, encarts, projectiles) ---------- */
.sr26-flux { margin: 0 0 24px; }
.sr26-flux > br { display: none; }
/* titre de catégorie : <div style="background-color:#e8eae8"><h3><strong><u>…</u></strong></h3><a>(pour plus de détails…)</a></div> */
.sr26-flux div[style*="e8eae8"] { background: none !important; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 26px 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--sr-ligne); }
.sr26-flux div[style*="e8eae8"] h3 { margin: 0; padding: 0; font-size: 20px; font-weight: 600; text-transform: none; text-align: left; color: var(--sr-txt); }
.sr26-flux div[style*="e8eae8"] u, .sr26-flux div[style*="e8eae8"] strong { text-decoration: none; font-weight: 600; }
.sr26-flux div[style*="e8eae8"] > a { font-size: 13px; color: var(--sr-orange-d); }
.sr26-flux > strong { display: block; font-weight: 400; color: #4a443c; margin: 0 0 12px; }
/* carte */
.sr26-flux table[style*="inline-block"] { display: inline-block !important; width: calc(20% - 12px) !important; min-width: 0 !important; margin: 0 12px 14px 0 !important; vertical-align: top; background: #fff; border: 1px solid var(--sr-ligne) !important; border-radius: 12px; overflow: hidden; border-collapse: separate; transition: border-color .15s, box-shadow .15s; }
.sr26-flux table[style*="inline-block"]:hover { border-color: var(--sr-orange) !important; box-shadow: 0 10px 26px rgba(60,40,10,.10); }
.sr26-flux table[style*="inline-block"] tbody, .sr26-flux table[style*="inline-block"] tr, .sr26-flux table[style*="inline-block"] td { display: block; width: 100%; }
.sr26-flux table[style*="inline-block"] td { padding: 0 12px; text-align: left; height: auto !important; }
.sr26-flux table[style*="inline-block"] td hr { display: none; }
.sr26-flux table[style*="inline-block"] tr:nth-child(1) td { order: 2; padding-top: 10px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.sr26-flux table[style*="inline-block"] tbody { display: flex; flex-direction: column; }
.sr26-flux table[style*="inline-block"] tr:nth-child(1) { order: 2; }
.sr26-flux table[style*="inline-block"] tr:nth-child(2) { order: 1; }
.sr26-flux table[style*="inline-block"] tr:nth-child(3) { order: 3; }
.sr26-flux table[style*="inline-block"] tr:nth-child(n+4) { order: 4; }
.sr26-flux table[style*="inline-block"] tr:nth-child(2) td { padding: 0; background: #fff; }
.sr26-flux table[style*="inline-block"] tr:nth-child(2) a { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #fff; }
.sr26-flux table[style*="inline-block"] tr:nth-child(2) img { width: 100%; height: 100% !important; object-fit: contain; }
.sr26-flux table[style*="inline-block"] h5 { margin: 4px 0 12px; font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--sr-txt-l); text-transform: none; text-align: left; }
.sr26-flux table[style*="inline-block"] strike { color: var(--sr-txt-l); }
/* le prix « à partir de … € » et le texte d'usage sont dans le même <h5> : le prix est la première ligne */
.sr26-flux table[style*="inline-block"] h5::first-line { font-size: 14px; font-weight: 700; color: var(--sr-txt); }
.sr26-flux table[style*="inline-block"] form { margin: 0 0 6px; }
.sr26-flux table.sr26-carte-lien { cursor: pointer; }

/* Vidéos et image globale */
.sr26-medias { text-align: center; margin: 0 0 24px; }
.sr26-medias hr { display: none; }
.sr26-medias h3 { font-size: 20px; font-weight: 600; text-transform: none; margin: 10px 0 12px; color: var(--sr-txt); }
.sr26-medias iframe { width: 100%; max-width: 720px; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; border: 0; }
.sr26-medias img { max-width: 100%; height: auto; border-radius: 12px; }

/* Responsive */
@media (max-width: 1100px) {
    .sr26-flux table[style*="inline-block"] { width: calc(25% - 12px) !important; }
}
@media (max-width: 900px) {
    main.sr26-page section#contenu { padding: 10px 16px 30px; }
    main.sr26-page h1 { font-size: 26px; }
    .sr26-hero-photo { padding: 20px 18px; }
    main.sr26-page .sr26-grille, main.sr26-page .sr26-grille-large { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sr26-flux table[style*="inline-block"] { width: calc(33.333% - 10px) !important; margin: 0 10px 12px 0 !important; }
}
@media (max-width: 600px) {
    .sr26-flux table[style*="inline-block"] { width: calc(50% - 8px) !important; margin: 0 8px 10px 0 !important; }
    main.sr26-page .produit-item h3 { font-size: 14px; margin: 10px 10px 4px; }
    main.sr26-page .produit-item .prix, main.sr26-page .produit-item p:not(.prix), main.sr26-page .produit-item .bouton, main.sr26-page .produit-item h4 { margin-left: 10px; margin-right: 10px; }
    .sr26-choix a { font-size: 13px; padding: 5px 12px; }
}

/* Titres jamais justifiés (consigne du 25/09/2026) */
:where(main.sr26-page) :where(h1, h2, h3, h4, h5, h6, .sr26-choix, .produit-item, .sr26-flux table) { text-align: left; }
