/*
Theme Name: NOVÉA
Theme URI: https://novea-asso.fr
Author: NOVÉA
Description: Thème sur mesure de l'association NOVÉA – des lieux de vie abordables, de qualité et accompagnés. À l'activation, le thème crée automatiquement les pages du site (Accueil, L'association, Nos résidences, Nos engagements, Demander un logement, Élus & partenaires, Mentions légales, Confidentialité), le menu, le logo et l'icône du site.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: novea
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }
img { height: auto; }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--wp--preset--color--coral); outline-offset: 3px; }

/* ---------- Header ---------- */
.novea-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(1,70,102,.08); }
.admin-bar .novea-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .novea-header { top: 46px; } }
.novea-header .wp-block-site-logo img { max-height: 58px; width: auto; }
.novea-header .wp-block-navigation a { font-weight: 500; }
.novea-header .wp-block-navigation .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--coral-dark); }
.novea-header .wp-block-navigation .current-menu-item > a,
.novea-header .wp-block-navigation [aria-current="page"] { color: var(--wp--preset--color--coral-dark); }
.novea-header .is-style-novea-cta .wp-block-navigation-item__content,
.novea-header .novea-nav-cta a { background: var(--wp--preset--color--coral); color: #fff !important; padding: .6em 1.2em; border-radius: 999px; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 2rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1.2rem; font-size: 1.2rem; }

/* ---------- Typo helpers ---------- */
.novea-eyebrow { text-transform: uppercase; letter-spacing: .22em; font-weight: 600; font-size: .78rem !important; color: var(--wp--preset--color--coral-dark); margin-bottom: .6rem !important; }
.has-primary-background-color .novea-eyebrow,
.novea-on-dark .novea-eyebrow { color: var(--wp--preset--color--coral); }
.novea-section-num { color: var(--wp--preset--color--coral); font-weight: 700; }
.novea-rule { width: 64px; height: 4px; background: var(--wp--preset--color--coral); border: 0; margin-left: 0 !important; opacity: 1; }
.has-text-align-center .novea-rule, .novea-rule.aligncenter { margin-left: auto !important; }

/* ---------- Cards ---------- */
.novea-card { background: #fff; border: 1px solid rgba(1,70,102,.10); border-top: 4px solid var(--wp--preset--color--coral); border-radius: 14px; box-shadow: 0 6px 24px rgba(1,70,102,.06); transition: transform .2s ease, box-shadow .2s ease; }
.novea-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(1,70,102,.10); }
.novea-card--teal { border-top-color: var(--wp--preset--color--teal); }
.novea-card--plain { border-top-width: 1px; border-top-color: rgba(1,70,102,.10); }
.wp-block-columns.novea-equal > .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns.novea-equal > .wp-block-column > .wp-block-group { flex: 1; }
.novea-card .novea-tag { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem !important; font-weight: 600; color: var(--wp--preset--color--coral-dark); }
.novea-card h3, .novea-card h4 { margin-top: 0; }

/* Stats */
.novea-stat { border-radius: 14px; padding: 1.6rem 1.5rem; height: 100%; }
.novea-stat .novea-stat__num { font-size: clamp(2rem, 3.6vw, 2.8rem) !important; font-weight: 700; line-height: 1.05; margin: 0; }
.novea-stat .novea-stat__num small, .novea-stat .novea-stat__num .unit { font-size: .5em; font-weight: 500; }
.novea-stat p:last-child { margin-bottom: 0; }

/* Quote callout */
.novea-callout { border-left: 4px solid var(--wp--preset--color--coral); border-radius: 0 14px 14px 0; }
.novea-callout p { margin: 0; }

/* Lists with coral bullets */
.novea-list { list-style: none; padding-left: 0; }
.novea-list li { position: relative; padding-left: 1.4em; margin-bottom: .55em; }
.novea-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5em; height: .5em; border-radius: 50%; background: var(--wp--preset--color--coral); }
.has-primary-background-color .novea-list li::before { background: var(--wp--preset--color--coral); }

/* Steps (3 métiers) */
.novea-step__num { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--wp--preset--color--primary); color: #fff; font-weight: 700; margin-bottom: .8rem !important; }

