/* Canada Visa Assistant — style principal local, Phase 46 / 174.93.
   Compatible avec base.html, portal_home.html et portal_forms.css.
   Aucun script, aucune modification des données ou des formulaires. */
:root{color-scheme:light;--navy:#153744;--teal:#126276;--teal-dark:#0c4e60;--muted:#526a74;--line:#d8e5e8;--bg:#f3f7f8;--white:#fff;--shadow:0 5px 22px rgba(20,53,67,.065)}
*{box-sizing:border-box}
html{font-family:system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;font-size:16px;line-height:1.55}
body{margin:0;background:var(--bg);color:var(--navy);min-height:100vh;display:flex;flex-direction:column}
a{color:var(--teal)}a:hover{text-decoration-thickness:2px}
header{background:var(--white);border-bottom:1px solid var(--line);padding:15px clamp(16px,4vw,52px);display:flex;align-items:center;gap:22px;flex-wrap:wrap}
header .brand{font-size:1.13rem;font-weight:750;text-decoration:none;color:var(--teal-dark);white-space:nowrap}
header nav{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;font-size:.9rem}
header nav a{text-decoration:none}header nav a:hover{text-decoration:underline}
header nav form{display:inline-flex;margin:0}header nav span{color:var(--muted)}
main{width:min(1200px,calc(100% - 36px));margin:30px auto 54px;flex:1;min-width:0}
footer{border-top:1px solid var(--line);background:var(--white);padding:17px 24px;text-align:center;color:var(--muted);font-size:.82rem}
h1,h2,h3{line-height:1.25;color:var(--navy);margin-top:0}h1{font-size:clamp(1.55rem,3vw,2.15rem)}h2{font-size:1.3rem}h3{font-size:1.08rem}
p{margin:.55em 0 1em}.card{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:clamp(18px,3vw,28px);box-shadow:var(--shadow);margin:0 0 20px;min-width:0}
button,.button,input[type=submit]{font:inherit;font-weight:650;border:1px solid var(--teal);background:var(--teal);color:white;border-radius:9px;padding:9px 16px;cursor:pointer;transition:background .15s ease}
button:hover,.button:hover,input[type=submit]:hover{background:var(--teal-dark)}button:disabled{opacity:.55;cursor:not-allowed}
input,select,textarea{font:inherit;max-width:100%}input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]),select,textarea{border:1px solid #c8d7dc;background:#fff;color:var(--navy);padding:10px 12px;border-radius:8px}
textarea{min-height:95px;max-width:100%}label{font-weight:550}form{max-width:100%}form input,form select,form textarea{margin-bottom:7px}
:focus-visible{outline:3px solid #e0a64b;outline-offset:3px}
.flash{padding:12px 16px;margin-bottom:18px;border-radius:10px;background:#e7f4f5;border:1px solid #b8d9dd}.flash.error{background:#fff0ee;border-color:#efc5bf}.flash.success{background:#eaf7ef;border-color:#b9dfc8}
table{border-collapse:collapse;width:100%;background:white}th,td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left}th{background:#edf4f5}
/* Le CSS des questionnaires est chargé après celui-ci et garde la priorité. */
.portal-shell{max-width:1100px;margin:0 auto}.portal-hero{background:linear-gradient(125deg,#104d61,#18758a);color:white;border-radius:16px;padding:clamp(22px,4vw,38px);margin-bottom:20px;box-shadow:var(--shadow)}
.portal-hero h1,.portal-hero h2,.portal-hero p{color:white}.portal-hero a{color:white}.portal-reference{font-weight:700;letter-spacing:.025em;overflow-wrap:anywhere}
.portal-hint{color:var(--muted);font-size:.9rem}.portal-document-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.portal-document-grid>.card{margin:0}.portal-wide{grid-column:1/-1}
.portal-tabs{margin-bottom:22px}.portal-tab{font-weight:600}.portal-questionnaire{max-width:none}
.portal-questionnaire .portal-save{margin-top:20px;padding:12px 20px}
@media(max-width:720px){header{padding:14px 18px}main{width:calc(100% - 24px);margin:18px auto 32px}.portal-document-grid{grid-template-columns:1fr}.portal-wide{grid-column:auto}.card{padding:18px}header nav{gap:9px 12px}}
@media(prefers-reduced-motion:reduce){button,.button{transition:none}}

/* CVA Phase 50 - Task board statistics */
.stats:has(> article.card) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0 24px;
}

.stats:has(> article.card) > article.card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
}

.stats:has(> article.card) > article.card > span {
    display: block;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.stats:has(> article.card) > article.card > strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
    font-weight: 750;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .stats:has(> article.card) {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* CVA_RESTAURATION_VISUELLE_252 */

body {
    background: #f2f6fc;
    color: #173d60;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

body > header {
    background: #173d60;
    color: #ffffff;
    padding: 15px 20px;
    gap: 12px;
}

body > header .brand {
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
}

body > header nav {
    gap: 5px 8px;
}

body > header nav a {
    color: #ffffff;
    padding: 7px 8px;
    border-radius: 6px;
}

body > header nav a:hover {
    background: rgba(255,255,255,.12);
}

body > header nav span {
    color: #ffffff;
}

body > header nav button {
    background: #f0f5fa;
    color: #173d60;
    border: 1px solid #d0deea;
    border-radius: 7px;
}

body > header nav button:hover {
    background: #dce9f5;
}

body > main {
    width: min(1120px, calc(100% - 36px));
    max-width: 1120px;
    margin: 22px auto 28px;
    padding: 12px 12px 20px;
}

main .heading {
    margin-bottom: 18px;
}

main h1 {
    color: #173d60;
    font-size: clamp(25px, 2.6vw, 34px);
    line-height: 1.22;
}

main h2 {
    color: #173d60;
    font-size: clamp(20px, 2vw, 24px);
    margin: 20px 0 14px;
}

main .card {
    border-color: #d5e3f0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 14px rgba(21,61,96,.035);
}

main .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: stretch;
    margin: 12px 0 18px;
}

main .stats > .card {
    min-width: 0;
    min-height: 110px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

main .stats > .card span {
    font-size: 14px;
    color: #50667a;
}

main .stats > .card strong {
    font-size: 30px;
    color: #123d60;
    line-height: 1.1;
}

main .button, main button, main input[type=submit] {
    background: #176bce;
    border-color: #176bce;
    color: #ffffff;
}

main .button:hover, main button:hover {
    background: #1257a8;
}

main th {
    background: #e8f1f9;
    color: #173d60;
}

@media (max-width: 760px) {
    body > header {
        padding: 12px;
    }

    body > main {
        width: calc(100% - 20px);
        padding: 8px;
    }

    main .stats {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }

    main .card {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    main .stats {
        grid-template-columns: 1fr;
    }
}

/* FIN_CVA_RESTAURATION_VISUELLE_252 */

/* CVA_GRILLE_COMPACTE_257 */

main .stats:has(> article.card) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
    margin: 12px 0 18px;
}

main .stats:has(> article.card) > article.card {
    min-width: 0;
    min-height: 100px;
    margin: 0;
    padding: 18px;
    gap: 8px;
}

main .stats:has(> article.card) > article.card > span {
    font-size: 14px;
    line-height: 1.4;
}

main .stats:has(> article.card) > article.card > strong {
    font-size: 30px;
    line-height: 1.1;
}

@media (max-width: 760px) {
    main .stats:has(> article.card) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    main .stats:has(> article.card) {
        grid-template-columns: 1fr;
    }
}

/* FIN_CVA_GRILLE_COMPACTE_257 */

/* CVA_ADMIN_COMPLEMENTS_369 */

.cva-admin-complements .cva-complement-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.cva-admin-complements .cva-complement-stats .card {
    margin: 0;
    padding: 18px;
    border-top: 4px solid #17365d;
}

.cva-admin-complements .cva-complement-stats span {
    display: block;
    color: #475569;
    font-size: 14px;
}

.cva-admin-complements .cva-complement-stats strong {
    display: block;
    font-size: 32px;
    margin-top: 8px;
}

.cva-admin-complements .cva-stat-client strong {
    color: #92400e;
}

.cva-admin-complements .cva-stat-admin strong {
    color: #1d4ed8;
}

.cva-admin-complements .cva-stat-resolved strong {
    color: #166534;
}

.cva-admin-complement-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.cva-admin-complement-filters a {
    display: inline-block;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 9px 13px;
    background: #ffffff;
    color: #17365d;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.cva-admin-complement-filters a.active,
.cva-admin-complement-filters a:hover {
    background: #17365d;
    border-color: #17365d;
    color: #ffffff;
}

.cva-admin-complement-table {
    overflow-x: auto;
    max-width: 100%;
}

.cva-admin-complement-table table {
    min-width: 950px;
    font-size: 13px;
}

.cva-admin-complement-table th {
    background: #edf3f9;
    color: #17365d;
}

.cva-admin-complement-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.cva-admin-complement-message {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-width: 170px;
    max-width: 300px;
    line-height: 1.5;
}

.cva-complement-status {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
}

.cva-complement-status.waiting_client {
    background: #fef3c7;
    color: #92400e;
}

.cva-complement-status.waiting_admin {
    background: #dbeafe;
    color: #1e40af;
}

.cva-complement-status.resolved {
    background: #dcfce7;
    color: #166534;
}

.cva-complement-dossier {
    display: inline-block;
    background: #17365d;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.cva-complement-dossier:hover {
    background: #244b78;
    color: #ffffff;
}

@media (max-width: 650px) {
    .cva-admin-complements .cva-complement-stats {
        grid-template-columns: 1fr;
    }
}

/* CVA_FACTURATION_568 */

.cva-finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.cva-finance-kpi {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}
.cva-finance-kpi strong {
    font-size: 1.25rem;
    color: #16365c;
    overflow-wrap: anywhere;
}
.cva-finance-notice {
    background: #fff8e5;
    border: 1px solid #e8d29b;
    border-radius: 8px;
    padding: 14px;
    color: #755510;
}
.cva-finance-table {
    overflow-x: auto;
}
.cva-finance-table table {
    width: 100%;
    border-collapse: collapse;
}
.cva-finance-table th,
.cva-finance-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.cva-finance-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    background: #edf2f7;
    color: #334155;
    font-size: .85rem;
}
.cva-finance-status.payee {
    background: #dcfce7;
    color: #166534;
}
.cva-finance-status.partiellement_payee {
    background: #fef3c7;
    color: #92400e;
}
.cva-finance-status.emise {
    background: #dbeafe;
    color: #1e40af;
}
.cva-finance-status.annulee {
    background: #fee2e2;
    color: #991b1b;
}


/* CVA_BANNIERE_578 */
.cva-portal-banner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 12px;
}
.cva-portal-banner img {
    display: block;
    width: 100%;
    height: auto;
}
