/*
Theme Name: Qualitem
Theme URI: https://github.com/Mathilde1420
Author: Qualitem-Consulting
Description: Thème léger pour Qualitem-Consulting : études, conseil, formation et gestion immobilière. Aucune dépendance externe.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: qualitem
*/

:root {
	--blue: #0f479e;
	--blue-dark: #0a347a;
	--red: #e1141b;
	--red-dark: #b80f14;
	--ink: #1f2933;
	--muted: #5f6b7a;
	--line: #e3e7ee;
	--soft: #f3f5f9;
	--white: #fff;
	--radius: 10px;
	--shadow: 0 6px 24px rgba(10, 52, 122, .08);
	--wrap: 1180px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--blue-dark); margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: var(--white); padding: .6rem 1rem; z-index: 1000; }

/* Boutons et badges */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.4rem; border-radius: 999px; font-weight: 600; border: 2px solid transparent; transition: .2s; cursor: pointer; font-size: 1rem; line-height: 1.2; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); color: var(--white); }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-dark); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--blue); }
.btn--outline { border-color: var(--blue); color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); }
.btn--wa { background: #1fa855; color: var(--white); }
.btn--wa:hover { background: #178a45; color: var(--white); }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--white); }
.badge--red { background: var(--red); }
.badge--blue { background: var(--blue); }
.badge--dark { background: var(--ink); }

/* Barre supérieure + en-tête */
.topbar { background: var(--blue-dark); color: #dfe6f5; font-size: .88rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: .4rem; flex-wrap: wrap; }
.topbar a { color: var(--white); }
.site-header { background: var(--white); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--blue); }
.brand img { width: 56px; height: 56px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 900; font-size: 1.15rem; letter-spacing: -.01em; color: var(--blue); }
.brand__tag { display: inline-block; margin-top: .25rem; padding: .1rem .5rem; background: var(--red); color: var(--white); font-size: .72rem; font-weight: 700; font-style: italic; border-radius: 3px; align-self: flex-start; }
.custom-logo { max-height: 64px; width: auto; }
@media (max-width: 420px) { .brand__name { font-size: .95rem; } .brand img { width: 44px; height: 44px; } }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--blue); margin: 5px 0; border-radius: 2px; }
.main-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; align-items: center; }
.main-nav a { display: block; padding: .5rem .8rem; color: var(--ink); font-weight: 600; border-radius: 6px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-ancestor > a { color: var(--red); }
.main-nav .sub-menu { list-style: none; padding: .4rem; margin: 0; }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 3px solid var(--red); box-shadow: var(--shadow); }
	.main-nav.is-open { display: block; }
	.main-nav .menu { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; }
	.main-nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--line); }
}

/* Héros d'accueil */
.hero { position: relative; color: var(--white); background: linear-gradient(120deg, var(--blue-dark) 0%, var(--blue) 60%, #1b5cc4 100%); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 40px solid rgba(225, 20, 27, .6); }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(3.5rem, 9vw, 7rem); max-width: var(--wrap); }
.hero h1 { color: var(--white); max-width: 780px; }
.hero p { font-size: 1.15rem; max-width: 680px; color: #e5ebf8; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--soft { background: var(--soft); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section__head h2 { margin: 0; position: relative; padding-bottom: .5rem; }
.section__head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; background: var(--red); border-radius: 2px; }
.section__head p { margin: .6rem 0 0; color: var(--muted); }

/* Grilles et cartes */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media .badges { position: absolute; top: .75rem; left: .75rem; display: flex; gap: .35rem; }
.card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--blue); opacity: .35; font-weight: 700; font-size: 2.4rem; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__title { font-size: 1.1rem; margin: 0; }
.card__title a { color: var(--blue-dark); }
.card__title a:hover { color: var(--red); }
.card__meta { font-size: .85rem; color: var(--muted); }
.card__price { font-weight: 800; color: var(--red); font-size: 1.15rem; }
.card__excerpt { color: var(--muted); font-size: .95rem; margin: 0; }
.card__specs { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .6rem; border-top: 1px solid var(--line); }

/* Services */
.service { background: var(--white); border-radius: var(--radius); padding: 1.6rem; border-top: 4px solid var(--blue); box-shadow: var(--shadow); }
.service:nth-child(even) { border-top-color: var(--red); }
.service__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(15, 71, 158, .08); color: var(--blue); margin-bottom: 1rem; }
.service:nth-child(even) .service__icon { background: rgba(225, 20, 27, .08); color: var(--red); }
.service h3 { margin-bottom: .4rem; }
.service p { color: var(--muted); margin: 0; font-size: .97rem; }
.service-detail { display: grid; grid-template-columns: 64px 1fr; gap: 1.2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.service-detail:last-child { border-bottom: 0; }
.service-detail .service__icon { width: 64px; height: 64px; }
.service-detail ul { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--muted); }