/* Brand logo cards */
.novea-brand-logo img { max-height: 92px; width: auto !important; object-fit: contain; }
.novea-logo-card { background: #fff; border-radius: 14px; padding: 1rem 1.4rem; display: flex; align-items: center; justify-content: center; min-height: 110px; }
.novea-logo-card img { max-height: 78px; width: auto !important; }

/* Media cards */
.novea-media-card .wp-block-media-text__media img { border-radius: 14px 0 0 14px; }
.novea-media-card.has-media-on-the-right .wp-block-media-text__media img { border-radius: 0 14px 14px 0; }
.novea-media-card { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid rgba(1,70,102,.10); box-shadow: 0 6px 24px rgba(1,70,102,.06); }
@media (max-width: 600px) {
	.novea-media-card .wp-block-media-text__media img,
	.novea-media-card.has-media-on-the-right .wp-block-media-text__media img { border-radius: 14px 14px 0 0; }
}
.novea-for-commune { background: var(--wp--preset--color--mist); border-radius: 10px; padding: 1rem 1.2rem; }
.novea-for-commune p { margin: 0; }

/* Rounded images */
.novea-rounded img { border-radius: 14px; }

/* Hero */
.novea-hero { position: relative; overflow: hidden; }
.novea-hero h1 { letter-spacing: -.01em; }
.novea-hero .novea-hero__img img { border-radius: 18px; box-shadow: 0 20px 50px rgba(1,70,102,.15); }
.novea-pillars p { display: flex; align-items: center; gap: .6rem; margin: 0; }
.novea-pillars p::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--wp--preset--color--coral); flex: none; }

/* Page title band */
.novea-page-hero { background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, #035a7f 60%, var(--wp--preset--color--teal) 100%); position: relative; overflow: hidden; }
.novea-page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; border: 22px solid rgba(254,126,109,.55); border-left-color: transparent; border-bottom-color: transparent; transform: rotate(20deg); pointer-events: none; }

