/* ============================================================
   HUMANENCE — CSS COMMUN
   Palette : Deep Blue #1D3557 | Golden Yellow #FFD166
             Sky Blue #E8F4FF  | Charcoal #2E2E2E
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --deep-blue:    #1D3557;
    --golden:       #FFD166;
    --sky-blue:     #E8F4FF;
    --charcoal:     #2E2E2E;
    --white:        #ffffff;
    --off-white:    #FAFAF8;
    --light-yellow: #FFF9E6;

    --radius-btn:   4px;
    --radius-card:  4px;
    --radius-input: 4px;

    --shadow-card:  0 2px 12px rgba(29, 53, 87, 0.08);
    --shadow-nav:   0 1px 8px rgba(29, 53, 87, 0.10);

    --font-serif:   Georgia, 'Times New Roman', serif;
    --font-sans:    'Space Grotesk', system-ui, sans-serif;

    --max-width:    1140px;
    --nav-height:   76px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* ── Base ──────────────────────────────────────────────────── */
body {
    font-family: var(--font-sans);
    color: var(--charcoal);
    line-height: 1.65;
    background: var(--white);
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: normal;
    text-wrap: balance;
    color: var(--deep-blue);
}

p { text-wrap: pretty; }

/* ── Skip link (accessibilité) ─────────────────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--golden);
    color: var(--deep-blue);
    padding: 0.5rem 1rem;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── HEADER & NAV ──────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    z-index: 500;
    height: var(--nav-height);
    border-bottom: 1px solid rgba(29, 53, 87, 0.10);
    box-shadow: var(--shadow-nav);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: calc(var(--max-width) + 8%);
    margin: 0 auto;
    padding: 0 4%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    display: block;
    border: 2px solid rgba(29, 53, 87, 0.14);
    box-shadow: 0 1px 6px rgba(29, 53, 87, 0.10), 0 0 0 3px rgba(255, 209, 102, 0.18);
}

.logo-text {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--deep-blue);
    letter-spacing: 0.5px;
    text-decoration: none;
    -webkit-font-smoothing: antialiased;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--deep-blue);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-btn);
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    display: block;
}

.nav-links a:hover {
    color: var(--deep-blue);
    background: var(--sky-blue);
}

/* Lien actif */
.nav-links a.active {
    color: var(--deep-blue);
    font-weight: 700;
    border-bottom: 2px solid var(--golden);
}

/* Item calculateur : CTA dans la nav */
.nav-links .nav-cta a {
    background: var(--golden);
    color: var(--deep-blue);
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-btn);
    border-bottom: none;
}
.nav-links .nav-cta a:hover {
    background: #f0c347;
    color: var(--deep-blue);
}
.nav-links .nav-cta a.active {
    background: var(--golden);
    border-bottom: 2px solid var(--deep-blue);
}

/* ── Hamburger mobile ──────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 501;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--deep-blue);
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MANTRA BANNER ─────────────────────────────────────────── */
.mantra-banner {
    background: var(--golden);
    padding: 1.25rem 5%;
    text-align: center;
    border-top: 2px solid var(--deep-blue);
    border-bottom: 2px solid var(--deep-blue);
}

.mantra-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--deep-blue);
    font-weight: normal;
    line-height: 1.35;
}

.mantra-sub {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--deep-blue);
    margin-top: 0.4rem;
    opacity: 0.8;
    font-style: normal;
}

/* ── CONTAINER ─────────────────────────────────────────────── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

/* ── SECTION HERO (sous-pages) ─────────────────────────────── */
.page-hero {
    padding: 5rem 5% 4rem;
    background: var(--deep-blue);
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.page-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.82);
    max-width: 680px;
    margin: 0 auto 0.75rem;
    line-height: 1.75;
    font-family: var(--font-sans);
}

.page-hero .hero-highlight {
    font-size: 1rem;
    color: var(--golden);
    font-weight: 600;
    margin-top: 1.25rem;
    font-family: var(--font-sans);
}

/* ── TITRES DE SECTION ─────────────────────────────────────── */
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: normal;
    color: var(--deep-blue);
    line-height: 1.25;
    text-wrap: balance;
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--deep-blue);
    display: inline-block;
    padding: 0.34rem 0.85rem;
    border-radius: 3px;
    margin-bottom: 0.9rem;
}

/* ── BOUTONS ───────────────────────────────────────────────── */
.cta-primary,
.cta-button,
.submit-button {
    display: inline-block;
    background: var(--golden);
    color: var(--deep-blue);
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    min-height: 44px;
    line-height: 1.2;
    text-align: center;
}

.cta-primary:hover,
.cta-button:hover,
.submit-button:hover {
    background: #f0c347;
    transform: translateY(-1px);
}

.cta-primary:active,
.cta-button:active,
.submit-button:active {
    transform: translateY(0) scale(0.98);
}

