/* =========================================================
   KNETT — feuille de style
   Palette : pastel doux (rose poudré, lavande, crème)
   Typo    : serif fin espacé pour les titres (assorti au logo),
             sans-serif pour le corps de texte.
   ========================================================= */

:root {
    --bg: #FBF6F1;
    --surface: #F3EAE4;
    --surface-2: #EFE3DC;
    --ink: #4A3F3A;
    --muted: #8B7E77;
    --rose: #E3AFA6;
    --lavender: #C7BEE0;
    --line: #DCCFC5;

    --radius: 20px;
    --radius-sm: 10px;

    --font-display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --max-width: 960px;
}

html {
    scroll-behavior: smooth;
}

h2[id] {
    scroll-margin-top: 100px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ink);
    text-decoration: none;
}

img, svg { max-width: 100%; display: block; }

/* ---------- Focus visible (accessibilité) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--lavender);
    outline-offset: 3px;
}

/* ---------- En-tête ---------- */
.site-header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    color: var(--ink);
    text-transform: uppercase;
    padding-right: 0.35em; /* compense le letter-spacing en fin de mot */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 0.95rem;
    color: var(--muted);
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
    border-bottom-color: var(--rose);
}

.stitch-divider {
    display: block;
    width: 100%;
    height: 14px;
    color: var(--line);
}

/* ---------- Menu mobile (checkbox hack, sans JS) ---------- */
.nav-toggle { display: none; }

.nav-toggle-label {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle-label span {
    width: 24px;
    height: 2px;
    background: var(--ink);
    display: block;
}

@media (max-width: 640px) {
    .nav-toggle-label { display: flex; }

    .main-nav {
        display: none;
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding-top: 1rem;
    }

    .main-nav li {
        border-top: 1px solid var(--line);
    }

    .main-nav a {
        display: block;
        padding: 0.85rem 0.25rem;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .nav-toggle:checked ~ .main-nav {
        display: block;
    }
}

/* ---------- Contenu principal ---------- */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--muted);
    margin-top: 0;
    margin-bottom: 2rem;
}

.section {
    margin-bottom: 3rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: 0 8px 24px -12px rgba(74, 63, 58, 0.18);
}

.quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ink);
    border-left: 3px solid var(--rose);
    padding-left: 1.25rem;
    margin: 2rem 0;
}

/* ---------- Grille de réalisations (galerie) ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px -14px rgba(74, 63, 58, 0.2);
}

.gallery-item figure {
    margin: 0;
}

.gallery-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    margin: 0 auto;
}

.gallery-item figcaption {
    padding: 0.85rem 1rem 1.1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.gallery-item figcaption strong {
    display: block;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

/* ---------- Formulaire de contact ---------- */
.form-field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field label {
    font-size: 0.9rem;
    color: var(--muted);
}

.form-field input,
.form-field textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}

.btn {
    display: inline-block;
    background: var(--rose);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--lavender);
}

/* ---------- Pied de page ---------- */
.site-footer {
    background: var(--surface-2);
    color: var(--muted);
    margin-top: 2rem;
}

.site-footer .stitch-divider {
    transform: rotate(180deg);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer-tagline {
    font-family: var(--font-display);
    font-style: italic;
    margin-bottom: 0.35rem;
}

.footer-copy {
    margin: 0;
}

/* ---------- Respect des préférences de mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
