/* algharbtech - light theme built on the brand palette (Ink / Steel / Mist / Paper) */
:root {
    --ink: #14213d;
    --steel: #3a7ca5;
    --steel-text: #2e6b91;   /* Steel darkened for small text: 5:1 contrast on Paper */
    --mist: #d6e0ea;
    --paper: #f4f6f9;
    --paper-alt: #e9eef4;
    --muted: #5c6b7a;
    --white: #ffffff;
    --line: rgba(20, 33, 61, 0.1);
    --radius: 12px;
    --max: 72rem;
    --header-h: 4.5rem;
    --track: 0.14em;
    --tt: uppercase;
    --font-latin: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-arabic: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* L'arabe ne supporte ni l'espacement de lettres ni les capitales */
:root[lang="ar"] {
    --track: 0;
    --tt: none;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-latin);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

:root[lang="ar"] body {
    font-family: var(--font-arabic);
    line-height: 1.85;
}

a { color: inherit; }
svg { display: block; }

:focus-visible {
    outline: 2px solid var(--steel-text);
    outline-offset: 3px;
    border-radius: 4px;
}

.container { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 200;
    background: var(--ink);
    color: var(--white);
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 100;
    background: rgba(244, 246, 249, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding-block: 0.6rem;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; direction: ltr; line-height: 0; }
.nav-logo img { display: block; height: 2.1rem; width: auto; }
.nav-logo .logo-mark { display: none; }
@media (max-width: 26rem) {
    .header-inner { gap: 0.4rem 0.6rem; }
    .nav-logo img { height: 1.4rem; }
    .lang-switch a { min-width: 2.2rem; padding: 0 0.4rem; font-size: 0.8rem; }
}

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; list-style: none; gap: 1.75rem; }
.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding-block: 0.7rem;
    transition: color 0.25s;
}
.main-nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-switch {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50px;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 2.75rem;
    min-height: 2.25rem;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 50px;
    background: transparent;
    color: var(--ink);
    font: 600 0.85rem/1 var(--font-latin);
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}
.lang-switch a[lang="ar"] { font-family: var(--font-arabic); }
.lang-switch a:hover { color: var(--steel-text); }
.lang-switch a[aria-current="page"] {
    background: var(--ink);
    color: var(--white);
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.7rem 1.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid var(--ink);
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(20, 33, 61, 0.25); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: rgba(20, 33, 61, 0.06); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.contact-box .contact-actions .btn-primary { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.contact-box .contact-lines { margin: 1.5rem auto 0; }
.contact-lines .contact-mail { margin-top: 0; }
.contact-lines > span { color: rgba(255, 255, 255, 0.4); }
.footer-link { color: inherit; text-decoration: none; unicode-bidi: isolate; }
.footer-link:hover { color: var(--white); }
.contact-mail { display: inline-block; margin-top: 1.25rem; color: var(--mist); text-decoration: none; direction: ltr; unicode-bidi: isolate; transition: color 0.25s; }
.contact-mail:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero {
    min-height: 85vh;
    min-height: 85svh;
    display: flex;
    align-items: center;
    padding-block: calc(var(--header-h) + 3rem) 4rem;
}

.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 4rem; }
.hero-content { max-width: 44rem; }
.hero-panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; box-shadow: 0 10px 28px rgba(20, 33, 61, 0.06); display: grid; gap: 0; }
.hero-panel .eyebrow { margin-bottom: 0.25rem; }
.hero-offer { display: flex; align-items: center; gap: 1rem; padding: 0.8rem; border: 1px solid transparent; border-radius: 10px; text-decoration: none; transition: background 0.25s, border-color 0.25s; }
.hero-offer:hover { background: var(--paper); border-color: rgba(58, 124, 165, 0.35); }
.hero-offer:focus-visible { background: var(--paper); border-color: var(--steel); }
.hero-offer .card-icon { margin-bottom: 0; flex: none; }
.hero-offer-text { display: grid; gap: 0.15rem; }
.hero-offer-text strong { color: var(--ink); font-size: 1rem; line-height: 1.35; }
.hero-offer-text span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 62rem) { .hero-grid { grid-template-columns: 1fr; } .hero-panel { display: none; } }

.eyebrow {
    color: var(--steel-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: var(--track);
    text-transform: var(--tt);
}
.hero .eyebrow { margin-bottom: 1rem; }

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--ink);
    margin-bottom: 1.5rem;
    max-width: 15em;
    text-wrap: balance;
}
:root[lang="ar"] .hero-title { line-height: 1.4; font-size: clamp(2rem, 4.6vw, 3rem); }
.hero-title span { color: var(--steel); }

.hero-desc {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 40rem;
    margin-bottom: 2.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }



/* ---------- Sections ---------- */
.section { padding-block: 6rem; }
.section-alt {
    --muted: #51606f;
    background: var(--paper-alt);
    border-block: 1px solid var(--line);
}

.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 {
    font-size: clamp(1.75rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    margin-top: 0.5rem;
}

.service-groups { display: grid; gap: 3rem; }
.group-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
    color: var(--steel-text);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: var(--track);
    text-transform: var(--tt);
}
.group-title::after { content: ''; flex: 1; border-top: 1px solid rgba(20, 33, 61, 0.14); }
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    padding: 2.25rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.service-card:hover {
    border-color: var(--steel);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 33, 61, 0.1);
}

