/* =========================================================================
   AKRAM ASSURANCE — Feuille de style principale (v2 — style corporate)
   Agent Général Wafa Assurance — Ait Melloul, Agadir
   Inspiré de la structure du site Wafa Assurance, marque Akram Assurance.
   ========================================================================= */

/* ---------- 1. VARIABLES & COULEURS DE MARQUE ---------- */
:root {
  --green:       #2e9b48;
  --green-dark:  #237a39;
  --green-soft:  #eef6f0;
  --orange:      #f39a1e;
  --orange-dark: #d9851a;
  --navy:        #1f1d2b;
  --white:       #ffffff;
  --light:       #f7f8f7;
  --ink:         #1a1a1a;
  --muted:       #5d6470;
  --border:      #e7e9e7;
  --shadow:      0 4px 14px rgba(20, 20, 20, .06);
  --shadow-lift: 0 10px 26px rgba(20, 20, 20, .12);
  --radius:      6px;      /* coins sobres, corporate (moins arrondis) */
  --radius-sm:   4px;
  --maxw:        1180px;
  --header-h:    72px;
}

/* ---------- 2. BASE / RESET ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  /* Police corporate, lisible et neutre */
  font-family: Arial, Helvetica, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section-title {
  text-align: center;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  color: var(--ink);
  margin: 0 auto .35em;
  font-weight: 700;
}
.section-title + .section-subtitle {
  text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 2.6rem;
}
section { padding: 70px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- 3. BOUTONS & UTILITAIRES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .92rem; cursor: pointer;
  border: 2px solid transparent; transition: all .18s ease; line-height: 1;
}
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; color: var(--green-dark); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-white { background: #fff; color: var(--green-dark); border-color: #fff; }
.btn-white:hover { background: rgba(255,255,255,.88); }
.btn-sm { padding: 9px 18px; font-size: .82rem; }

.bg-light { background: var(--light); }

.ico { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 4. BARRE SUPÉRIEURE (TOP BAR) — très fine ---------- */
.topbar { background: var(--light); border-bottom: 1px solid var(--border); font-size: .78rem; color: #555; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.topbar-left, .topbar-right { display: flex; align-items: center; }
.topbar-left a, .topbar-right a, .topbar-right span { padding: 6px 12px; border-left: 1px solid var(--border); white-space: nowrap; }
.topbar-left a:first-child { border-left: 0; padding-left: 0; }
.topbar-left a:hover, .topbar-right a:hover { color: var(--green); }
.topbar-right .lang { font-weight: 700; }
.topbar-right .tb-phone { color: var(--green-dark); font-weight: 700; }

/* ---------- 5. EN-TÊTE PRINCIPAL ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 6px rgba(0,0,0,.04); position: sticky; top: 0; z-index: 1000; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { height: 50px; width: auto; }
.brand-logo-fallback .mark { width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
/* séparateur vertical fin entre logo et tagline */
.brand-text { display: flex; flex-direction: column; justify-content: center; padding-left: 14px; border-left: 1px solid var(--border); }
.brand-text .name { font-weight: 800; font-size: 1.02rem; color: var(--ink); line-height: 1.05; letter-spacing: -.01em; }
.brand-text .name .ar { color: var(--green); font-weight: 700; }
.brand-text .tagline { font-size: .72rem; color: var(--muted); margin-top: 2px; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; }
.main-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 6px; font-weight: 600; font-size: .94rem; color: var(--ink); border-bottom: 2px solid transparent; transition: color .18s, border-color .18s; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--green-dark); border-bottom-color: var(--green); }
.main-nav a .ico { width: 19px; height: 19px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; padding: 9px; border-radius: var(--radius-sm); }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. HERO ---------- */
.hero { background: #fff; padding: 44px 0 50px; }
.hero-grid { display: grid; grid-template-columns: 54% 46%; align-items: center; gap: 38px; }

.hero-media { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 470px; background: var(--green-dark); box-shadow: var(--shadow); }
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* voile vert/orange + assombrissement bas pour lisibilité du texte */
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(31,29,43,.20) 0%, rgba(31,29,43,.05) 35%, rgba(31,29,43,.62) 100%),
    linear-gradient(120deg, rgba(46,155,72,.45), rgba(243,154,30,.18) 80%);
}

/* logo sur l'image, en haut à gauche (pastille blanche) */
.hero-logo { position: absolute; top: 16px; left: 16px; z-index: 3; display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.94); padding: 7px 14px 7px 8px; border-radius: 40px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.hero-logo img { height: 34px; width: auto; }
.hero-logo span { font-weight: 800; font-size: .92rem; color: var(--ink); }

