/* =====================================================================
   A.B. Diagnostics — theme.css : habillage des MODULES du www
   ---------------------------------------------------------------------
   Les feuilles de modules (actualites, avis, galerie, projets, forms,
   devis-guide...) sont chargées APRÈS ce fichier et posent leurs variables
   sur leur propre racine. On les surcharge donc avec une spécificité plus
   forte (html body ...), sans !important et sans toucher aux fichiers
   mutualisés. Les règles mobiles de ces surcharges sont en fin de fichier
   (une media query dans responsive.css, chargé avant, perdrait).
   ===================================================================== */

/* ------------------------------------------------ Variables des modules */
html body :is(.blog, [data-page-type="article"]) {
    --blog-accent: var(--c-orange);
    --blog-ink: var(--c-cream);
    --blog-body: var(--c-body);
    --blog-muted: var(--c-sand);
    --blog-soft: var(--c-slate);
    --blog-card: var(--c-slate);
    --blog-line: rgba(181, 166, 144, .35);
    --blog-radius: 0px;
    --blog-font: var(--font);
    --blog-maxw: 100%;
    --blog-read: 867px;
    --blog-gap: 32px;
}
html body .reviews {
    --rev-accent: var(--c-orange);
    --rev-ink: var(--c-cream);
    --rev-body: var(--c-body);
    --rev-muted: var(--c-sand);
    --rev-soft: var(--c-dark);
    --rev-card: var(--c-slate);
    --rev-star: var(--c-orange);
    --rev-star-off: rgba(181, 166, 144, .45);
    --rev-radius: 0px;
    --rev-shadow: none;
    --rev-shadow-hover: var(--shadow);
    --rev-font: var(--font);
    --rev-maxw: var(--container);
}
html body .rw:not(.testimonials__rw) {
    --rw-cols: 3;
    --rw-gap: 16px;
    --rw-card-bg: var(--c-dark);
    --rw-card-radius: 0px;
    --rw-card-pad: 32px;
    --rw-text: var(--c-body);
    --rw-ink: var(--c-cream);
    --rw-muted: var(--c-sand);
    --rw-star: var(--c-orange);
    --rw-star-off: rgba(181, 166, 144, .45);
    --rw-accent: var(--c-orange);
    --rw-shadow: none;
    --rw-maxw: var(--container);
}
html body :is(.devis-form, .contact-form) {
    --lf-accent: var(--c-orange);
    --lf-accent-contrast: var(--c-dark);
    --lf-text: var(--c-cream);
    --lf-muted: var(--c-sand);
    --lf-field-bg: transparent;
    --lf-field-border: rgba(243, 237, 228, .55);
    --lf-field-border-hover: var(--c-sand);
    --lf-ring: rgba(235, 105, 7, .22);
    --lf-error: #ff8a5c;
    --lf-ok: var(--c-sand);
    --lf-radius: 0px;
    --lf-gap: 22px;
}
html body :is(.galerie, .reals) {
    --gal-maxw: var(--container);
    --gal-gap: 16px;
    --gal-radius: 0px;
    --gal-ink: var(--c-cream);
    --gal-muted: var(--c-sand);
    --gal-accent: var(--c-orange);
    --gal-soft: var(--c-slate);
    --gal-overlay: rgba(20, 19, 27, .86);
    --gal-ease: var(--ease-out);
}
html body :is(.projs, .proj-detail) {
    --pj-accent: var(--c-orange);
    --pj-text: var(--c-cream);
    --pj-muted: var(--c-sand);
    --pj-card-bg: var(--c-slate);
    --pj-shadow: none;
    --pj-radius: 0px;
    --pj-gap: 32px;
    max-width: var(--container);
}
html body .secteur { --se-soft: var(--c-slate); --se-line: rgba(181, 166, 144, .35); }
html body :is(.home-secteurs, .service-mesh) { --ml-soft: var(--c-slate); --ml-line: rgba(181, 166, 144, .35); }
html body .dg { --dg-radius: 0px; --dg-radius-pill: 0px; --dg-card: var(--c-slate); --dg-card-hover: var(--c-slate-deep); --dg-track: rgba(181, 166, 144, .3); }
html body .ck { --ck-accent: var(--c-orange); --ck-ink: var(--c-dark); --ck-surf: var(--c-slate); }

