/* =========================================================
   NEGAFA PRINCESSE JOUAYRIA — Feuille de style principale
   Palette : sable, doré, blanc cassé, vert marocain
   ========================================================= */

:root {
    --sable: #F5ECD7;
    --sable-clair: #FBF6EA;
    --blanc-casse: #FDFBF6;
    --dore: #C9A857;
    --dore-fonce: #A8863C;
    --vert: #33564A;      /* vert marocain profond */
    --vert-clair: #4C7264;
    --encre: #2B2620;     /* texte principal chaud, pas noir pur */
    --gris: #6E665A;

    --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
    --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

    --max: 1240px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --ombre: 0 18px 50px -24px rgba(43, 38, 32, 0.35);
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    -webkit-text-size-adjust: 100%; 
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
}
body {
    margin: 0;
    font-family: var(--sans);
    color: var(--encre);
    background: var(--blanc-casse);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
img, video, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }

/* ---------- Motif zellige de fond (SVG inline via mask) ---------- */
.zellige-bg { position: relative; }
.zellige-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='none' stroke='%23C9A857' stroke-width='1' d='M30 0l30 30-30 30L0 30z M30 12l18 18-18 18-18-18z'/%3E%3C/svg%3E");
    opacity: .05;
    pointer-events: none;
}

/* ---------- Utilitaires ---------- */
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); overflow: hidden; }
.eyebrow {
    font-family: var(--sans);
    font-size: .74rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: var(--dore-fonce);
    font-weight: 500;
    margin-bottom: 1rem;
    display: inline-block;
}
.section { padding-block: clamp(4rem, 9vw, 7.5rem); overflow: hidden; }
.section--sable { background: var(--sable); }
.section--vert { background: var(--vert); color: var(--sable-clair); }
.section--vert .eyebrow { color: var(--dore); }
.text-center { text-align: center; }
.lead { font-size: 1.18rem; color: var(--gris); max-width: 60ch; }

.title-xl { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.title-lg { font-size: clamp(2rem, 4.5vw, 3.1rem); }

/* Séparateur arabesque doré */
.ornement {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; color: var(--dore); margin: 1.4rem 0;
}
.ornement::before, .ornement::after {
    content: ""; height: 1px; width: clamp(40px, 12vw, 110px);
    background: linear-gradient(90deg, transparent, var(--dore));
}
.ornement::after { background: linear-gradient(90deg, var(--dore), transparent); }
.ornement span { font-size: 1.1rem; letter-spacing: .2em; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--sans); font-size: .82rem; letter-spacing: .16em;
    text-transform: uppercase; font-weight: 500;
    padding: 1rem 2.1rem; border-radius: 2px;
    cursor: pointer; border: 1px solid transparent;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}
.btn--gold { background: var(--dore); color: #fff; }
.btn--gold:hover { background: var(--dore-fonce); transform: translateY(-2px); }
.btn--outline { border-color: var(--dore); color: var(--dore-fonce); background: transparent; }
.btn--outline:hover { background: var(--dore); color: #fff; }
.btn--light { border: 1px solid rgba(255,255,255,.6); color: #fff; }
.btn--light:hover { background: #fff; color: var(--vert); }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(253, 251, 246, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 168, 87, .25);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    padding-block: 1.1rem; gap: 2rem;
}
.brand { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .02em; color: var(--vert); }
.brand small { display: block; font-family: var(--sans); font-size: .58rem; letter-spacing: .34em; text-transform: uppercase; color: var(--dore-fonce); margin-top: 2px; }
.nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--encre); position: relative; padding-bottom: 4px; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--dore); transition: width .3s; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--vert); transition: .3s; }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 92vh;
    display: flex; align-items: center;
    color: #fff; text-align: center;
    background: linear-gradient(rgba(43,38,32,.42), rgba(43,38,32,.52)),
                var(--vert);
    background-size: cover; background-position: center;
}
.hero__inner { max-width: 780px; margin-inline: auto; padding: 2rem var(--gutter); }
.hero .eyebrow { color: var(--sable); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); font-weight: 500; margin-bottom: .3em; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,.9); max-width: 46ch; margin-inline: auto; margin-bottom: 2rem; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Section image + texte alternée ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; box-shadow: var(--ombre); aspect-ratio: 4/5; }
.split__media { position: relative; }
.split__media::after {
    content: ""; position: absolute; inset: 14px -14px -14px 14px;
    border: 1px solid var(--dore); z-index: -1; border-radius: 2px;
}

/* ---------- Grille services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1.6rem; }
.service-card {
    background: var(--blanc-casse); border: 1px solid rgba(201,168,87,.28);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--ombre); }
.service-card__img { aspect-ratio: 3/2; overflow: hidden; background: var(--sable); }
.service-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.service-card:hover .service-card__img img { transform: scale(1.06); }
.service-card__body { padding: 1.8rem; flex: 1; }
.service-card__icon { font-size: 1.6rem; color: var(--dore); margin-bottom: .5rem; }
.service-card h3 { font-size: 1.5rem; color: var(--vert); }

/* Service détaillé (page services) : alternance pleine largeur */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: center; margin-bottom: clamp(3rem,7vw,5.5rem); }
.service-detail:nth-child(even) .service-detail__media { order: 2; }
.service-detail__media img { aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: var(--ombre); }
.service-detail__num { font-family: var(--serif); font-size: 3rem; color: var(--dore); opacity: .5; line-height: 1; }

