/* site.css — le design de ce site, écrit à la main.
   Mobile d'abord : les règles de base visent 360 px, les @media (min-width: …)
   ajoutent ce qui change sur grand écran. Contraste AA minimum (4,5:1).

   Palette chaude : bruns doux et terre cuite sur crème et sable. Seuls l'encre, le
   brun des titres et la terre cuite portent du texte ; sable, sauge, terre, ciel et
   miel sont des fonds et des filets. Ratios calculés :
     encre    #4A3C35 (texte)  sur crème 9,9:1 · sur sable 8,6:1
     gris     #7A5443 (titres) sur crème 6,2:1 · sur sable 5,4:1
     cuivre-f #8C4A32 (liens)  sur crème 6,3:1 · sur sable 5,5:1
     blanc sur cuivre-f 6,7:1 · sur cuivre-ff 9,0:1 */

/* --- Polices auto-hébergées (licences OFL dans fonts/) ------------------------ */

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../fonts/atkinson.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/fraunces.woff2") format("woff2");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --creme: #FBF7F1;
    --blanc: #FFFFFF;
    --lin: #EDE2D5;
    --encre: #4A3C35;
    --gris: #7A5443;
    --cuivre-f: #8C4A32;
    --cuivre-ff: #6F3B28;  /* survol des boutons */
    /* Décoratives seulement : fonds, filets, tresse */
    --cuivre: #6E7F76;
    --sable: #E6D3C3;
    --sable-p: #F3E9DE;
    --terre: #B98165;
    --ciel: #7FA0AF;
    --miel: #B3924F;

    --titres: "Fraunces", Georgia, "Times New Roman", serif;
    --texte: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --rayon: 10px;
    --gouttiere: clamp(1rem, 5vw, 3rem);
    --respiration: clamp(4rem, 10vw, 7.5rem);
}

/* --- Base ------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6.5rem;   /* hauteur de l'en-tête collant */
}

body {
    background: var(--creme);
    color: var(--encre);
    font-family: var(--texte);
    font-size: 1.125rem;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--gris);
    font-family: var(--titres);
    font-weight: 500;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.4rem, 1.6rem + 4.2vw, 4.4rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem);
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

p, li {
    max-width: 65ch;
}

a {
    color: var(--cuivre-f);
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--cuivre-f);
    outline-offset: 3px;
    border-radius: 2px;
}

strong {
    font-weight: 700;
}

.evitement {
    background: var(--cuivre-f);
    color: var(--blanc);
    border-radius: var(--rayon);
}

.evitement:focus-visible {
    outline-color: var(--cuivre-f);
}

.enveloppe {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: var(--gouttiere);
}

.chapeau {
    font-size: 1.2rem;
    max-width: 38em;
}

.discret {
    font-size: 1rem;
}

/* --- En-tête : toujours affiché, collé en haut (comme la v1) -------------------- */

.entete {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(251, 247, 241, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--lin);
}

/* Mobile : logo et « Nous écrire » sur une ligne, les liens dessous, défilables. */
.entete .enveloppe {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "marque cta" "menu menu";
    align-items: center;
    column-gap: 1rem;
    padding-block: 0.4rem 0;
}

.marque {
    grid-area: marque;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    justify-self: start;
    color: var(--gris);
    font-family: var(--titres);
    font-size: 1.45rem;
    font-weight: 600;
    text-decoration: none;
    padding-block: 0.25rem;
}

.marque img {
    width: 2.2rem;
    height: auto;
}

.menu-cta {
    grid-area: cta;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    background: var(--cuivre-f);
    color: var(--blanc);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.menu-cta:hover {
    background: var(--cuivre-ff);
}

.menu {
    grid-area: menu;
    min-width: 0;
}

.menu ul {
    display: flex;
    gap: 0.7rem;
    margin: 0;
    padding: 0 0 0.15rem;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.menu ul::-webkit-scrollbar {
    display: none;
}

.menu li {
    max-width: none;
}

.menu a {
    display: inline-block;
    padding-block: 0.45rem;
    font-size: 0.93rem;
    text-decoration: none;
}

.menu a:hover,
.menu a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--terre);
    text-decoration-thickness: 3px;
}

.menu a:focus-visible {
    outline-offset: -1px;
}

/* --- Boutons ------------------------------------------------------------------ */

.boutons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.bouton {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border: 2px solid var(--cuivre-f);
    border-radius: var(--rayon);
    font-weight: 700;
    text-decoration: none;
}