.cta-secondary {
    display: inline-block;
    background: transparent;
    color: var(--deep-blue);
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-btn);
    border: 2px solid var(--deep-blue);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    min-height: 44px;
    line-height: 1.2;
}

.cta-secondary:hover {
    background: var(--deep-blue);
    color: var(--white);
    transform: translateY(-1px);
}

.cta-secondary:active {
    transform: translateY(0) scale(0.98);
}

/* Focus visible (accessibilité) */
.cta-primary:focus-visible,
.cta-secondary:focus-visible,
.cta-button:focus-visible,
.submit-button:focus-visible {
    outline: 3px solid var(--golden);
    outline-offset: 2px;
}

/* ── FORMULAIRES ───────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--deep-blue);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem 1rem;
    border: 1.5px solid rgba(29, 53, 87, 0.35);
    border-radius: var(--radius-input);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--charcoal);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--deep-blue);
    box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(46, 46, 46, 0.45);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-hint {
    font-size: 0.8rem;
    color: rgba(46,46,46,0.6);
    font-style: italic;
}

/* ── CTA FLOTTANT (toutes pages) ───────────────────────────── */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 400;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-cta a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--deep-blue);
    color: var(--golden);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-btn);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(29, 53, 87, 0.25);
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.floating-cta a:hover {
    background: #16293f;
    transform: translateY(-1px);
}

.floating-cta-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
    background: var(--deep-blue);
    color: rgba(255,255,255,0.82);
    padding: 4rem 5% 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 200px 1fr 1fr 1fr;
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    align-items: start;
}

.footer-logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.footer-logo-crop {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-logo-crop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.footer-brand-name {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.footer-mantra {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--golden);
    font-size: 0.9rem;
    line-height: 1.45;
    margin-top: 0.25rem;
}

.footer-column h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--golden);
    margin-bottom: 1.25rem;
}

.footer-column ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-column a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    font-family: var(--font-sans);
}

.footer-column a:hover { color: var(--white); }

.footer-column p {
    font-size: 0.9rem;
    font-family: var(--font-sans);
    line-height: 1.6;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    font-family: var(--font-sans);
}

/* ── SECTION FOND ALTERNÉ ──────────────────────────────────── */
.bg-white   { background: var(--white); }
.bg-blue    { background: var(--deep-blue); color: var(--white); }
.bg-sky     { background: var(--sky-blue); }
.bg-golden  { background: var(--golden); }

/* ── UTILITAIRES ───────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-2  { margin-top: 2rem; }
.mt-3  { margin-top: 3rem; }
.mb-2  { margin-bottom: 2rem; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .nav-links { gap: 0; }
    .nav-links a { font-size: 0.78rem; padding: 0.4rem 0.55rem; }
}

@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .hamburger { display: flex !important; }

    .nav-links {
        display: none !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        right: 0 !important;
        background: var(--white) !important;
        padding: 0.5rem 5% 1.5rem !important;
        gap: 0 !important;
        z-index: 499 !important;
        box-shadow: 0 8px 20px rgba(29,53,87,0.12) !important;
        border-top: 2px solid var(--golden) !important;
    }

    .nav-links.nav-open {
        display: flex !important;
    }

    .nav-links li { border-bottom: 1px solid rgba(29,53,87,0.07); }

    .nav-links a {
        color: var(--deep-blue) !important;
        padding: 0.85rem 0 !important;
        display: block !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        white-space: normal !important;
        border-radius: 0 !important;
    }

    .nav-links .nav-cta a {
        background: none !important;
        color: var(--deep-blue) !important;
        font-weight: 700 !important;
        padding: 0.85rem 0 !important;
        border-radius: 0 !important;
    }

    .nav-links a.active {
        color: var(--deep-blue) !important;
        border-bottom: none !important;
        font-weight: 700 !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .floating-cta {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-cta a {
        font-size: 0.78rem;
        padding: 0.65rem 1rem;
    }
}

/* ── JS FLOATING CTA (script à inclure dans chaque page) ───── */
/*
<script>
(function() {
    setTimeout(function() {
        var el = document.querySelector('.floating-cta');
        if (el) el.classList.add('visible');
    }, 2000);
    // hamburger
    var btn = document.querySelector('.hamburger');
    var nav = document.querySelector('.nav-links');
    if (btn && nav) {
        btn.addEventListener('click', function() {
            this.classList.toggle('open');
            nav.classList.toggle('nav-open');
            this.setAttribute('aria-expanded', this.classList.contains('open'));
        });
        document.addEventListener('click', function(e) {
            if (!btn.contains(e.target) && !nav.contains(e.target)) {
                btn.classList.remove('open');
                nav.classList.remove('nav-open');
                btn.setAttribute('aria-expanded', 'false');
            }
        });
    }
})();
</script>
*/
