/*
Theme Name:  Huissier BELKIS
Theme URI:   https://huissier.ma
Author:      Étude Me. Lahcen BELKIS
Description: Thème professionnel — Huissier de Justice Agadir
Version:     2.0.0
License:     GNU General Public License v2 or later
Text Domain: huissier
Tags:        legal, professional, multilingual, responsive
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --navy:         #08111c;
    --navy-deep:    #060e18;
    --navy-mid:     #0d1a2b;
    --navy-card:    #060d16;
    --gold:         #C9A96E;
    --gold-light:   #E8D5B0;
    --gold-dim:     rgba(201,169,110,0.12);
    --gold-border:  rgba(201,169,110,0.22);
    --cream:        #F7F3EE;
    --white:        #ffffff;
    --font-serif:   'Playfair Display', Georgia, serif;
    --font-sans:    'Inter', system-ui, sans-serif;
    --topbar-h:     40px;
    --header-h:     58px;
    --radius:       8px;
    --ease:         0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--white);
    background: var(--navy);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   TOPBAR — bande dorée
   ============================================================ */
#site-topbar {
    background: var(--gold);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 200;
}
.topbar-tel {
    display: flex; align-items: center; gap: 7px;
    color: var(--navy); font-size: 12px; font-weight: 700;
    letter-spacing: 0.02em; white-space: nowrap;
}
.topbar-tel svg { width: 13px; height: 13px; stroke: var(--navy); fill: none; stroke-width: 2; flex-shrink: 0; }
.topbar-hours { text-align: right; color: var(--navy); font-size: 9.5px; line-height: 1.4; }
.topbar-hours b { font-size: 11px; display: block; }

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
    background: var(--navy);
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--gold-border);
    position: sticky;
    top: var(--topbar-h);
    z-index: 199;
}
.site-logo-wrap { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-seal {
    width: 38px; height: 38px;
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
}
.logo-seal::before {
    content: '';
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(201,169,110,0.15);
}
.logo-seal svg { width: 19px; height: 19px; stroke: var(--gold); fill: none; stroke-width: 1.3; stroke-linecap: round; }
.site-name-wrap {}
.site-name { font-family: var(--font-sans); font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: 0.08em; line-height: 1.1; display: block; }
.site-tagline { font-size: 8px; font-weight: 500; color: var(--gold); letter-spacing: 0.18em; margin-top: 2px; display: block; }

/* Lang pills header */
.lang-pills { display: flex; gap: 4px; }
.lang-pill {
    font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em;
    padding: 3px 9px; border-radius: 20px; cursor: pointer;
    border: 1px solid var(--gold-border);
    background: transparent; color: rgba(255,255,255,0.4);
    transition: all var(--ease); font-family: var(--font-sans);
}
.lang-pill.active, .lang-pill:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* Hamburger */
.menu-toggle {
    background: transparent; border: none; cursor: pointer;
    padding: 5px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.menu-toggle span {
    display: block; height: 1.5px; background: rgba(255,255,255,0.8);
    border-radius: 2px; transition: var(--ease);
}
.menu-toggle span:nth-child(1) { width: 22px; }
.menu-toggle span:nth-child(2) { width: 15px; }
.menu-toggle span:nth-child(3) { width: 22px; }
.menu-toggle.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 22px; }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); width: 22px; }

/* Desktop nav */
#site-navigation { display: none; }

/* Mobile drawer */
.nav-drawer {
    display: none; flex-direction: column;
    background: var(--navy-mid);
    border-bottom: 1px solid var(--gold-border);
    position: sticky; top: calc(var(--topbar-h) + var(--header-h)); z-index: 198;
}
.nav-drawer.is-open { display: flex; }
.nav-drawer ul { list-style: none; padding: 6px 0; }
.nav-drawer ul li a {
    display: block; padding: 13px 20px;
    font-size: 12.5px; font-weight: 500;
    color: rgba(255,255,255,0.75); letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color var(--ease);
}
.nav-drawer ul li a:hover { color: var(--gold); }
.drawer-lang { display: flex; gap: 6px; padding: 12px 20px; border-top: 1px solid var(--gold-border); }

/* ============================================================
   VCARD COVER — hero section
   ============================================================ */
#vcard-cover {
    background: var(--navy);
    padding: 32px 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
#vcard-cover::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% -5%, rgba(180,140,80,0.2) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 85% 100%, rgba(180,140,80,0.06) 0%, transparent 50%);
    pointer-events: none;
}
#vcard-cover::after {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(201,169,110,0.035) 40px);
    pointer-events: none;
}

