/* ==========================================================================
   Tunisie Innovation — lean public site design system
   Replaces mini.css (540KB) for all public-facing templates.
   ========================================================================== */

@font-face {
    font-family: 'Nunito Sans';
    src: url('../webfonts/nunito-sans-latin-400.woff2') format('woff2'),
    url('../webfonts/nunito-sans-latin-400.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('../webfonts/nunito-sans-latin-400italic.woff2') format('woff2'),
    url('../webfonts/nunito-sans-latin-400italic.woff') format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Sans';
    src: url('../webfonts/nunito-sans-latin-600.woff2') format('woff2'),
    url('../webfonts/nunito-sans-latin-600.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #172b85;
    --navy-dark: #101d5c;
    --orange: #ff5738;
    --orange-dark: #e6431f;
    --ink: #16182b;
    --text: #3a3d52;
    --text-muted: #6b6f8a;
    --line: #e6e7f0;
    --surface: #ffffff;
    --bg: #f6f7fb;
    --bg-dark: #10123a;

    --container: 1180px;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 10px 30px -12px rgba(23, 43, 133, .18);
    --shadow-sm: 0 4px 14px -6px rgba(23, 43, 133, .15);
    --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    overflow-x: clip;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--surface);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--orange); }

h1, h2, h3, h4 {
    font-family: inherit;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 .5em;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
.prose strong, .card strong, .section:not(.bg-dark) strong { color: var(--ink); }

ul { padding-left: 1.2em; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

section.section { padding: 88px 0; }
@media (max-width: 780px) { section.section { padding: 56px 0; } }

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 52px;
}

.section-head .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 10px;
}

.section-head p { color: var(--text-muted); margin-top: 12px; }