/* ------------------------------------------------ Titres des modules : police + graisse maquette */
html body :is(.galerie-title, .projs-title, .proj-detail-title, .secteur-head h1, .blog-feature-title, .review-form-title, .rw-title) {
    font-family: var(--font-title); font-weight: 600; letter-spacing: 0; color: var(--c-cream);
}
html body :is(.blog-card-title, .reviews-main-title, .real-title) { font-family: var(--font-title); font-weight: 500; letter-spacing: 0; }
html body .rw-title { font-size: 40px; line-height: 1.2; }

/* ------------------------------------------------ Boutons d'envoi = CTA pleins de la maquette */
html body :is(.devis-form .btn-devis, .contact-form .btn-contact, .reviews .review-submit, .dg .dg-submit) {
    min-height: 50px;
    padding: 12px 28px;
    border: 1px solid var(--c-slate);
    border-radius: 0;
    background: var(--c-slate);
    color: var(--c-orange);
    font: 600 16px/1.2 var(--font);
    box-shadow: none;
    filter: none;
    transition: background-color .6s var(--ease-out), border-color .6s var(--ease-out), color .5s var(--ease-out);
}
html body :is(.devis-form .btn-devis, .contact-form .btn-contact, .reviews .review-submit, .dg .dg-submit):hover {
    background: var(--c-slate-deep); border-color: var(--c-slate-deep); color: var(--c-orange); filter: none; box-shadow: none;
}
html body .reviews .review-google-cta { width: auto; }

/* Champs génériques (devis simple, paiement) : soulignés comme la maquette */
html body :is(.devis-form, .contact-form) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], textarea, select) {
    border-width: 0 0 1px;
    border-radius: 0;
    padding-inline: 0;
    background-color: transparent;
}
html body :is(.devis-form, .contact-form) :is(input, textarea, select):focus { box-shadow: none; border-color: var(--c-orange); }
html body :is(.devis-form, .contact-form) select option { background: var(--c-dark); color: var(--c-cream); }
html body :is(.devis-form, .contact-form) label { font-weight: 400; font-size: 12px; line-height: 18px; text-transform: uppercase; color: var(--c-cream); }
html body :is(.devis-form, .contact-form) .form-consent label { font-size: 15px; line-height: 1.6; text-transform: none; color: var(--c-body); }
html body :is(.devis-form, .contact-form) .form-consent a { color: var(--c-orange); text-decoration: underline; text-underline-offset: 3px; }
html body :is(.devis-form, .contact-form) .req { color: var(--c-orange); }

/* Parcours guidé : boutons de navigation = CTA de la maquette */
html body .dg .dg-btn { border-radius: 0; box-shadow: none; font: 600 16px/1.2 var(--font); transition: background-color .6s var(--ease-out), border-color .6s var(--ease-out), color .5s var(--ease-out); }
html body .dg :is(.dg-next, .dg-submit) { background: var(--c-slate); color: var(--c-orange); border: 1px solid var(--c-slate); }
html body .dg :is(.dg-next, .dg-submit):hover { background: var(--c-slate-deep); border-color: var(--c-slate-deep); color: var(--c-orange); box-shadow: none; transform: none; filter: none; }
html body .dg .dg-prev { background: transparent; color: var(--c-cream); border: 1px solid var(--c-sand); }
html body .dg .dg-prev:hover { background: var(--c-slate-deep); border-color: var(--c-slate-deep); color: var(--c-cream); }
html body .dg .dg-step-title { font-weight: 500; font-size: 24px; }

/* Formulaires du moteur dans l'article : colonne de lecture centrée */
html body main > article:has(> :is(.contact-form, .devis-form, .dg)) { max-width: calc(860px + 2 * var(--gutter)); }

/* ------------------------------------------------ Filtres, catégories, pagination = boutons contour */
html body :is(.blog-cats a, .reals-filter, .projs-filter, .blog-pager-num, .blog-pager-arrow) {
    border: 1px solid var(--c-sand);
    border-radius: 0;
    background: transparent;
    color: var(--c-cream);
    font-weight: 600;
    transition: background-color .6s var(--ease-out), border-color .6s var(--ease-out), color .5s var(--ease-out);
}
html body :is(.blog-cats a, .reals-filter, .projs-filter) { padding: 12px 22px; font-size: 15px; }
html body :is(.blog-cats a, .reals-filter, .projs-filter, .blog-pager-num, .blog-pager-arrow):hover {
    background: var(--c-slate-deep); border-color: var(--c-slate-deep); color: var(--c-orange);
}
html body :is(.blog-cats a[aria-current="page"], .reals-filter.is-active, .projs-filter.is-active, .blog-pager-num.is-current) {
    background: var(--c-slate); border-color: var(--c-slate); color: var(--c-orange);
}