/* Triple-ring seal */
.cover-seal {
    position: relative; display: inline-block;
    margin-bottom: 20px;
}
.seal-outer {
    width: 108px; height: 108px;
    border: 1px solid rgba(201,169,110,0.38);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.seal-outer::before {
    content: ''; position: absolute; inset: -9px;
    border-radius: 50%; border: 1px solid rgba(201,169,110,0.14);
}
.seal-outer::after {
    content: ''; position: absolute; inset: -18px;
    border-radius: 50%; border: 1px dashed rgba(201,169,110,0.07);
}
.seal-inner {
    width: 80px; height: 80px;
    background: rgba(201,169,110,0.07);
    border-radius: 50%;
    border: 1px solid rgba(201,169,110,0.22);
    display: flex; align-items: center; justify-content: center;
}
.seal-inner svg { width: 38px; height: 38px; stroke: var(--gold); fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }

.cover-eyebrow {
    font-size: 9.5px; font-weight: 500; letter-spacing: 0.35em;
    color: rgba(201,169,110,0.8); margin-bottom: 10px;
    position: relative; z-index: 1;
}
.cover-name {
    font-family: var(--font-serif);
    font-size: 42px; font-weight: 700; color: var(--white);
    letter-spacing: -0.01em; line-height: 1.05;
    margin-bottom: 13px; position: relative; z-index: 1;
}
.cover-name em { font-style: italic; color: rgba(255,255,255,0.65); font-weight: 400; }

.cover-pills {
    display: flex; justify-content: center; align-items: center;
    gap: 0; margin-bottom: 18px; position: relative; z-index: 1;
}
.cover-pill { font-size: 8.5px; font-weight: 600; letter-spacing: 0.15em; color: rgba(255,255,255,0.4); padding: 0 13px; }
.cover-pill-sep { width: 1px; height: 11px; background: rgba(201,169,110,0.3); }

/* Gold diamond divider */
.gold-divider {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 0 24px 20px; position: relative; z-index: 1;
}
.gd-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(201,169,110,0.4), transparent); }
.gd-diamond { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }

/* Credential badge */
.cred-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(201,169,110,0.07);
    border: 1px solid rgba(201,169,110,0.2);
    border-radius: 4px;
    padding: 7px 16px; margin-bottom: 28px;
    position: relative; z-index: 1;
}
.cred-badge svg { width: 11px; height: 11px; stroke: var(--gold); fill: none; stroke-width: 1.8; flex-shrink: 0; }
.cred-badge span { font-size: 9px; letter-spacing: 0.12em; color: rgba(201,169,110,0.9); font-weight: 600; }

/* ============================================================
   ACTION ZONE — CTA buttons
   ============================================================ */
#action-zone {
    background: var(--navy-mid);
    padding: 20px 18px 16px;
    border-top: 1px solid rgba(201,169,110,0.12);
}