/* Bandeau d'appel */
.cta { background: var(--red); color: var(--white); }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.4rem; }
.cta h2 { color: var(--white); margin: 0; }
.cta p { margin: .3rem 0 0; color: #ffe3e1; }

/* En-tête de page */
.page-hero { background: var(--blue); color: var(--white); padding-block: 2.6rem; border-bottom: 4px solid var(--red); }
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero p { margin: .5rem 0 0; color: #dfe6f5; }
.breadcrumb { font-size: .85rem; color: #c8d3ee; margin-bottom: .4rem; }
.breadcrumb a { color: var(--white); }

/* Contenu */
.content { padding-block: 3rem; }
.entry { max-width: 820px; }
.entry--wide { max-width: none; }
.entry > * + * { margin-top: 1rem; }
.entry h2, .entry h3 { margin-top: 2rem; }
.entry ul, .entry ol { padding-left: 1.3rem; }
.entry blockquote { border-left: 4px solid var(--red); margin: 1.5rem 0; padding: .5rem 1.2rem; background: var(--soft); }
.entry .wp-block-file { background: var(--soft); padding: 1rem; border-radius: var(--radius); }
.entry .wp-block-file__button { background: var(--red); border-radius: 999px; }
.entry .wp-block-image img, .entry .wp-block-gallery img { border-radius: 8px; }
.entry-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.featured { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }

/* Fiche d'un bien */
.bien-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
.bien-box { position: sticky; top: 100px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.bien-box .card__price { font-size: 1.6rem; display: block; margin: .4rem 0 1rem; }
.bien-specs { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.bien-specs li { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.bien-specs li span:first-child { color: var(--muted); }
.bien-box .btn { width: 100%; justify-content: center; margin-top: .6rem; }
@media (max-width: 900px) { .bien-layout { grid-template-columns: 1fr; } .bien-box { position: static; order: -1; } }

/* Filtres */
.filters { display: flex; gap: .8rem; flex-wrap: wrap; align-items: end; background: var(--white); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 2rem; }
.filters label { display: flex; flex-direction: column; font-size: .82rem; font-weight: 600; color: var(--muted); gap: .25rem; flex: 1 1 180px; }
.filters select, .filters input { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .95rem; background: var(--white); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.chips a { padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; background: var(--white); }
.chips a.is-active, .chips a:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.contact-item { background: var(--soft); border-radius: var(--radius); padding: 1.5rem; }
.contact-item h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--red); }
.contact-item p { margin: 0; font-size: 1.1rem; }
.map { margin-top: 2rem; border-radius: var(--radius); overflow: hidden; }
.map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* Pagination */
.pagination, .nav-links { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.page-numbers { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.page-numbers.current, .page-numbers:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }
.empty { padding: 2.5rem; text-align: center; background: var(--soft); border-radius: var(--radius); color: var(--muted); }

/* Pied de page */
.site-footer { background: #082a62; color: #c5cfe6; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 3rem; }
.site-footer h3 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: #ff8a84; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-logo { background: var(--white); display: inline-block; padding: .5rem .8rem; border-radius: 8px; margin-bottom: 1rem; }
.footer-logo .brand img { width: 44px; height: 44px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.footer-bottom .wrap { display: flex; justify-content: space-between; padding-block: 1rem; grid-template-columns: none; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 800px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Bouton WhatsApp flottant */
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #1fa855; color: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 60; }
.wa-float:hover { color: var(--white); background: #178a45; }

/* Alignements de l'éditeur */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.aligncenter { margin-inline: auto; }
.has-bleu-color { color: var(--blue); } .has-bleu-background-color { background-color: var(--blue); }
.has-rouge-color { color: var(--red); } .has-rouge-background-color { background-color: var(--red); }
.has-gris-color { color: var(--ink); } .has-gris-background-color { background-color: var(--ink); }
.has-gris-clair-background-color { background-color: var(--soft); }
.has-blanc-color { color: #fff; } .has-blanc-background-color { background-color: #fff; }