/* ------------------------------------------------ Actualités (« à la une » = cartes du hero d'accueil) */
html body .blog-feature { position: relative; border-radius: 0; background: var(--c-slate); }
html body .blog-feature-media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(32, 31, 42, .9) 0%, rgba(32, 31, 42, 0) 100%);
    opacity: .55; transition: opacity 1s var(--ease-out);
}
html body .blog-feature:hover .blog-feature-media::after { opacity: .2; }
html body .blog-feature-media img, html body .blog-card-media img { transition: transform 1.4s var(--ease-out); }
html body .blog-feature-flag { border-radius: 0; background: var(--c-dark); color: var(--c-orange); font: 500 13px/21px var(--font); letter-spacing: 0; text-transform: none; padding: 8px 22px; }
html body .blog-feature-title { font-size: 36px; line-height: 1.2; }
html body .blog-feature:hover .blog-feature-title, html body .blog-card:hover .blog-card-title a { color: var(--c-orange); }
html body .blog-card { border-radius: 0; background: var(--c-slate); transition: box-shadow .8s var(--ease-out), transform .8s var(--ease-out); }
html body .blog-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
html body .blog-card-title { font-size: 24px; line-height: 1.2; }
html body .blog-card-title a:link, html body .blog-card-title a:visited { color: var(--c-cream); }
html body .blog-eyebrow { position: relative; padding-left: 14px; color: var(--c-cream); font-weight: 400; font-size: 13px; letter-spacing: .04em; }
html body .blog-eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--c-orange); }
html body :is(.blog-more, .post-back, .post-cat) { color: var(--c-orange); }
html body :is(.blog-more, .post-back) svg { transition: transform .7s var(--ease-out); }
html body :is(.blog-card, .blog-feature):hover .blog-more svg, html body .post-back:hover svg { transform: translateX(4px); }
html body .post-back:hover svg { transform: translateX(-4px); }
html body[data-page-type="article"] main { max-width: none; padding: 0; }
html body[data-page-type="article"] main > article { max-width: calc(var(--blog-read) + 2 * var(--gutter)); }
html body[data-page-type="article"] main > article > h1 { text-align: left; font-size: 44px; font-weight: 600; letter-spacing: 0; color: var(--c-cream); }
html body .post-cover img { border-radius: 0; }
html body .post-body { font-size: 17px; line-height: 1.7; }
html body .post-body h2 { font-weight: 600; letter-spacing: 0; font-size: 32px; }
html body .post-body h3 { font-weight: 500; }
html body .post-body blockquote { border-left-color: var(--c-orange); font-family: var(--font-accent); font-size: 26px; color: var(--c-cream); }
html body .post-body img { border-radius: 0; }

