/*
Theme Name: NC Serene
Description: Canevas beauté/bien-être maison — troisième alternative visuelle complète (après nc-canvas et nc-editorial) : formes douces et arrondies, dividers en vague, typographie serif élégante. Un des canevas de la fabrique de sites NC ECOM.
Author: NC ECOM
Version: 1.0
Text Domain: nc-serene
*/

/* ==========================================================================
   Variables (repli par défaut ; surchargées par site via functions.php)
   ========================================================================== */
:root {
    --color-primary: #C97B84;
    --color-primary-hover: #B35F69;
    --color-heading: #4A2E2E;
    --color-text: #6B5750;
    --color-background: #FDF6F3;
    --color-secondary-background: #F3E4DE;
    --color-border: #4A2E2E;
    --color-secondary-border: #E8D5CC;
    --color-accent: #A67C52;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Nunito Sans', sans-serif;

    --container-width: 1160px;
    --radius: 28px;
    --radius-pill: 999px;
    --shadow: 0 10px 30px rgba(74, 46, 46, 0.08);
    --shadow-hover: 0 16px 40px rgba(74, 46, 46, 0.14);

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3.5rem;
    --space-xl: 5.5rem;

    --bp-mobile: 900px;
}

/* ==========================================================================
   Reset & base — beaucoup d'air, arrondis généreux, jamais d'angle vif :
   à l'opposé du parti pris "presse" de nc-editorial.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.75;
    font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}
/* Cormorant Garamond : serif fine et élégante, échelle généreuse pour un
   rendu "brochure spa" plutôt que "site corporate". */
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 600; letter-spacing: 0.005em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-style: italic; font-weight: 500; }
h3 { font-size: 1.4rem; font-style: normal; }
p { margin: 0 0 1.4rem; }
p:last-child { margin-bottom: 0; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   Boutons — pilules douces, jamais d'angle
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font-body);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--accent { background: var(--color-primary); color: #fff; }
.btn--accent:hover { color: #fff; }
.btn--light {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-heading);
}
.btn--light:hover { color: var(--color-heading); }

/* ==========================================================================
   Header — flottant, tout en rondeur
   ========================================================================== */
/* backdrop-filter retiré : sur un ancêtre de .primary-nav (position:fixed
   en mode mobile), un filter/backdrop-filter crée un nouveau "containing
   block" pour les descendants fixed — le menu se positionnait alors par
   rapport au header au lieu de tout l'écran (constaté : "s'affiche un peu
   n'importe où"). Fond quasi-opaque à la place, effet flottant conservé
   sans casser le positionnement du menu mobile. */
.site-header {
    background: rgba(253, 246, 243, 0.97);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 1.3rem 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}
.site-branding img { max-height: 52px; width: auto; }
.site-branding__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-style: italic;
    font-size: 1.7rem;
    color: var(--color-heading);
    white-space: nowrap;
}

.header-nav-area { display: flex; align-items: center; gap: var(--space-md); flex: 1; justify-content: flex-end; }

.primary-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    flex-wrap: nowrap;
}
.primary-nav a {
    color: var(--color-heading);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.98rem;
}
.primary-nav a:hover { color: var(--color-primary); }

.header-search { position: relative; }
.header-search__toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-heading);
    padding: 0.4rem;
    display: flex;
    align-items: center;
}
.header-search__toggle svg { width: 20px; height: 20px; }
.header-search__form {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    padding: 0.75rem;
    width: 280px;
}
.header-search__form.is-open { display: flex; gap: 0.5rem; }
.header-search__form input[type="search"] {
    flex: 1;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--color-secondary-border);
    border-radius: var(--radius-pill);
    font-family: inherit;
}
.header-search__form button {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0 1.1rem;
    cursor: pointer;
}

.mobile-nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.mobile-nav-toggle svg { width: 26px; height: 26px; color: var(--color-heading); }
.primary-nav__close { display: none; }

