/* =============================================================================
   eVisa Moldova — Reproduction fidèle du design officiel (d'après capture)
   Bloc centré ~1200px, en-tête bleu à motif, onglets de nav colorés,
   fond blanc, accueil 2 colonnes, pied minimal.
   ========================================================================== */

:root {
    --wrap: 1200px;
    --blue: #2d6cab;          /* bleu en-tête */
    --blue-dark: #235a90;
    --blue-ink: #1c4f86;      /* bleu foncé (titres/bandeaux) */
    --link: #1a5fa8;
    --ink: #232323;
    --muted: #6a7683;
    --line: #e2e6ea;
    --side-border: #9db8d6;
    --side-bg: #dceaf6;

    /* couleurs des onglets de navigation */
    --t-start: #ef9b1e;
    --t-need:  #7e4ea0;
    --t-apply: #5aa845;
    --t-cont:  #2fa3a3;
    --t-stat:  #da3b3b;
    --t-visa:  #f2c300;
}

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

body {
    background: #ffffff;
    color: var(--ink);
    font-family: Arial, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Motif géométrique subtil réutilisé sur en-tête + nav */
.hdr-pattern {
    background-color: var(--blue);
    background-image:
        linear-gradient(135deg, rgba(255,255,255,.045) 25%, transparent 25%),
        linear-gradient(225deg, rgba(255,255,255,.045) 25%, transparent 25%),
        linear-gradient(315deg, rgba(0,0,0,.04) 25%, transparent 25%),
        linear-gradient(45deg,  rgba(0,0,0,.04) 25%, transparent 25%);
    background-size: 46px 46px;
    background-position: 0 0, 23px 0, 23px -23px, 0 23px;
}

/* ---------- En-tête ---------- */
.header { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 18px 26px;
}
.brand { display: flex; align-items: center; gap: 18px; }
.brand > img { height: 74px; width: auto; }
.header-title {
    color: #fff; font-size: 15px; font-weight: bold; line-height: 1.35;
    text-transform: uppercase; letter-spacing: .3px; max-width: 520px;
}
.header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lang-flags { display: flex; gap: 10px; align-items: center; }
.lang-flags a { display: inline-flex; line-height: 0; border: 1px solid rgba(255,255,255,.5); }
.lang-flags svg { width: 30px; height: 20px; display: block; }
.logo-wrap { text-align: right; }
.logo-wrap img { height: 74px; width: auto; }
.logo-underline { width: 340px; max-width: 40vw; height: 1px; background: rgba(255,255,255,.7); margin-top: 6px; }

/* ---------- Navigation ---------- */
.nav-bars { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.nav-inner { display: flex; align-items: flex-end; gap: 26px; padding: 0 26px 0; flex-wrap: wrap; }
.nav-item { padding: 10px 0 14px; display: block; }
.nav-item, .nav-item:hover { text-decoration: none; }
.nav-item .nav-tab { display: block; width: 96px; height: 5px; margin-bottom: 9px; border-radius: 1px; }
.nav-item span {
    display: block; color: #fff; font-size: 13px; font-weight: bold;
    text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.nav-item:hover span { text-decoration: none; opacity: .9; }
.nav-item:hover .nav-tab { height: 7px; margin-bottom: 7px; }
.nav-item.active span { text-decoration: underline; text-underline-offset: 4px; }

.t-start { background: var(--t-start); }
.t-need  { background: var(--t-need); }
.t-apply { background: var(--t-apply); }
.t-cont  { background: var(--t-cont); }
.t-stat  { background: var(--t-stat); }
.t-visa  { background: var(--t-visa); }

/* ---------- Contenu ---------- */
.content { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 34px 26px 40px; flex: 1; }

/* ---------- Accueil : deux colonnes ---------- */
.home-grid { display: flex; gap: 40px; align-items: flex-start; }
.side { width: 220px; flex-shrink: 0; border: 2px solid var(--blue); }
.side-head { background: var(--blue-ink); color: #fff; font-size: 14px; font-weight: bold; padding: 8px 12px; }
.side-body { padding: 12px; }
.side-link {
    display: block; background: var(--side-bg); border: 1px solid var(--side-border);
    color: var(--link); font-size: 13px; padding: 10px; line-height: 1.4;
}
.side-link:hover { background: #cfe0f2; text-decoration: none; }

.main-col { flex: 1; min-width: 0; }
.main-title { font-size: 30px; font-weight: 400; color: #1b1b1b; margin-bottom: 12px; }
.dashed-sep { border: none; border-top: 1px dashed var(--blue); margin: 0 0 18px; }

.doc-list { list-style: none; }
.doc-list li { position: relative; padding: 9px 0 9px 30px; font-size: 15px; line-height: 1.4; }
.doc-list li::before {
    content: ""; position: absolute; left: 0; top: 9px; width: 18px; height: 18px;
    background: no-repeat center/contain
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='2' y='1.5' width='12' height='13' rx='1' fill='%23e8f0f8' stroke='%232d6cab' stroke-width='1'/><rect x='4' y='4' width='8' height='1.4' fill='%232d6cab'/><rect x='4' y='6.6' width='8' height='1.4' fill='%232d6cab'/><rect x='4' y='9.2' width='5' height='1.4' fill='%232d6cab'/></svg>");
}
.doc-list a { color: var(--link); }
.contact-line { margin-top: 22px; font-size: 15px; }
.contact-line strong { color: #1b1b1b; }

.home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; }

/* ---------- Titres / entêtes de page (pages du workflow) ---------- */
.page-head { margin-bottom: 20px; }
.page-head h1 { color: var(--blue-ink); font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.page-head p { color: var(--muted); font-size: 14.5px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }

.section-title { color: var(--blue-ink); font-size: 17px; font-weight: bold; margin: 24px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--blue); }
.section-title:first-child { margin-top: 0; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: 0 1px 3px rgba(20,50,90,.06); }
.card + .card { margin-top: 22px; }

/* ---------- Formulaires ---------- */
.form-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.form-grid .field { flex: 1 1 calc(50% - 18px); min-width: 220px; margin-bottom: 0; }
.field { margin-bottom: 15px; }
.field.full { flex-basis: 100%; width: 100%; }
.field label { display: block; font-weight: bold; font-size: 13.5px; margin-bottom: 6px; }
.field .req { color: #d0021b; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 12px; border: 1px solid #cfd6de; border-radius: 5px;
    font-size: 14.5px; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,108,171,.14);
}
.field input[readonly] { background: #f4f6f9; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field-file input[type=file] { padding: 9px; background: #f4f8fc; border: 1px dashed var(--blue); cursor: pointer; }

.check-row { margin: 26px 0 20px; padding: 16px 18px; background: #f4f8fc; border-left: 4px solid var(--blue); display: flex; gap: 12px; align-items: center; }
.check-row input { width: 18px; height: 18px; flex-shrink: 0; }
.check-row label { font-size: 14px; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--blue); color: #fff; border: none; padding: 12px 24px; font-size: 14.5px;
    font-weight: bold; border-radius: 5px; cursor: pointer; transition: all .18s;
    text-transform: uppercase; letter-spacing: .3px; text-decoration: none;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; box-shadow: 0 4px 12px rgba(45,108,171,.25); }
.btn-primary { background: var(--blue); }
.btn-success { background: var(--t-apply); }
.btn-success:hover { background: #4d9439; box-shadow: 0 4px 12px rgba(90,168,69,.25); }
.btn-outline { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: #eef2f6; color: #333; }
.btn-ghost:hover { background: #e2e8ee; color: #333; box-shadow: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ---------- Alertes ---------- */
.alert { padding: 14px 16px; border-radius: 5px; margin-bottom: 18px; font-size: 14.5px; border-left: 4px solid; }
.alert-success { background: #e6f4ea; color: #1c5b30; border-color: var(--t-apply); }
.alert-danger  { background: #fbeaea; color: #8a2020; border-color: var(--t-stat); }
.alert-info    { background: #e6f0fa; color: #16487e; border-color: var(--blue); }
.alert-warning { background: #fdf3df; color: #7a5713; border-color: var(--t-start); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 6px 13px; border-radius: 20px; font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .3px; }
.badge-success { background: #e0f0e5; color: #1c5b30; }
.badge-danger  { background: #f9dede; color: #8a2020; }
.badge-info    { background: #dcebfa; color: #16487e; }
.badge-warning { background: #fdf1d8; color: #7a5713; }
.badge-muted   { background: #eceff2; color: #55606b; }

/* ---------- Stepper ---------- */
.stepper { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.stepper .step { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f4f8fc; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; color: var(--muted); }
.stepper .step .num { width: 26px; height: 26px; border-radius: 50%; background: #dbe3ec; color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: bold; flex-shrink: 0; }
.stepper .step.active { border-color: var(--blue); color: var(--blue-ink); font-weight: bold; }
.stepper .step.active .num { background: var(--blue); color: #fff; }
.stepper .step.done { color: var(--t-apply); }
.stepper .step.done .num { background: var(--t-apply); color: #fff; }

/* ---------- Détails / suivi ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.dl-item { background: #f4f8fc; border-radius: 5px; padding: 12px 15px; }
.dl-item .k { font-size: 12px; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.dl-item .v { font-size: 16px; font-weight: bold; color: var(--ink); word-break: break-word; }

/* ---------- Boîte de code ---------- */
.code-box { background: var(--hdr, var(--blue)); background-color: var(--blue-ink); color: #fff; border-radius: 8px; padding: 24px; text-align: center; margin: 20px 0; }
.code-box .label { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.75); }
.code-box .code { font-size: 40px; font-weight: bold; letter-spacing: 8px; margin-top: 8px; font-family: 'Courier New', monospace; }

.search-section { background: #f4f8fc; padding: 24px; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- Pied de page ---------- */
.site-footer { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 16px 26px 26px; }
.site-footer .frule { border-top: 1px solid var(--line); margin-bottom: 12px; }
.site-footer .frow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer .version { color: #9aa4ad; font-size: 13px; }
.site-footer .fmail { font-size: 14px; color: #333; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .nav-inner { gap: 18px; }
    .nav-item .nav-tab { width: 80px; }
    .header-title { font-size: 13px; max-width: 340px; }
}
@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .brand { flex-direction: column; }
    .header-title { max-width: 100%; }
    .header-right { align-items: center; }
    .logo-underline { width: 220px; max-width: 70vw; }
    .nav-inner { flex-direction: column; gap: 0; padding: 0; }
    .nav-item { width: 100%; padding: 12px 26px; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 12px; }
    .nav-item .nav-tab { width: 34px; height: 6px; margin: 0; }
    .home-grid { flex-direction: column; }
    .side { width: 100%; }
    .form-grid .field { flex-basis: 100%; }
    .dl-grid { grid-template-columns: 1fr; }
    .stepper .step { min-width: 100%; }
    .main-title { font-size: 24px; }
    .content { padding: 24px 18px 32px; }
}