.bg-tint { background: var(--bg); }
.bg-dark { background: var(--bg-dark); color: #cbd0f0; }
.bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark .section-head p { color: #a7acd6; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14.5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s var(--ease), background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); color: #fff; }

.btn-outline { border-color: currentColor; color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.bg-dark .btn-outline { color: #fff; }
.bg-dark .btn-outline:hover { background: #fff; color: var(--navy); }

/* Grid helpers */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px 28px;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.card-icon img { width: 100%; height: 100%; }

.card-icon-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: rgba(255, 87, 56, .1);
    color: var(--orange);
    font-size: 22px;
}

.card-number-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 4px;
    border-radius: 12px;
    margin-bottom: 18px;
    background: rgba(255, 87, 56, .1);
    color: var(--orange);
    font-size: 18px;
    font-weight: 700;
}

/* Counters */
.stat { text-align: center; }
.stat-num { font-size: 2.4rem; font-weight: 600; color: var(--navy); line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 14px; margin-top: 8px; }
.stat-label i { color: var(--orange); margin-right: 6px; }

/* Reveal-on-scroll (replaces wow.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero */
.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(16, 18, 58, .92), rgba(23, 43, 133, .78));
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero p { color: #cfd3f4; font-size: 1.1rem; max-width: 640px; }

.page-hero {
    position: relative;
    padding: 130px 0 70px;
    color: #fff;
    background: linear-gradient(120deg, var(--bg-dark), var(--navy));
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero .crumbs { color: #a7acd6; font-size: 14px; }
.page-hero .crumbs a { color: #cfd3f4; }
.page-hero .crumbs a:hover { color: #fff; }

/* Blog / article cards */
.post-card { display: flex; flex-direction: column; }
.post-card-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; aspect-ratio: 16/10; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-date { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.post-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.post-card p { color: var(--text-muted); font-size: 14.5px; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--surface);
    color: var(--text);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }
.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
    padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (max-width: 780px) {
    .hero { min-height: 60vh; }
    .card { padding: 26px 20px; }
}

/* ==========================================================================
   Site header / nav
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    transition: transform .25s var(--ease);
}

.site-header.is-hidden { transform: translateY(-100%); }

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-header .brand img { height: 34px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

.site-nav > ul > li { position: relative; }

.site-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    color: var(--ink);
    font-weight: 600;
    font-size: 14.5px;
    border-radius: 999px;
}
.site-nav > ul > li > a:hover { background: var(--bg); color: var(--navy); }
.site-nav > ul > li > a .fa-chevron-down { font-size: 10px; opacity: .6; }

.site-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 520px;
    max-width: 80vw;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    list-style: none;
    margin: 8px 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s var(--ease), transform .15s var(--ease), visibility .15s;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px 10px;
    align-content: start;
}

.site-nav > ul > li:hover > .dropdown,
.site-nav > ul > li.nav-open > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-nav .dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}
.site-nav .dropdown a:hover { background: var(--bg); color: var(--navy); }
.site-nav .dropdown .dropdown-more {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 10px;
}
.site-nav .dropdown .dropdown-more a { font-weight: 600; color: var(--orange); }

.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--ink);
    border: none;
    background: transparent;
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--navy); }
.icon-btn i, .nav-toggle i { pointer-events: none; }

.search-flyout {
    position: absolute;
    top: 100%;
    right: 24px;
    margin-top: 10px;
    width: 400px;
    max-width: calc(100vw - 32px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display: none;
    flex-direction: column;
}
.search-flyout.is-open { display: flex; }

.search-flyout-input {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 4px 4px 4px 6px;
    background: var(--bg);
}
.search-flyout-input:focus-within { border-color: var(--navy); background: var(--surface); }
.search-flyout-input .icon-btn { width: 34px; height: 34px; flex: none; }
.search-flyout input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 8px 6px;
    font: inherit;
    font-size: 15px;
}
.search-flyout input:focus { outline: none; }

.search-suggestions { margin-top: 4px; max-height: 340px; overflow-y: auto; }
.search-suggestions:empty { margin-top: 0; }
.search-suggestions a {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 10px;
    border-radius: 8px;
    color: var(--text);
}
.search-suggestions a:hover, .search-suggestions a.is-active { background: var(--bg); color: var(--navy); }
.search-suggestions .suggestion-type {
    flex: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    background: var(--bg);
    border-radius: 6px;
    padding: 2px 7px;
}
.search-suggestions a:hover .suggestion-type, .search-suggestions a.is-active .suggestion-type { background: #fff; }
.search-suggestions .suggestion-empty { padding: 14px 10px; color: var(--text-muted); font-size: 14px; }

.nav-toggle { display: none; }

@media (max-width: 992px) {
    .site-nav { position: fixed; top: 65px; right: 0; left: 0; height: calc(100vh - 65px);
        background: var(--surface); flex-direction: column;
        align-items: stretch; padding: 16px; overflow-y: auto; transform: translateX(100%);
        transition: transform .25s var(--ease); }
    .site-nav.is-open { transform: translateX(0); }
    .site-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .site-nav > ul > li > a { justify-content: space-between; padding: 14px 10px; }
    .site-nav .dropdown {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        border: none; background: var(--bg); display: none; max-height: none;
    }
    .site-nav > ul > li.nav-open > .dropdown { display: block; }
    .nav-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
        background: transparent; cursor: pointer;
    }
    .search-flyout { right: 16px; left: 16px; }
    .search-flyout input { width: 100%; }
}

/* ==========================================================================
   Site footer
   ========================================================================== */

.site-footer { background: var(--bg-dark); color: #aeb2da; }

.footer-cta {
    padding: 70px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    text-align: center;
}
.footer-cta h2 { color: #fff; }

.footer-main { padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #aeb2da; font-size: 14.5px; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 30px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; color: #8d91b8; }

.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.footer-social a:hover { background: var(--orange); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 13.5px;
    flex-wrap: wrap;
}
.footer-bottom a { color: #aeb2da; }
.footer-bottom a:hover { color: #fff; }

.contact-form-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 30px;
}
.contact-form-card .field input,
.contact-form-card .field textarea {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
    color: #fff;
}
.contact-form-card .field label { color: #cfd3f4; }
.back-to-top {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); color: #fff;
}
.back-to-top:hover { background: var(--orange); }

/* ==========================================================================
   Prose (rendered rich-text content: pages/articles description body)
   ========================================================================== */

.prose { max-width: 100%; font-size: 16.5px; line-height: 1.8; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose p { margin-bottom: 1.2em; }
.prose ul, .prose ol { margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose blockquote {
    margin: 1.6em 0;
    padding: 18px 24px;
    border-left: 4px solid var(--orange);
    background: var(--bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text);
    font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--bg); }

/* Breadcrumbs (page/article hero) */
.crumbs a { text-decoration: none; }
.crumbs .sep { margin: 0 6px; opacity: .6; }

/* Share buttons (article page) */
.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0; }
.share-row .btn { padding: 9px 18px; font-size: 13px; }
.btn-facebook { background: #1877f2; color: #fff; }
.btn-twitter { background: #1da1f2; color: #fff; }
.btn-linkedin { background: #0a66c2; color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }
.share-row .btn:hover { opacity: .88; color: #fff; }

/* Pagination (mirrors Laravel's default bootstrap-4 markup) */
.pagination { display: flex; justify-content: center; list-style: none; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.page-item .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 8px;
    color: var(--ink); text-decoration: none; font-size: 13.5px;
}
.page-item.active .page-link { background: var(--navy); border-color: var(--navy); color: #fff; }
.page-item.disabled .page-link { color: #c7cbd1; pointer-events: none; }
.page-item .page-link:hover:not([aria-current]) { border-color: var(--navy); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
