/*
Theme Name: Cabinet ABOUZZOHOUR
Theme URI: https://lightgrey-giraffe-966918.hostingersite.com/zohour/
Author: Just Media
Description: Theme sur mesure du Cabinet Batonnier Omar ABOUZZOHOUR, avocat a Marrakech. Conversion fidele du site statique.
Version: 1.3.15
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abouzzohour
*/

/* ── Floating contact button (shared) ── */

    .fab-wrap {
      position: fixed;
      bottom: 32px;
      right: 32px;
      z-index: 9000;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 12px;
    }
    .fab-children {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 10px;
      transition: opacity 0.25s ease, transform 0.25s ease;
      opacity: 0;
      transform: translateY(12px) scale(0.95);
      pointer-events: none;
    }
    .fab-wrap.open .fab-children {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }
    .fab-child {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      background: var(--white);
      border-radius: 50px;
      padding: 10px 18px 10px 14px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      font-family: 'Inter', sans-serif;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--navy);
      transition: transform 0.18s ease, box-shadow 0.18s ease;
      white-space: nowrap;
    }
    .fab-child:hover {
      transform: translateX(-4px);
      box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    }
    .fab-child-icon {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .fab-child.whatsapp .fab-child-icon { background: #25D366; }
    .fab-child.phone    .fab-child-icon { background: var(--gold); }
    .fab-main {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: var(--gold);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 20px rgba(184,151,74,0.45);
      transition: transform 0.25s ease, background 0.2s ease;
      color: #fff;
    }
    .fab-main:hover { transform: scale(1.08); }
    .fab-wrap.open .fab-main { background: var(--navy); }
    .fab-main .fab-icon-phone { display: block; }
    .fab-main .fab-icon-close { display: none; }
    .fab-wrap.open .fab-main .fab-icon-phone { display: none; }
    .fab-wrap.open .fab-main .fab-icon-close { display: block; }
    @media (max-width: 600px) {
      .fab-wrap { bottom: 20px; right: 20px; }
    }
  

/* ── WordPress integration ── */
.nav-links li.current-menu-item > a,
.nav-links li.current_page_item > a,
.nav-links li.current-menu-parent > a {
  color: var(--navy);
  font-weight: 600;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.nav-links li.current-menu-item > a.nav-cta,
.nav-links li.current_page_item > a.nav-cta { border-bottom: none; padding-bottom: 10px; color: #fff; }

/* The "nav-cta" flag class also lands on the <li> (used to detect the CTA item);
   keep the gold button styling on the <a> only, so it doesn't render a box-in-a-box. */
.nav-links li.nav-cta {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ── Language switcher (EN · FR · AR) — dropdown ── */
.nav-cluster { display: flex; align-items: center; gap: 20px; }
.lang-switch { position: relative; }
.lang-switch .flag {
  height: 15px;
  width: auto;
  display: block;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

/* Trigger */
.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.lang-current:hover { border-color: var(--gold); }
.lang-current .chevron { color: var(--muted); transition: transform 0.2s ease; }
.lang-switch.is-open .lang-current { border-color: var(--gold); background: var(--gold-light); }
.lang-switch.is-open .lang-current .chevron { transform: rotate(180deg); }

/* Menu */
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1200;
}
.lang-switch.is-open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { width: 100%; }
.lang-menu .lang-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-menu .lang-opt:hover { background: var(--gold-light); color: var(--navy); }
.lang-menu .lang-opt.is-active { background: var(--gold-light); color: var(--gold-dark); font-weight: 600; }
.lang-menu .lang-opt[lang="ar"] span { direction: rtl; }

/* Mobile menu (the static site shipped a toggle with no behaviour) */
@media (max-width: 768px) {
  .nav-inner { position: relative; }
  .nav-links.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 14px 20px 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-top: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.is-open li { width: 100%; }
  .nav-links.is-open li a { display: block; padding: 10px 0; width: 100%; }
  .nav-links.is-open li a.nav-cta { display: inline-flex; margin-top: 6px; }
  .nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-toggle span { transition: transform .25s ease, opacity .2s ease; }

  /* Switcher sits left of the hamburger on mobile */
  .nav-inner { padding: 0 16px; }
  .nav-cluster { gap: 12px; }
  .lang-switch { order: -1; }
}

/* WP core alignment / caption classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100000; background: #fff;
  color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
img { max-width: 100%; height: auto; }
textarea { max-width: 100%; box-sizing: border-box; }

/* Contact form feedback */
.form-feedback { margin-top: 14px; padding: 12px 16px; border-radius: 10px; font-size: .9rem; line-height: 1.5; }
.form-feedback.is-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-feedback.is-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.form-group .field-error { display: block; margin-top: 6px; font-size: .8rem; color: #B91C1C; }

/* Pagination */
.abz-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; flex-wrap: wrap; }
.abz-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--white); color: var(--navy);
  text-decoration: none; font-size: .9rem; font-weight: 600; transition: all .2s ease;
}
.abz-pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold-dark); }
.abz-pagination .page-numbers.current { background: var(--gold); border-color: var(--gold); color: #fff; }

/* Editor content inside articles */
.article-content img { border-radius: 12px; margin: 20px 0; }
.article-content blockquote { margin: 24px 0; padding-left: 20px; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; }

/* Contact block: several phone numbers, one tappable row each */
.abz-phone-lines { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.abz-phone-line { display: block; }

/* Two-class selectors throughout: the page bundles style .contact-item-body a
   and .contact-item-body span, which outrank a lone class. */
.abz-phone-lines .abz-phone-num {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px; margin-inline-start: -10px;
  border-radius: 12px; text-decoration: none;
  transition: background-color .2s ease;
}
.abz-phone-lines .abz-phone-num:hover,
.abz-phone-lines .abz-phone-num:focus-visible {
  background: var(--gold-light);
}

.abz-phone-lines .abz-phone-ico {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold-light); color: var(--gold);
  border: 1px solid rgba(184, 151, 74, .18);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.abz-phone-lines .abz-phone-num:hover .abz-phone-ico,
.abz-phone-lines .abz-phone-num:focus-visible .abz-phone-ico {
  background: var(--gold); color: #fff; border-color: var(--gold);
}
.abz-phone-lines .abz-phone-ico svg { display: block; }

.abz-phone-lines .abz-phone-text { display: flex; flex-direction: column; min-width: 0; }
.abz-phone-lines .abz-phone-digits {
  font-size: .95rem; font-weight: 600; line-height: 1.35;
  color: var(--navy); letter-spacing: .01em;
  transition: color .2s ease;
}
.abz-phone-lines .abz-phone-num:hover .abz-phone-digits,
.abz-phone-lines .abz-phone-num:focus-visible .abz-phone-digits { color: var(--gold-dark); }
.abz-phone-lines .abz-phone-who {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: .75rem; line-height: 1.4; color: var(--muted);
  letter-spacing: .02em; margin-top: 2px;
}
.abz-phone-lines .abz-phone-wa {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px 1px 6px; border-radius: 999px;
  background: rgba(37, 211, 102, .12); color: #128C4B;
  font-size: .68rem; font-weight: 600; letter-spacing: .01em;
}
.abz-phone-lines .abz-phone-wa svg { display: block; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .abz-phone-lines .abz-phone-num,
  .abz-phone-lines .abz-phone-ico,
  .abz-phone-lines .abz-phone-digits { transition: none; }
}

/* ── Clickable map ──────────────────────────────────────────────────────
   A Google Maps embed swallows every pointer event, so the click target is
   an anchor layered on top of the iframe: tapping anywhere on the map opens
   Google Maps directions in a new tab. This also stops the iframe hijacking
   touch-scroll on mobile. */
.abz-map { position: relative; }
.abz-map iframe { display: block; width: 100%; border: 0; }

.abz-map-link {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 14px; text-decoration: none;
  background: transparent;
  transition: background .25s ease;
}
.abz-map-link:hover,
.abz-map-link:focus-visible { background: rgba(26, 35, 64, .18); }
.abz-map-link:focus-visible { outline: 3px solid var(--gold, #B8974A); outline-offset: -3px; }

.abz-map-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--white, #fff); color: var(--navy, #1A2340);
  font-size: .78rem; font-weight: 600; line-height: 1; letter-spacing: .01em;
  box-shadow: 0 3px 14px rgba(15, 23, 42, .22);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.abz-map-badge svg { display: block; flex: none; }
.abz-map-link:hover .abz-map-badge,
.abz-map-link:focus-visible .abz-map-badge {
  background: var(--gold, #B8974A); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, .28);
}

/* Footer map is 130px tall — keep the badge proportional. */
.abz-map--sm .abz-map-link { padding: 8px; }
.abz-map--sm .abz-map-badge { padding: 6px 10px; gap: 5px; font-size: .68rem; }

@media (prefers-reduced-motion: reduce) {
  .abz-map-link, .abz-map-badge { transition: none; }
  .abz-map-link:hover .abz-map-badge,
  .abz-map-link:focus-visible .abz-map-badge { transform: none; }
}

/* ==========================================================================
   Contact form — animated confirmation card (v1.7.0)
   Rendered server-side in place of the form after a successful send, so the
   animations play on page load. Shared file: the form is on the front page too,
   and the --gold/--navy vars come from the per-page bundles, hence fallbacks.
   ========================================================================== */
/* Block, not flex: under CF7 the heading/intro are siblings of the card, and a
   flex row would lay them out beside it. The card centres its own content. */
.contact-form.is-sent { display: block; }

.abz-success {
  width: 100%;
  text-align: center;
  padding: 26px 20px 30px;
  animation: abzSuccessIn .55s cubic-bezier(.34, 1.56, .64, 1) both;
}

.abz-success-icon { width: 68px; height: 68px; margin: 0 auto 22px; }
.abz-success-icon svg { width: 100%; height: 100%; overflow: visible; display: block; }

.abz-success-circle {
  fill: none;
  stroke: var(--gold, #B8974A);
  stroke-width: 2.5;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: abzCircle .7s ease forwards .15s;
}

.abz-success-check {
  fill: none;
  stroke: var(--navy, #1A2340);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: abzCheck .35s ease forwards .75s;
}

@keyframes abzCircle { to { stroke-dashoffset: 0; } }
@keyframes abzCheck  { to { stroke-dashoffset: 0; } }

@keyframes abzSuccessIn {
  from { opacity: 0; transform: scale(.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes abzFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.abz-success-eyebrow {
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold, #B8974A);
  animation: abzFadeUp .4s ease both .9s;
}

.abz-success-title {
  margin: 0 0 12px;
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--navy, #1A2340);
  animation: abzFadeUp .4s ease both 1s;
}

.abz-success-msg {
  margin: 0 auto;
  max-width: 44ch;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted, #64748B);
  animation: abzFadeUp .4s ease both 1.1s;
}

.abz-success-tel {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 26px;
  border: 1px solid var(--gold, #B8974A);
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--gold-dark, #8A6E32);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
  animation: abzFadeUp .4s ease both 1.2s;
  direction: ltr;
}

.abz-success-tel:hover,
.abz-success-tel:focus-visible {
  background: var(--gold, #B8974A);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .abz-success,
  .abz-success-eyebrow,
  .abz-success-title,
  .abz-success-msg,
  .abz-success-tel { animation: none; }
  .abz-success-circle,
  .abz-success-check { animation: none; stroke-dashoffset: 0; }
  .abz-success-tel { transition: none; }
}

/* ==========================================================================
   Contact Form 7 compatibility (v1.8.0)
   The form template is authored with the theme's own .form-row/.form-group
   markup, so the existing field styles already apply to CF7's inputs. What is
   left is neutralising CF7's own wrappers and chrome.
   ========================================================================== */

/* CF7 wraps every control in an inline <span> — make it behave like the
   plain input it replaced. */
.wpcf7 .wpcf7-form-control-wrap { display: block; width: 100%; }

.wpcf7 .wpcf7-form-control { width: 100%; box-sizing: border-box; }
.wpcf7 .wpcf7-textarea { resize: vertical; min-height: 110px; }

/* The submit tag carries class:form-submit, so it inherits the theme button;
   only reset what CF7/UA styling adds. */
.wpcf7 .wpcf7-submit { width: 100%; -webkit-appearance: none; appearance: none; }

/* Validation */
.wpcf7 .wpcf7-not-valid { border-color: #DC2626 !important; }
.wpcf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: .8rem;
  color: #B91C1C;
}

/* Response banner — reuse the .form-feedback look */
.wpcf7 .wpcf7-response-output {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  background: #FEF2F2; color: #991B1B; border-color: #FECACA;
}
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  background: #FEF2F2; color: #991B1B; border-color: #FECACA;
}
.wpcf7 form.sent .wpcf7-response-output { display: none; }

/* Spinner sits next to the button rather than pushing the layout */
.wpcf7 .wpcf7-spinner { margin: 12px auto 0; display: block; }

/* RTL: CF7's tips and spinner follow the document direction */
html[dir="rtl"] .wpcf7 .wpcf7-not-valid-tip { text-align: right; }