/* bandeau promotionnel (texte campagne) en bas de l'image */
.hero-promo { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 3; color: #fff; }
.hero-promo .hp-brand { font-size: 1.7rem; font-weight: 800; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hero-promo .hp-sub { font-size: 1.05rem; font-weight: 600; margin-top: 4px; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero-promo .hp-tags { font-size: .85rem; margin-top: 8px; font-weight: 600; letter-spacing: .02em; }
.hero-promo .hp-tags b { color: var(--orange); font-weight: 800; }

/* boîte verte de contact — rectangulaire, vert fort, sur l'image */
.quick-box { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 4; background: var(--green); color: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; box-shadow: var(--shadow-lift); width: 196px; overflow: hidden; }
.quick-box a { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,.20); color: #fff; font-size: .86rem; font-weight: 600; line-height: 1.25; }
.quick-box a:last-child { border-bottom: 0; }
.quick-box a:hover { background: var(--green-dark); }
.quick-box .ico { stroke: #fff; width: 22px; height: 22px; flex: 0 0 auto; }

.hero-content { padding-right: 6px; }
.hero-content h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); color: var(--ink); }
.hero-content .lead { color: var(--muted); font-size: 1.04rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-partner { margin-top: 18px; font-size: .85rem; color: var(--muted); }
.hero-partner strong { color: var(--green-dark); }

.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.hero-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: #d6dbd7; }
.hero-dots .dot.active { background: var(--green); width: 22px; border-radius: 5px; }

/* ---------- 7. HELP CARDS — plates et sobres ---------- */
.help-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.help-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 18px 26px; text-align: center; transition: transform .18s, box-shadow .18s, border-color .18s; }
.help-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: #d6e6da; }
/* icône en trait fin, fond très léger et petit (pas de gros disque) */
.help-card .icon-wrap { width: 54px; height: 54px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); }
.help-card .icon-wrap .ico { width: 28px; height: 28px; stroke-width: 1.6; }
.help-card h3 { font-size: .98rem; color: var(--ink); margin: 0; font-weight: 700; }

/* ---------- 8. PRODUITS / ASSURANCES ---------- */
.products { position: relative; }
.carousel { position: relative; }
.carousel-track-wrap { overflow: hidden; }
.carousel-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; transition: transform .35s ease; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.product-card .pimg { height: 180px; background: linear-gradient(135deg, var(--green), var(--green-dark)); background-size: cover; background-position: center; }
.product-card .pbody { padding: 22px 22px 26px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 1.18rem; color: var(--ink); }
/* descriptions plus grandes et plus foncées */
.product-card p { color: #444b54; font-size: .96rem; flex: 1; margin-bottom: 1.2em; }
.product-card .btn { margin: 0 auto; }

.carousel-arrow { position: absolute; top: 44%; width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); z-index: 4; transition: background .18s; }
.carousel-arrow:hover { background: var(--green); }
.carousel-arrow:hover .ico { stroke: #fff; }
.carousel-arrow.prev { left: -10px; }
.carousel-arrow.next { right: -10px; }

.carousel-dots { display: flex; gap: 9px; justify-content: center; margin-top: 30px; }
.carousel-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: #d6dbd7; cursor: pointer; border: 0; padding: 0; transition: width .2s, background .2s; }
.carousel-dots .dot.active { background: var(--green); width: 22px; border-radius: 5px; }

/* ---------- 9. POURQUOI CHOISIR — icônes plus grandes, séparateurs ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.why-col { text-align: center; padding: 14px 40px; border-left: 1px solid var(--border); }
.why-col:first-child { border-left: 0; }
.why-col .why-ico { width: 88px; height: 88px; margin: 0 auto 20px; display: grid; place-items: center; }
.why-col .why-ico .ico { width: 64px; height: 64px; stroke: var(--green); stroke-width: 1.4; }
.why-col:nth-child(2) .why-ico .ico { stroke: var(--orange); }
.why-col h3 { font-size: 1.12rem; color: var(--ink); }
.why-col p { color: var(--muted); font-size: .94rem; }

/* ---------- 10. BANNIÈRE PROMO — large, vert→orange ---------- */
.app-banner .container { max-width: 1180px; }
.promo-banner {
  background: linear-gradient(100deg, var(--green-dark) 0%, var(--green) 42%, var(--orange) 105%);
  border-radius: var(--radius); color: #fff; overflow: hidden;
  display: grid; grid-template-columns: 38% 62%; align-items: center; box-shadow: var(--shadow-lift);
}
.promo-visual { padding: 34px 24px; display: grid; place-items: center; min-height: 230px; }
.promo-card { width: 188px; background: #fff; border-radius: var(--radius); padding: 24px 18px; text-align: center; color: var(--ink); box-shadow: 0 16px 38px rgba(0,0,0,.28); transform: rotate(-3deg); }
.promo-card .pc-logo { height: 70px; margin: 0 auto 10px; width: auto; }
.promo-card .pc-logo-fallback { width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 10px; background: #fff; border: 3px solid var(--orange); color: var(--green); display: grid; place-items: center; font-weight: 800; }
.promo-card strong { font-size: .98rem; }
.promo-card small { color: var(--muted); }
.promo-text { padding: 38px 44px 38px 12px; }
.promo-text h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); color: #fff; }
.promo-text p { color: rgba(255,255,255,.94); margin-bottom: 1.1em; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.promo-actions .btn { padding: 10px 18px; font-size: .85rem; }

/* ---------- 11. SUPPORT ---------- */
.support { position: relative; }
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.support-intro h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.support-intro p { color: var(--muted); max-width: 460px; }
.support-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 26px; }
.support-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; transition: transform .18s, box-shadow .18s; }
.support-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.support-card .ico-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; flex: 0 0 auto; }
.support-card .ico-circle .ico { width: 23px; height: 23px; }
.support-card h4 { margin: 0 0 2px; font-size: .96rem; }
.support-card span { font-size: .84rem; color: var(--muted); }
.support-media { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 380px; background: var(--green-dark); box-shadow: var(--shadow); }
.support-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* boîte verte de contact réutilisée, superposée à l'image de droite */
.support .quick-box { left: -18px; top: 38px; transform: none; }

/* ---------- 12. CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: start; }
.contact-info ul { list-style: none; padding: 0; margin: 0 0 22px; }
.contact-info li { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-info li .ico { flex: 0 0 auto; margin-top: 2px; }
.contact-info li strong { display: block; }
.contact-info li span, .contact-info li a { color: var(--muted); }
.contact-info .hours { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.contact-info .hours strong { color: var(--green-dark); }

.contact-map { margin-top: 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; background: var(--green-soft); }
.contact-map iframe { display: block; width: 100%; height: 230px; border: 0; }
/* libellé visible (jamais de rectangle vide) */
.contact-map .map-caption { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(31,29,43,.78); color: #fff; font-size: .82rem; padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.contact-map .map-caption .ico { stroke: #fff; width: 18px; height: 18px; }
/* repli sans iframe : bloc stylé avec texte */
.map-fallback { min-height: 230px; display: grid; place-items: center; text-align: center; color: var(--green-dark); padding: 20px; background: repeating-linear-gradient(45deg, var(--green-soft), var(--green-soft) 14px, #e6f1ea 14px, #e6f1ea 28px); }
.map-fallback .ico { stroke: var(--green-dark); width: 36px; height: 36px; margin: 0 auto 10px; }

.contact-form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.contact-form-card h3 { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: var(--light); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.field textarea { min-height: 118px; resize: vertical; }

/* ---------- 13. PIED DE PAGE ---------- */
.site-footer { background: var(--navy); color: #c7c9d2; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand .flogo { height: 76px; margin-bottom: 14px; width: auto; }
.footer-brand .name { color: #fff; font-weight: 800; font-size: 1.15rem; }
.footer-brand .name .ar { color: var(--green); }
.footer-brand .tagline { color: #898b98; font-size: .82rem; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .98rem; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 11px; }
.footer-col a { color: #c7c9d2; font-size: .88rem; }
.footer-col a:hover { color: var(--green); }
.social { display: flex; gap: 10px; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.07); display: grid; place-items: center; transition: background .18s; }
.social a:hover { background: var(--green); }
.social .ico { stroke: var(--green); width: 19px; height: 19px; }
.social a:hover .ico { stroke: #fff; }

.footer-bottom { margin-top: 52px; border-top: 1px solid rgba(255,255,255,.09); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .8rem; }
.footer-bottom a { color: #898b98; margin-right: 18px; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .credit { color: #898b98; }
.footer-bottom .credit strong { color: #fff; }

.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--green); border: 0; cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow-lift); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s; z-index: 1200; }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top .ico { stroke: #fff; width: 22px; height: 22px; }

/* ---------- 14. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .help-cards { grid-template-columns: repeat(2, 1fr); }
  .carousel-track { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .carousel-arrow.prev { left: 2px; } .carousel-arrow.next { right: 2px; }
}
@media (max-width: 900px) {
  .topbar { display: none; }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); max-height: 0; overflow: hidden; transition: max-height .3s ease; }
  .main-nav.open { max-height: 70vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { padding: 14px 8px; border-bottom: 1px solid var(--border); }

  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-media { order: -1; min-height: 340px; }
  /* Sur mobile, on masque la boîte du hero (présente aussi dans la section support) */
  .hero-media .quick-box { display: none; }
  .hero-promo .hp-sub, .hero-promo .hp-tags { font-size: .9rem; }

  .promo-banner { grid-template-columns: 1fr; }
  .promo-text { padding: 12px 28px 36px; text-align: center; }
  .promo-actions { justify-content: center; }

  .support-grid { grid-template-columns: 1fr; }
  .support .quick-box { position: static; transform: none; width: 100%; border-radius: var(--radius-sm); margin-bottom: 22px; display: grid; grid-template-columns: 1fr 1fr 1fr; left: 0; }
  .support .quick-box a { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.2); justify-content: center; text-align: center; flex-direction: column; gap: 6px; }
  .support .quick-box a:last-child { border-right: 0; }
  .support-media { order: -1; min-height: 300px; }

  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  section { padding: 50px 0; }
  .help-cards { grid-template-columns: 1fr; }
  .carousel-track { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .why-col { border-left: 0; border-top: 1px solid var(--border); padding: 28px 10px; }
  .why-col:first-child { border-top: 0; }
  .support-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .support .quick-box { grid-template-columns: 1fr; }
  .support .quick-box a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); flex-direction: row; }
  .hero-actions .btn, .promo-actions .btn { flex: 1 1 100%; }
  .hero-promo .hp-brand { font-size: 1.35rem; }
  .footer-bottom .container { flex-direction: column; }
}