.btn-call-main {
    display: flex; align-items: center; gap: 13px;
    width: 100%;
    background: var(--gold);
    border: none; border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 10px;
    cursor: pointer; text-decoration: none;
    position: relative; overflow: hidden;
    transition: background var(--ease);
}
.btn-call-main::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 55%);
}
.btn-call-main:active { background: #b89558; }
.btn-call-main svg { width: 19px; height: 19px; stroke: var(--navy); fill: none; stroke-width: 2; flex-shrink: 0; }
.btn-call-text { text-align: left; }
.btn-call-label { font-size: 11.5px; font-weight: 700; color: var(--navy); letter-spacing: 0.1em; display: block; }
.btn-call-sub { font-size: 9.5px; color: rgba(11,24,41,0.6); display: block; margin-top: 1px; }
.btn-call-arrow { margin-left: auto; font-size: 18px; color: rgba(11,24,41,0.4); line-height: 1; }

.actions-row { display: flex; gap: 10px; }

.btn-action {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 13px 8px; border-radius: var(--radius);
    text-decoration: none; border: none; cursor: pointer;
    font-family: var(--font-sans); transition: opacity var(--ease);
}
.btn-action:active { opacity: 0.75; }
.btn-action svg { flex-shrink: 0; }
.btn-action span { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }

.btn-wa  { background: #0d2616; border: 1px solid rgba(37,211,102,0.2); }
.btn-wa  svg { fill: #25D366; width: 20px; height: 20px; }
.btn-wa  span { color: #4ade80; }

.btn-mail { background: #0d1a2e; border: 1px solid rgba(96,165,250,0.2); }
.btn-mail svg { stroke: #60A5FA; fill: none; width: 20px; height: 20px; stroke-width: 1.8; }
.btn-mail span { color: #93C5FD; }

.btn-map  { background: #0d1f12; border: 1px solid rgba(74,222,128,0.15); }
.btn-map  svg { stroke: #4ADE80; fill: none; width: 20px; height: 20px; stroke-width: 1.8; }
.btn-map  span { color: #86EFAC; }

/* ============================================================
   INFO LIST
   ============================================================ */
#info-list {
    background: var(--navy-deep);
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 4px 0;
}
.info-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    text-decoration: none;
}
.info-row:last-child { border-bottom: none; }
.info-row-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
}
.ir-gold { background: rgba(201,169,110,0.1); }
.ir-blue { background: rgba(96,165,250,0.1); }
.ir-red  { background: rgba(248,113,113,0.1); }
.ir-gold svg { stroke: var(--gold); fill: none; stroke-width: 1.7; stroke-linecap: round; }
.ir-blue svg { stroke: #60A5FA; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.ir-red  svg { stroke: #F87171; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.info-row-icon svg { width: 16px; height: 16px; }
.info-row-body { flex: 1; min-width: 0; }
.info-row-label { font-size: 8.5px; letter-spacing: 0.14em; color: rgba(255,255,255,0.3); margin-bottom: 3px; font-weight: 600; }
.info-row-val { font-size: 13px; color: rgba(255,255,255,0.82); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-row-val.multiline { white-space: normal; line-height: 1.5; font-size: 12px; }
.info-chevron { width: 16px; height: 16px; flex-shrink: 0; stroke: rgba(255,255,255,0.15); fill: none; stroke-width: 1.5; stroke-linecap: round; }

/* ============================================================
   MAP PREVIEW
   ============================================================ */
#map-preview {
    margin: 12px 16px 16px;
    border-radius: 12px;
    border: 1px solid rgba(201,169,110,0.14);
    overflow: hidden;
    height: 145px;
    background: var(--navy-deep);
    position: relative;
}
.map-grid-bg {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(201,169,110,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,169,110,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}
.map-pin-wrap {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -60%);
}
.map-pin-halo {
    width: 44px; height: 44px;
    background: rgba(201,169,110,0.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.map-pin-core {
    width: 26px; height: 26px;
    background: var(--gold);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}
.map-pin-core::after { content: ''; display: block; width: 10px; height: 10px; background: var(--navy-deep); border-radius: 50%; margin: 8px auto 0; }
.map-footer {
    position: absolute; bottom: 10px; left: 10px; right: 10px;
    display: flex; justify-content: space-between; align-items: center;
}
.map-label {
    background: rgba(6,14,24,0.9);
    border: 1px solid rgba(201,169,110,0.2);
    border-radius: 6px; padding: 5px 10px;
    font-size: 9.5px; font-weight: 600;
    color: rgba(255,255,255,0.7); letter-spacing: 0.06em;
}
.map-go-btn {
    background: var(--gold); border: none; border-radius: 6px;
    padding: 6px 13px; font-size: 9px; font-weight: 700;
    color: var(--navy); letter-spacing: 0.1em;
    cursor: pointer; font-family: var(--font-sans);
    text-decoration: none; transition: background var(--ease);
}
.map-go-btn:hover { background: var(--gold-light); }

/* ============================================================
   SCROLL HINT
   ============================================================ */
.scroll-more {
    background: var(--navy-deep);
    padding: 14px 20px 22px;
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.sm-line { flex: 1; height: 1px; background: rgba(255,255,255,0.05); }
.sm-text { font-size: 8px; letter-spacing: 0.18em; color: rgba(255,255,255,0.2); white-space: nowrap; }
.sm-arrow { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sm-arrow span { display: block; width: 1px; border-radius: 1px; background: rgba(201,169,110,0.3); }
.sm-arrow span:nth-child(1) { height: 9px; }
.sm-arrow span:nth-child(2) { height: 6px; opacity: 0.5; }
.sm-arrow span:nth-child(3) { height: 3px; opacity: 0.25; }

/* ============================================================
   CONTENT SECTIONS — below the fold (SEO)
   ============================================================ */
.section-dark  { background: var(--navy); padding: 52px 20px; }
.section-light { background: var(--cream); padding: 52px 20px; color: var(--navy); }
.section-mid   { background: var(--navy-mid); padding: 52px 20px; }
.section-inner { max-width: 820px; margin: 0 auto; }

.sec-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 0.25em; color: var(--gold); margin-bottom: 8px; }
.sec-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 700; line-height: 1.15; margin-bottom: 14px;
}
.sec-title.on-dark { color: var(--white); }
.sec-title.on-light { color: var(--navy); }

.sec-divider {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 28px;
}
.sec-divider-line { flex: 1; height: 1px; background: rgba(201,169,110,0.25); }
.sec-divider-diamond { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }

/* Mission items */
.mission-item {
    padding: 0 0 0 16px;
    border-left: 2px solid var(--gold);
    margin-bottom: 22px;
}
.mission-item:last-child { margin-bottom: 0; }
.mission-item h3 { font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 5px; font-family: var(--font-sans); }
.mission-item p  { font-size: 13.5px; color: #4B5563; line-height: 1.7; }
.section-light .mission-item h3 { color: var(--navy); }
.section-dark  .mission-item h3 { color: var(--white); }
.section-dark  .mission-item p  { color: rgba(255,255,255,0.6); }
.section-dark  .mission-item    { border-color: var(--gold); }

/* Horaires table */
.hor-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.hor-table tr { border-bottom: 1px solid rgba(255,255,255,0.07); }
.hor-table td { padding: 11px 0; font-size: 13.5px; color: rgba(255,255,255,0.75); }
.hor-table td:last-child { text-align: right; color: var(--gold-light); font-weight: 500; }

/* Contact form */
.contact-form { margin-top: 20px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%; padding: 12px 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(201,169,110,0.2);
    border-radius: var(--radius);
    color: rgba(255,255,255,0.85);
    font-family: var(--font-sans); font-size: 13.5px;
    outline: none; transition: border-color var(--ease);
    -webkit-appearance: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.25); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: rgba(201,169,110,0.55); }
.contact-form textarea { resize: vertical; min-height: 105px; }
.contact-form select option { background: var(--navy); }
.btn-submit {
    width: 100%; background: var(--gold); color: var(--navy);
    border: none; padding: 14px 20px; border-radius: var(--radius);
    font-family: var(--font-sans); font-size: 12px; font-weight: 700;
    letter-spacing: 0.12em; cursor: pointer; margin-top: 4px;
    transition: background var(--ease);
}
.btn-submit:hover { background: var(--gold-light); }
#contact-feedback {
    display: none; padding: 10px 14px; border-radius: var(--radius);
    font-size: 13px; margin-bottom: 12px;
}

/* WhatsApp float */
#wa-float {
    position: fixed; bottom: 24px; right: 18px;
    width: 52px; height: 52px;
    background: #25D366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(37,211,102,0.35);
    transition: transform var(--ease);
}
#wa-float:hover { transform: scale(1.08); }
#wa-float svg { width: 28px; height: 28px; fill: white; }

/* Footer */
#colophon {
    background: var(--navy-card);
    border-top: 1px solid var(--gold-border);
    padding: 32px 20px 24px; text-align: center;
}
.footer-name { font-family: var(--font-serif); font-size: 20px; color: var(--white); margin-bottom: 8px; }
.footer-legal { font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.7; margin-bottom: 16px; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { font-size: 11.5px; color: rgba(255,255,255,0.4); transition: color var(--ease); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
    font-size: 11px; color: rgba(255,255,255,0.2);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 16px; margin-top: 0;
}

/* ============================================================
   DESKTOP ≥ 768px
   ============================================================ */
@media (min-width: 768px) {
    :root { --topbar-h: 40px; --header-h: 68px; }
    #site-topbar { padding: 0 40px; }
    #masthead { padding: 0 40px; }
    .menu-toggle { display: none; }
    .nav-drawer { display: none !important; }
    #site-navigation {
        display: flex; align-items: center; gap: 4px;
    }
    #site-navigation ul {
        list-style: none; display: flex; gap: 0; align-items: center;
    }
    #site-navigation ul li a {
        font-size: 12px; font-weight: 500; letter-spacing: 0.05em;
        color: rgba(255,255,255,0.65); padding: 8px 15px;
        border-radius: var(--radius);
        transition: color var(--ease), background var(--ease);
        white-space: nowrap;
    }
    #site-navigation ul li a:hover { color: var(--gold); background: rgba(201,169,110,0.07); }
    .lang-desktop-wrap {
        display: flex; gap: 5px; margin-left: 16px; padding-left: 16px;
        border-left: 1px solid var(--gold-border);
    }
    #vcard-cover { padding: 60px 40px 0; }
    .cover-name { font-size: 58px; }
    #action-zone { padding: 28px 40px 22px; }
    .actions-row .btn-action { padding: 16px 12px; }
    #info-list .info-row { padding: 16px 40px; }
    #map-preview { margin: 12px 40px 20px; height: 180px; }
    .scroll-more { padding: 16px 40px 26px; }
    .section-dark, .section-light, .section-mid { padding: 72px 40px; }
    .contact-form .form-row { grid-template-columns: 1fr 1fr; }
    #colophon { padding: 40px 40px 28px; }
}

/* ============================================================
   RTL — Arabic
   ============================================================ */
html[dir="rtl"] #site-topbar    { flex-direction: row-reverse; }
html[dir="rtl"] .topbar-hours   { text-align: left; }
html[dir="rtl"] .site-logo-wrap { flex-direction: row-reverse; }
html[dir="rtl"] .mission-item   { border-left: none; border-right: 2px solid var(--gold); padding: 0 16px 0 0; }
html[dir="rtl"] .info-row       { flex-direction: row-reverse; }
html[dir="rtl"] .hor-table td:last-child { text-align: left; }
html[dir="rtl"] .cover-pills    { flex-direction: row-reverse; }