.bouton--plein {
    background: var(--cuivre-f);
    color: var(--blanc);
}

.bouton--plein:hover {
    background: var(--cuivre-ff);
    border-color: var(--cuivre-ff);
}

.bouton--contour {
    color: var(--cuivre-f);
}

.bouton--contour:hover {
    background: var(--lin);
}

/* --- Sections ----------------------------------------------------------------- */

.section {
    padding-block: var(--respiration);
}

.section--sauge {
    background: var(--sable-p);
}

/* Tresse : trois fibres qui ondulent entre deux sections (reprise de la v1). */
.tresse {
    height: 46px;
    background: url("../img/tresse.svg") no-repeat center / 100% 46px;
}

/* --- Accueil ------------------------------------------------------------------ */

.accueil {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 8vw, 6rem) var(--respiration);
}

.accueil .enveloppe {
    position: relative;
    z-index: 1;
}

.accueil h1 {
    max-width: 11em;
}

/* Le fragment de natte, en filigrane derrière le titre sur mobile.
   Des fibres fines : un petit jour dans la fibre du dessous marque chaque croisement,
   un sur deux, comme dans une vraie natte (motif de 60 : 52 de fibre, 8 de jour).
   Un masque en dégradé (dans le SVG) fond les bords. */
.natte {
    position: absolute;
    top: -3rem;
    right: -7rem;
    width: 18rem;
    opacity: 0.35;
    pointer-events: none;
}

.natte .trame,
.natte .chaine,
.natte .libre {
    fill: none;
    stroke-width: 2;
}

.natte .trame { stroke: var(--terre); }
.natte .chaine,
.natte .libre { stroke: var(--cuivre); }

.natte .trame path,
.natte .chaine path {
    stroke-dasharray: 52 8;
}

.natte .trame .a,
.natte .chaine .b { stroke-dashoffset: 11; }
.natte .trame .b,
.natte .chaine .a { stroke-dashoffset: 41; }

/* Les fibres apparaissent une fois, au chargement. Coupé sous prefers-reduced-motion (base.css). */
@media (prefers-reduced-motion: no-preference) {
    .natte--anime .trame path {
        animation: fibre 0.9s ease-out both;
    }

    .natte--anime .chaine path {
        animation: fibre 0.9s ease-out 0.4s both;
    }

    .natte--anime .trame path:nth-child(2n) { animation-delay: 0.1s; }
    .natte--anime .chaine path:nth-child(2n) { animation-delay: 0.5s; }
}

@keyframes fibre {
    from { opacity: 0; }
}

/* --- Pour qui ------------------------------------------------------------------ */