/* ------------------------------------------------ Avis */
html body .reviews-head { background: var(--c-slate); border-radius: 0; }
html body .reviews-score-big { font-family: var(--font-accent); font-style: italic; font-weight: 400; color: var(--c-orange); }
html body .reviews-bar-track { background: rgba(243, 237, 228, .12); border-radius: 0; }
html body .reviews-bar-fill { border-radius: 0; }
html body .reviews-flash { background: rgba(181, 166, 144, .14); color: var(--c-cream); border-left: 3px solid var(--c-sand); border-radius: 0; }
html body .review-form-wrap { border-radius: 0; box-shadow: none; top: calc(var(--header-h) + 24px); }
html body .review-form input[type="text"], html body .review-form textarea { border-radius: 0; border-bottom: 1px solid rgba(243, 237, 228, .55); background: transparent; padding-inline: 0; }
html body .review-form input[type="text"]:focus, html body .review-form textarea:focus { box-shadow: none; border-bottom-color: var(--c-orange); }
html body .review { border-radius: 0; transition: box-shadow .8s var(--ease-out), transform .8s var(--ease-out); }
html body .review:hover { transform: translateY(-4px); }
html body :is(.review-avatar, .rw-avatar-txt) { color: var(--c-orange); background: var(--c-dark); }
html body .reviews .form-error { color: #ff8a5c; }

/* Bandeau d'avis (widget [data-rw]) : couleurs alternées ardoise / nuit */
html body .rw-band .rw-card { transition: transform .8s var(--ease-out), box-shadow .8s var(--ease-out); }
html body .rw-band .rw-slide:nth-child(even) .rw-card { background: var(--c-slate-deep); }
html body .rw-band .rw-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
html body .rw-arrow { border-radius: 0; border: 1px solid var(--c-sand); background: transparent; color: var(--c-cream); box-shadow: none; transition: background-color .6s var(--ease-out), color .5s var(--ease-out), border-color .6s var(--ease-out); }
html body .rw-arrow:hover { background: var(--c-slate-deep); border-color: var(--c-slate-deep); color: var(--c-orange); transform: none; }
html body .rw-dot { border-radius: 0; height: 3px; width: 16px; }
html body .rw-dot.on { border-radius: 0; width: 32px; }
html body a.rw-agg:hover { opacity: 1; color: var(--c-orange); }

/* ------------------------------------------------ Réalisations / galerie / projets */
html body :is(.real-card, .proj-card) { border-radius: 0; transition: transform .8s var(--ease-out), box-shadow .8s var(--ease-out); }
html body :is(.real-card, .proj-card):hover { transform: translateY(-4px); box-shadow: var(--shadow); }
html body .real-cover img, html body .galerie-open img { transition: transform 1.4s var(--ease-out); }
html body .real-cat, html body .galerie-cat { border-radius: 0; color: var(--c-orange); }
html body .galerie-cat { background: var(--c-slate); }
html body .real-count { border-radius: 0; background: rgba(32, 31, 42, .8); }
html body .real-cover-empty { background: linear-gradient(135deg, var(--c-slate), var(--c-slate-deep)); }
html body :is(.glx-btn, .glx-close) { border-radius: 0; background: rgba(32, 31, 42, .7); border: 1px solid var(--c-sand); }
html body :is(.glx-btn, .glx-close):hover { background: var(--c-slate-deep); color: var(--c-orange); }
html body .glx-img { border-radius: 0; }
html body .glx-cap, html body .glx-count { border-radius: 0; }
html body .ba-compare { border-radius: 0; }

/* ------------------------------------------------ Tableau des diagnostics obligatoires (shortcode) */
html body .dg-tbl { max-width: none; }
html body .dg-head { border-radius: 0; background: var(--c-slate); color: var(--c-cream); border-left: 3px solid var(--c-orange); }
html body .dg-head h2 { font-weight: 600; text-transform: none; color: var(--c-cream); }
html body .dg-colhead { border-radius: 0; background: var(--c-dark); color: var(--c-sand); border-bottom: 1px solid var(--c-sand); }
html body .dg-cell { border-radius: 0; background: var(--c-slate); }
html body .dg-icwrap { border-radius: 0; background: var(--c-dark); color: var(--c-orange); }
html body .dg-code { font-weight: 700; }
html body main > article .dg-tbl h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); }

/* ------------------------------------------------ Maillage (secteurs) : pastilles carrées */
html body .home-secteurs-in { border-radius: 0; }
html body :is(.home-secteurs-links a, .secteur-index a, .service-mesh a) { border-radius: 0; }
html body .secteur-index a:hover { background: var(--c-slate-deep); color: var(--c-orange); }

/* ------------------------------------------------ Bandeau cookies : cartes carrées */
html body .ck-box { border-radius: 0; background: var(--c-slate); color: var(--c-cream); }
html body .ck-btn { border-radius: 0; }

/* ------------------------------------------------ Mobile (règles des surcharges ci-dessus) */
@media (max-width: 991.98px) {
    html body .rw:not(.testimonials__rw) { --rw-cols: 2; }
    html body .rw-title { font-size: 32px; }
    html body .blog-feature-title { font-size: 30px; }
}
@media (max-width: 767.98px) {
    html body .rw:not(.testimonials__rw) { --rw-cols: 1; --rw-card-pad: 24px; }
    html body[data-page-type="article"] main > article > h1 { font-size: 32px; }
    html body .blog-feature-title { font-size: 26px; }
    html body .post-body h2 { font-size: 26px; }
}
@media (max-width: 575.98px) {
    html body .rw-title { font-size: 28px; }
    html body :is(.blog-cats a, .reals-filter, .projs-filter) { padding: 10px 16px; font-size: 14px; }
}