/* Table gouvernance */
.novea-table table { border-collapse: collapse; width: 100%; }
.novea-table thead { background: var(--wp--preset--color--primary); color: #fff; }
.novea-table th, .novea-table td { border: 0; border-bottom: 1px solid rgba(1,70,102,.12); padding: .9rem 1rem; text-align: left; vertical-align: top; }
.novea-table td:first-child { font-weight: 600; color: var(--wp--preset--color--primary); white-space: nowrap; }
.novea-table figcaption { font-size: .85rem; }

/* Buttons */
.wp-block-button__link { transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.is-style-outline > .wp-block-button__link { border-width: 2px; }

/* Footer */
.novea-footer a { color: inherit; text-decoration: none; }
.novea-footer a:hover { color: var(--wp--preset--color--coral); text-decoration: underline; }
.novea-footer .novea-footer__bar { border-top: 1px solid rgba(255,255,255,.15); }
.novea-footer-accent { height: 8px; background: var(--wp--preset--color--coral); }

/* Sources */
.novea-sources { font-size: .78rem !important; color: var(--wp--preset--color--muted); }

/* ---------- Formulaire de contact ---------- */
.novea-form { display: grid; gap: 1rem; }
.novea-form .novea-form__row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .novea-form .novea-form__row { grid-template-columns: 1fr; } }
.novea-form label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .35rem; color: var(--wp--preset--color--primary); }
.novea-form input[type=text], .novea-form input[type=email], .novea-form input[type=tel], .novea-form select, .novea-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: .8rem 1rem; border: 1px solid rgba(1,70,102,.25); border-radius: 10px; background: #fff; color: var(--wp--preset--color--ink);
}
.novea-form input:focus, .novea-form select:focus, .novea-form textarea:focus { border-color: var(--wp--preset--color--teal); outline: 3px solid rgba(41,119,129,.2); outline-offset: 0; }
.novea-form textarea { min-height: 150px; resize: vertical; }
.novea-form .novea-form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--wp--preset--color--muted); }
.novea-form .novea-form__consent input { margin-top: .3rem; }
.novea-form .novea-form__consent label { font-weight: 400; color: inherit; font-size: inherit; }
.novea-form button { justify-self: start; font: inherit; font-weight: 600; background: var(--wp--preset--color--coral); color: #fff; border: 0; border-radius: 999px; padding: .9rem 2rem; cursor: pointer; transition: background-color .2s; }
.novea-form button:hover { background: var(--wp--preset--color--coral-dark); }
.novea-form .novea-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.novea-notice { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1rem; }
.novea-notice--ok { background: #e6f4ee; color: #135c3a; border: 1px solid #b7dfc9; }
.novea-notice--err { background: #fdecea; color: #8a2a1d; border: 1px solid #f5c3bb; }
.novea-req { color: var(--wp--preset--color--coral-dark); }

/* ---------- Animations douces ---------- */
@media (prefers-reduced-motion: no-preference) {
	.novea-reveal { animation: novea-up .7s ease both; }
	@keyframes novea-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .novea-card, .wp-block-button__link { transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.novea-hide-mobile { display: none !important; }
	.novea-hero { padding-top: 2.5rem !important; }
}
.novea-plain-list { list-style: none; padding-left: 0; }
strong, b { font-weight: 600; }
.novea-pillars .wp-block-group.alignwide { justify-content: space-between; }
.novea-tag { text-transform: uppercase; letter-spacing: .08em; font-size: .74rem !important; font-weight: 600; color: var(--wp--preset--color--coral-dark); }
.novea-media-card.is-image-fill-element > .wp-block-media-text__media { position: relative; min-height: 340px; height: 100%; overflow: hidden; }
.novea-media-card.is-image-fill-element > .wp-block-media-text__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.novea-media-card .wp-block-media-text__content { padding: clamp(1.5rem, 3vw, 2.6rem) !important; }
@media (max-width: 600px) { .novea-media-card.is-image-fill-element > .wp-block-media-text__media { min-height: 240px; } }
.novea-logo-card { width: fit-content; }
.wp-block-post-content.alignfull > .alignfull { margin-block-start: 0; margin-block-end: 0; }
.wp-block-post-content > :last-child:not(.alignfull) { margin-bottom: var(--wp--preset--spacing--60); }

.novea-equal .novea-card, .is-layout-grid > .novea-card, .is-layout-grid > .novea-stat { height: 100%; box-sizing: border-box; }
.novea-form p { margin: 0; }
.novea-form { gap: 1.1rem; }
html, body { overflow-x: clip; }
.novea-table { overflow-x: auto; }
@media (max-width: 600px) {
	.novea-table td:first-child { white-space: normal; }
	.novea-table th, .novea-table td { padding: .7rem .6rem; font-size: .9rem; }
}

/* ---------- Formulaire de demande de logement ---------- */
.novea-form--demande { gap: 1.6rem; }
.novea-form--demande fieldset { border: 0; border-top: 1px solid rgba(1,70,102,.12); margin: 0; padding: 1.4rem 0 0; display: grid; gap: 1rem; min-width: 0; }
.novea-form--demande fieldset:first-of-type { border-top: 0; padding-top: 0; }
.novea-form--demande legend { display: flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.15rem; color: var(--wp--preset--color--primary); padding: 0; margin-bottom: .4rem; }
.novea-form--demande legend .novea-step__num { width: 2rem; height: 2rem; font-size: .95rem; margin: 0 !important; }
.novea-form--demande legend small { font-weight: 400; font-size: .85rem; color: var(--wp--preset--color--muted); }
.novea-form .novea-form__row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .novea-form .novea-form__row--3 { grid-template-columns: 1fr; } }
.novea-form input[type=date], .novea-form input[type=number] { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: .75rem 1rem; border: 1px solid rgba(1,70,102,.25); border-radius: 10px; background: #fff; color: var(--wp--preset--color--ink); }
.novea-form input[type=file] { width: 100%; box-sizing: border-box; font: inherit; font-size: .85rem; padding: .7rem; border: 1px dashed rgba(1,70,102,.35); border-radius: 10px; background: var(--wp--preset--color--mist); }
.novea-form label small { font-weight: 400; color: var(--wp--preset--color--muted); }
.novea-form__help { font-size: .88rem; color: var(--wp--preset--color--muted); }
.novea-notice--big { font-size: 1.05rem; line-height: 1.8; padding: 1.6rem 1.8rem; }
.novea-ref { font-size: 1.3rem; letter-spacing: .04em; }