.profils {
    display: grid;
    gap: 1.25rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.profils li {
    max-width: none;
    padding: 1.5rem;
    border-top: 3px solid var(--terre);
    background: var(--blanc);
    border-radius: 0 0 var(--rayon) var(--rayon);
}

.profils p {
    margin: 0;
}

/* --- Le nom -------------------------------------------------------------------- */

.nom {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.nom p {
    font-size: 1.2rem;
}

/* --- Réalisations ----------------------------------------------------------------- */

.realisations {
    display: grid;
    gap: 1.5rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.realisations li {
    max-width: none;
}

.realisation {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding-bottom: 1.75rem;
    overflow: hidden;
    border: 1px solid var(--lin);
    border-radius: 18px;
    background: var(--blanc);
    color: var(--encre);
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.realisation:hover {
    box-shadow: 0 18px 42px rgba(74, 60, 53, 0.12);
    transform: translateY(-3px);
}

/* Bandeau aux couleurs du site, bordé d'un ourlet ondulé. */
.realisation-bandeau {
    align-self: stretch;
    height: 88px;
    background: url("../img/ourlet.svg") no-repeat bottom / 100% 16px, var(--fond);
}

.realisation--kinooha { --fond: linear-gradient(140deg, #FAF6F0, #C2A26A); }
.realisation--instant { --fond: linear-gradient(140deg, #FFF5F2, #D48C7E); }
.realisation--qiluna { --fond: linear-gradient(140deg, #241E1E, #D48B97); }
.realisation--maria-luna { --fond: linear-gradient(140deg, #FBFBF9, #BD8B76); }

.realisation img {
    width: 80px;
    height: 80px;
    margin: -40px 0 1rem;
    border: 4px solid var(--blanc);
    border-radius: 50%;
    background: var(--blanc);
    object-fit: cover;
}

.realisation h3 {
    margin-bottom: 0.25rem;
}

/* Toute la carte est cliquable : le lien du titre s'étend sur elle. */
.realisation h3 a {
    color: inherit;
    text-decoration: none;
}

.realisation h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.realisation h3 a:focus-visible {
    outline: none;
}

.realisation:focus-within {
    outline: 3px solid var(--cuivre-f);
    outline-offset: 3px;
}

.realisation p {
    margin: 0 1.5rem;
    font-size: 1rem;
}

.realisation .realisation-lien {
    margin-top: 1rem;
    color: var(--cuivre-f);
    font-size: 1rem;
    text-decoration: underline;
    text-decoration-color: var(--terre);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

/* --- Témoignages, sous les réalisations -------------------------------------------- */

.temoignages {
    display: grid;
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.temoignages-titre {
    text-align: center;
}

.temoignage {
    margin: 0;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--lin);
    border-radius: 18px;
    background: var(--blanc);
}

.temoignage blockquote {
    margin: 0;
}

.temoignage blockquote p {
    max-width: none;
    margin: 0;
    font-family: var(--titres);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.55;
}

.temoignage figcaption {
    margin-top: 1rem;
    color: var(--gris);
    font-size: 1rem;
}

.temoignage figcaption a {
    color: var(--cuivre-f);
    text-decoration-color: var(--terre);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
}

/* --- Pourquoi statique ------------------------------------------------------------- */

.arguments {
    display: grid;
    gap: 2rem 3rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.arguments li {
    max-width: 34rem;
    padding-left: 1.25rem;
    border-left: 3px solid var(--terre);
}

.arguments p {
    margin-bottom: 0;
}

/* --- Offres -------------------------------------------------------------------- */

.offres {
    display: grid;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.carte {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--lin);
    border-top: 3px solid var(--filet, var(--cuivre));
    border-radius: var(--rayon);
    background: var(--blanc);
}

.carte--lauhala { --filet: var(--cuivre); }
.carte--ulana { --filet: var(--terre); }
.carte--kahuna { --filet: var(--miel); }

.carte h3 {
    margin-bottom: 0.25rem;
}

.carte ul {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
}

.carte li {
    margin-bottom: 0.4rem;
}

.carte li::marker {
    color: var(--cuivre-f);
}

.prix {
    margin: 0.25rem 0 0.5rem;
    color: var(--cuivre-f);
    font-family: var(--titres);
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.prix small {
    display: block;
    font-family: var(--texte);
    font-size: 1rem;
    font-weight: 400;
}

.bandeau {
    margin-top: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--rayon);
    background: var(--blanc);
    border: 1px solid var(--lin);
    border-left: 6px solid var(--ciel);
}

.bandeau h3 {
    margin-bottom: 0.5rem;
}

.bandeau p {
    margin-bottom: 0;
}

.malama {
    margin-top: 3.5rem;
}

.malama-cartes {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.malama .carte {
    --filet: var(--ciel);
}

.malama .prix {
    font-size: 1.5rem;
}

.malama-note {
    margin-top: 1.25rem;
    font-size: 1rem;
}

.options {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sable);
    font-size: 1rem;
}

.conditions {
    font-size: 1rem;
}

.lancement {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--lin);
    border-left: 6px solid var(--miel);
    border-radius: var(--rayon);
    background: var(--blanc);
}

.lancement p {
    margin: 0;
}

/* --- Méthode -------------------------------------------------------------------- */

.etapes {
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: etape;
}

.etapes li {
    position: relative;
    padding: 0 0 2.25rem 4rem;
    counter-increment: etape;
}

/* Le fil qui relie les étapes, comme un fil de chaîne. */
.etapes li::before {
    content: "";
    position: absolute;
    left: 1.2rem;
    top: 3rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--terre);
}

.etapes li:last-child::before {
    display: none;
}

.etapes li::after {
    content: counter(etape);
    position: absolute;
    left: 0;
    top: -0.35rem;
    width: 2.5rem;
    color: var(--cuivre-f);
    font-family: var(--titres);
    font-size: 2.4rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
}

.etapes p {
    margin: 0;
}

.delais {
    margin-top: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--rayon);
    background: var(--sable-p);
}

/* --- Qui sommes-nous ------------------------------------------------------------- */

.personnes {
    display: grid;
    gap: 2.5rem;
    margin-top: 2.5rem;
}

/* --- Questions -------------------------------------------------------------------- */

.questions {
    margin-top: 2rem;
    max-width: 48rem;
}

.questions details {
    border-bottom: 1px solid var(--terre);
}

.questions details:first-child {
    border-top: 1px solid var(--terre);
}

.questions summary {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-block: 1.1rem;
    color: var(--cuivre-f);
    font-family: var(--titres);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.questions summary::-webkit-details-marker {
    display: none;
}

.questions summary::after {
    content: "+";
    flex: none;
    font-family: var(--texte);
    font-size: 1.6rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.questions details[open] summary::after {
    transform: rotate(45deg);
}

.questions details p {
    margin: 0 0 1.25rem;
}

/* --- Contact ---------------------------------------------------------------------- */

.contact {
    text-align: left;
}

.courriel {
    display: inline-block;
    margin-block: 1rem 0.5rem;
    font-family: var(--titres);
    font-size: clamp(1.45rem, 1rem + 2.6vw, 2.8rem);
    font-weight: 500;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: var(--miel);
    text-decoration-thickness: 0.15em;
    text-underline-offset: 0.2em;
}

.courriel:hover {
    text-decoration-color: var(--terre);
    text-decoration-thickness: 0.15em;
}

/* --- Pages de texte (CGV, mentions, confidentialité) ------------------------------------ */

.page {
    padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--respiration);
}

.page .enveloppe > * {
    max-width: 48rem;
}

.page h2 {
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.sommaire {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--rayon);
    background: var(--sable-p);
}

.sommaire h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.sommaire ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sommaire li {
    padding-block: 0.15rem;
}

/* --- 404 ------------------------------------------------------------------------------ */

.introuvable {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3rem, 8vw, 6rem) var(--respiration);
}

.introuvable .natte {
    position: static;
    width: 14rem;
    margin: 0 0 1rem;
    opacity: 0.8;
}

/* --- Pied de page ---------------------------------------------------------------------- */

.pied {
    padding-block: 3rem;
    background: var(--sable-p);
    font-size: 1rem;
}

.pied .enveloppe {
    display: grid;
    gap: 1rem;
}

.pied p {
    margin: 0;
}

.signature {
    color: var(--cuivre-f);
    font-family: var(--titres);
    font-size: 1.35rem;
}

.pied ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pied ul a {
    display: inline-block;
    padding-block: 0.4rem;
}

/* --- Fondu à l'apparition (activé par js/site.js uniquement) ---------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .fondu .section {
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .fondu .section:not(.visible) {
        opacity: 0;
        transform: translateY(1.25rem);
    }
}

/* --- Grand écran -------------------------------------------------------------------------- */

@media (min-width: 40em) {
    .profils {
        grid-template-columns: repeat(2, 1fr);
    }

    .malama-cartes,
    .personnes {
        grid-template-columns: repeat(2, 1fr);
    }

    .natte {
        right: -5rem;
        width: 24rem;
    }
}

@media (min-width: 52em) {
    html {
        scroll-padding-top: 5rem;
    }

    .entete .enveloppe {
        grid-template-columns: auto 1fr auto;
        grid-template-areas: "marque menu cta";
        padding-block: 0.6rem;
    }

    .menu a {
        font-size: 1rem;
    }

    .menu ul {
        justify-content: flex-end;
        gap: 1.6rem;
        padding: 0;
        overflow: visible;
    }

    .realisations {
        grid-template-columns: repeat(2, 1fr);
    }

    .temoignages {
        grid-template-columns: repeat(2, 1fr);
    }

    .temoignages-titre {
        grid-column: 1 / -1;
    }

    .arguments {
        grid-template-columns: repeat(2, 1fr);
    }

    .offres {
        grid-template-columns: repeat(3, 1fr);
        align-items: stretch;
    }

    .accueil {
        padding-block: 7rem 8rem;
    }

    .natte {
        top: 50%;
        right: max(1rem, calc(50vw - 36rem));
        width: min(38vw, 28rem);
        transform: translateY(-50%);
        opacity: 0.6;
    }

    .accueil .chapeau {
        max-width: 30em;
    }

    .accueil .enveloppe > * {
        max-width: 52%;
    }

    .pied .enveloppe {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (min-width: 72em) {
    .realisations {
        grid-template-columns: repeat(4, 1fr);
    }

    .arguments {
        grid-template-columns: repeat(3, 1fr);
    }
}