.service-card { display: flex; flex-direction: column; position: relative; overflow: hidden; }
.service-card::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--steel), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}
.service-card:hover::before { opacity: 1; }
:root[dir="rtl"] .service-card::before { background: linear-gradient(270deg, var(--steel), transparent); }

.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.card-top .card-icon { margin-bottom: 0; }
.card-num {
    font: 300 2.25rem/1 var(--font-latin);
    color: rgba(20, 33, 61, 0.18);
    letter-spacing: -0.03em;
    direction: ltr;
}

.service-list { list-style: none; display: grid; gap: 1.1rem; margin-top: 0.25rem; }
.service-list li { padding-inline-start: 1rem; border-inline-start: 2px solid rgba(58, 124, 165, 0.3); transition: border-color 0.25s; }
.service-card:hover .service-list li { border-color: var(--steel); }
.service-list h5 { color: var(--ink); font-size: 0.98rem; font-weight: 700; line-height: 1.4; }
.service-list summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    list-style: none;
    cursor: pointer;
    border-radius: 4px;
}
.service-list summary::-webkit-details-marker { display: none; }
.service-list summary::after { content: '+'; color: var(--steel-text); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.service-list details[open] summary::after { content: '\2212'; }
.service-list details > p { margin-top: 0.45rem; font-size: 0.9rem; line-height: 1.6; }

@media (min-width: 64rem) {
    .service-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .service-cards--1 .service-list { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem 2rem; }
}

.card-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    margin-bottom: 1.25rem;
    color: var(--steel-text);
    background: rgba(58, 124, 165, 0.08);
    border: 1px solid rgba(58, 124, 165, 0.25);
    border-radius: 10px;
}
.card-icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.service-card h4 { color: var(--ink); font-size: 1.2rem; margin-bottom: 0.75rem; font-weight: 700; }
.service-card p { color: var(--muted); font-size: 0.95rem; }

/* Approche */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; }
.step { position: relative; }
.step-num {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    margin-bottom: 1.1rem;
    border-radius: 50%;
    border: 1px solid var(--steel);
    background: var(--white);
    color: var(--steel-text);
    font: 700 1.1rem/1 var(--font-latin);
    position: relative;
    z-index: 1;
}
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    inset-inline-start: 3.5rem;
    width: calc(100% - 3.5rem + 1.5rem - 0.5rem);
    border-top: 1px dashed rgba(20, 33, 61, 0.22);
}
.step h3 { color: var(--ink); font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* À propos */
.about-lead {
    max-width: 46rem;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
}
.pillars { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.5rem; }
.pillar { padding: 1.5rem; border-inline-start: 2px solid var(--steel); background: var(--white); border-radius: 0 var(--radius) var(--radius) 0; }
:root[dir="rtl"] .pillar { border-radius: var(--radius) 0 0 var(--radius); }
.pillar h3 { color: var(--ink); font-size: 1.1rem; margin-bottom: 0.4rem; }
.pillar p { color: var(--muted); font-size: 0.95rem; }

/* Contact */
.contact-box {
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-radius: 12px;
    background: var(--ink);
}
.contact-box h2 { color: var(--white); font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 800; margin-bottom: 0.75rem; }
.contact-box p { color: rgba(255, 255, 255, 0.78); max-width: 36rem; margin: 0 auto 1.75rem; }
.contact-box .btn-primary { background: var(--white); color: var(--ink); border-color: var(--white); }
.contact-box .btn-primary:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }

/* ---------- Footer ---------- */
.site-footer {
    padding-block: 2.5rem;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}
.footer-logo { display: block; height: 1.7rem; width: auto; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }

/* ---------- Animation du logo : les pixels apparaissent un à un ---------- */
.px { animation: px-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: calc(0.35s + var(--i) * 0.14s); }
.band { animation: px-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) both; animation-delay: 0.15s; }
@keyframes px-in { from { opacity: 0; transform: translateY(-2px); } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 62rem) {
}

@media (max-width: 62rem) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step:nth-child(2)::after { display: none; }
}

@media (max-width: 48rem) {
    :root { --header-h: 7.5rem; }
    .header-inner { justify-content: space-between; }
    .main-nav { order: 3; width: 100%; margin: 0; }
    .main-nav ul { justify-content: center; gap: 1.5rem; }
    .steps { grid-template-columns: 1fr; }
    .step::after { display: none; }
    .section { padding-block: 4rem; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-logo { margin-inline: auto; }
}

.service-list li + li { padding-top: 0.6rem; border-top: 1px solid var(--line); }
.about-lead { margin-top: -1.5rem; }
:root[lang="ar"] .eyebrow, :root[lang="ar"] .group-title { font-size: 1rem; }

/* Alignment fixes: grid lists have no stacked dividers; card titles reserve two lines on desktop */
.service-cards--1 .service-list li + li { padding-top: 0; border-top: 0; }
@media (min-width: 64rem) {
    .service-cards--3 .service-card h4 { min-height: 2lh; }
}

.footer-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.25rem 1.5rem; }
@media (max-width: 48rem) { .footer-meta { justify-content: center; } }

.footer-copy { order: 3; flex-basis: 100%; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.85rem; }
.footer-meta { order: 2; margin-inline-start: auto; }
@media (max-width: 48rem) { .footer-meta { margin-inline-start: 0; flex-direction: column; } }
@media (max-width: 48rem) { .contact-box .contact-lines { display: grid; gap: 0.35rem; } .contact-lines > span { display: none; } }