@media (max-width: 900px) {
    .primary-nav {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 300;
        background: var(--color-background);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav__close {
        display: flex;
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        background: none;
        border: none;
        color: var(--color-heading);
        padding: 0.5rem;
    }
    .primary-nav__close svg { width: 26px; height: 26px; }
    .primary-nav ul { flex-direction: column; gap: 0.75rem; padding: 0; text-align: center; }
    .primary-nav a { display: block; padding: 0.85rem 0; font-size: 1.5rem; font-family: var(--font-heading); font-style: italic; }
    .site-header__inner { flex-wrap: nowrap; gap: 0.75rem; padding: 0.85rem 1rem; }
    .site-branding { flex: 1 1 0; min-width: 0; }
    .site-branding img { max-height: 38px; }
    .site-branding__title { font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .header-nav-area { flex: 0 0 auto; gap: 0.5rem; }
    .mobile-nav-toggle { display: flex; }
    body.nav-is-open { overflow: hidden; }
}

/* ==========================================================================
   Sections — bandes pleines, jamais de diagonale ni de filet dur (signature
   du canevas : tout en arrondi généreux — cartes, boutons, hero, pied de
   page — plutôt qu'un séparateur de section à part).
   ========================================================================== */
.section { padding: var(--space-xl) 0; }
.section .section-title { margin-bottom: 2.5rem; text-align: center; }
.section h2 { margin-bottom: 1.25rem; }

.hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    color: #fff;
    background-color: var(--color-heading);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(74,46,46,0.35) 0%, rgba(74,46,46,0.62) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: var(--space-lg) 1.5rem; }
.hero h1 { color: #fff; }
.hero p { color: #fff; font-size: clamp(1.05rem, 1.7vw, 1.25rem); font-style: italic; opacity: 0.95; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ==========================================================================
   Grilles de cartes — arrondies, ombre douce, aucune ligne dure
   ========================================================================== */
.section-title { margin-bottom: 2.5rem; }

.card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex: 0 1 300px;
    min-width: 260px;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card img { width: 100%; height: 210px; object-fit: cover; }
.card__body { padding: 1.6rem 1.8rem 2rem; }
.card__title { margin: 0 0 0.4rem; font-size: 1.25rem; }
.card__title a { color: var(--color-heading); text-decoration: none; }
.card__title a:hover { color: var(--color-primary); }
.card__meta { font-size: 0.85rem; opacity: 0.65; margin: 0; }
.card__text { font-size: 0.95rem; margin: 0.6rem 0 0; }
.card--solid { display: flex; align-items: center; justify-content: center; min-height: 140px; }
.card--solid .card__body { padding: 1.6rem; text-align: center; }

.card-grid--n2 > .card { flex: 1 1 380px; max-width: 500px; }
.card-grid--n4 > .card, .card-grid--n4 > li { flex: 1 1 220px; max-width: 260px; min-width: 0; }

/* ==========================================================================
   Bloc "Derniers articles"
   ========================================================================== */
.wp-block-latest-posts.wp-block-latest-posts__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}
.wp-block-latest-posts__list > li {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding-bottom: 1.4rem;
    flex: 0 1 300px;
    min-width: 260px;
}
.wp-block-latest-posts__list > li:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.wp-block-latest-posts__featured-image { margin: 0 0 1rem; overflow: hidden; }
.wp-block-latest-posts__featured-image img { width: 100%; height: 210px; object-fit: cover; }
.wp-block-latest-posts__post-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--color-heading);
    margin: 0 1.6rem 0.4rem;
}
.wp-block-latest-posts__post-date { display: block; font-size: 0.85rem; opacity: 0.65; margin: 0 1.6rem; }

.affiliate-disclosure { font-size: 0.8rem; opacity: 0.65; margin-top: 1.5rem; text-align: center; }

/* ==========================================================================
   Formulaire de contact (Contact Form 7)
   ========================================================================== */
.wpcf7-form p { margin-bottom: 1.4rem; }
.wpcf7-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-heading); }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--color-secondary-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.wpcf7-form textarea { min-height: 160px; resize: vertical; }
.wpcf7-form input[type="submit"] {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 1rem 2.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.wpcf7-form input[type="submit"]:hover { transform: translateY(-2px); }
.wpcf7-not-valid-tip { color: #b3453d; font-size: 0.85rem; margin-top: 0.3rem; }
.wpcf7-response-output { border-radius: var(--radius); padding: 1rem; margin-top: 1.5rem; }
.nc-hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; margin: 0; }

/* ==========================================================================
   Contenu générique (pages, articles)
   ========================================================================== */
.page-content, .single-content { padding: var(--space-lg) 0; }
.entry-title { font-size: clamp(2.2rem, 5vw, 3rem); margin-bottom: 0.5rem; text-align: center; }
.entry-meta { color: var(--color-text); opacity: 0.65; font-size: 0.9rem; margin-bottom: var(--space-md); text-align: center; }
.entry-featured-image { margin-bottom: var(--space-md); border-radius: var(--radius); overflow: hidden; }
.entry-featured-image img { width: 100%; }
.entry-content :is(h2, h3) { margin-top: 2rem; }
.container > :is(h2, h3):not(:first-child) { margin-top: 2rem; }

/* ==========================================================================
   Pied de page — arrondi en haut, doux
   ========================================================================== */
.single-content, .archive-results, .no-results { padding-bottom: var(--space-xl); }

.site-footer {
    background: var(--color-heading);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--space-lg) 0 var(--space-md);
    border-radius: 48px 48px 0 0;
    margin-top: var(--space-md);
}
.footer-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
}
.footer-menu a { color: #fff; opacity: 0.85; text-decoration: none; }
.footer-menu a:hover { opacity: 1; text-decoration: underline; }
.site-footer__copyright { text-align: center; font-size: 0.85rem; opacity: 0.6; }

/* ==========================================================================
   Recherche / archives
   ========================================================================== */
.archive-header, .search-header { padding: var(--space-lg) 0 var(--space-sm); text-align: center; }
.no-results { padding: var(--space-lg) 0; text-align: center; }

/* ==========================================================================
   Apparition au scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}