/* ---------- Portfolio ---------- */
.filters { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn {
    font-family: var(--sans); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
    padding: .6rem 1.3rem; border: 1px solid rgba(201,168,87,.5); background: transparent;
    color: var(--gris); cursor: pointer; border-radius: 2px; transition: .25s;
}
.filter-btn.active, .filter-btn:hover { background: var(--dore); color: #fff; border-color: var(--dore); }
.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery__item { break-inside: avoid; margin-bottom: 1rem; position: relative; cursor: pointer; overflow: hidden; }
.gallery__item img { width: 100%; transition: transform .6s ease; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(transparent 55%, rgba(43,38,32,.55));
    opacity: 0; transition: opacity .3s;
}
.gallery__item:hover::after { opacity: 1; }
.gallery__cap { position: absolute; left: 1rem; bottom: 1rem; color: #fff; z-index: 2; opacity: 0; transform: translateY(8px); transition: .3s; font-family: var(--serif); font-size: 1.2rem; }
.gallery__item:hover .gallery__cap { opacity: 1; transform: translateY(0); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,17,13,.94); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 2rem; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: var(--ombre); }
.lightbox__close, .lightbox__nav { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font-size: 2rem; padding: 1rem; }
.lightbox__close { top: 1rem; right: 1.5rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.6rem; opacity: .7; }
.lightbox__nav:hover { opacity: 1; }
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

/* ---------- Témoignages ---------- */
.temoignages-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.6rem; }
.temoignage {
    background: rgba(255,255,255,.06); border: 1px solid rgba(201,168,87,.4);
    padding: 2.2rem; position: relative;
}
.section--vert .temoignage { background: rgba(255,255,255,.05); }
.temoignage::before { content: "\201C"; font-family: var(--serif); font-size: 4rem; color: var(--dore); line-height: .6; display: block; margin-bottom: .4rem; }
.temoignage p { font-family: var(--serif); font-size: 1.28rem; font-style: italic; line-height: 1.5; }
.temoignage cite { font-style: normal; font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dore); }

/* ---------- Bandeau CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.85); margin-inline: auto; margin-bottom: 2rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,4rem); }
.form-field { margin-bottom: 1.3rem; }
.form-field label { display: block; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); margin-bottom: .5rem; }
.form-field input, .form-field textarea {
    width: 100%; padding: .9rem 1rem; font-family: var(--sans); font-size: 1rem;
    border: 1px solid rgba(201,168,87,.4); background: var(--blanc-casse);
    border-radius: 2px; color: var(--encre);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--dore); border-color: var(--dore); }
.form-error { color: #b03636; font-size: .82rem; margin-top: .3rem; }
.contact-info { background: var(--vert); color: var(--sable-clair); padding: 2.4rem; }
.contact-info h3 { color: #fff; }
.contact-info a { color: var(--dore); }
.info-row { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.3rem; }
.info-row .ico { color: var(--dore); font-size: 1.1rem; }

.whatsapp-btn { background: #25D366 !important; color: #fff !important; }
.whatsapp-btn:hover { background: #1da851 !important; }

/* Bouton WhatsApp flottant */
.whatsapp-float {
    position: fixed; right: 1.2rem; bottom: 2rem; z-index: 9999;
    width: 58px; height: 58px; border-radius: 50%; background: #25D366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(37,211,102,.45); color: #fff !important;
    transition: transform .25s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ---------- Flash ---------- */
.flash { padding: 1rem 1.3rem; border-radius: 2px; margin-bottom: 1.4rem; font-size: .95rem; }
.flash--success { background: #e7f2ec; color: var(--vert); border: 1px solid var(--vert-clair); }
.flash--error { background: #f9e7e7; color: #a33; border: 1px solid #d99; }

/* ---------- Footer ---------- */
.site-footer { background: var(--encre); color: rgba(245,236,215,.75); padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.site-footer .brand { color: var(--sable); }
.site-footer h4 { color: var(--dore); font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; font-size: .92rem; }
.site-footer a:hover { color: var(--dore); }
.footer-bottom { border-top: 1px solid rgba(201,168,87,.2); padding-top: 1.5rem; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ---------- Animations au scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-links {
        display: none;
        position: fixed; top: 0; right: 0; width: min(78vw, 320px); height: 100vh;
        background: var(--blanc-casse); flex-direction: column; align-items: flex-start;
        padding: 5rem 2rem; gap: 1.6rem; box-shadow: var(--ombre);
        z-index: 100;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; z-index: 101; }
    .split, .split--reverse .split__media, .service-detail, .service-detail:nth-child(even) .service-detail__media,
    .contact-grid { grid-template-columns: 1fr; }
    .split--reverse .split__media, .service-detail:nth-child(even) .service-detail__media { order: 0; }
    .split__media::after { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .gallery { columns: 2 160px; }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .gallery { columns: 1; }
    .hero { min-height: 84vh; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
