:root {
    --bleu: #12457a;
    --bleu-fonce: #0d3560;
    --vert: #16a34a;
    --gris-bg: #eef2f6;
    --gris-bord: #d5dce4;
    --gris-txt: #33414f;
    --rouge: #c0392b;
    --ombre: 0 6px 24px rgba(18, 69, 122, .12);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--gris-txt);
    background: linear-gradient(180deg, var(--gris-bg), #f7f9fb 320px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── En-tête ── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bleu);
    color: #fff;
    box-shadow: var(--ombre);
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand span { font-size: 1.05rem; font-weight: 600; letter-spacing: .2px; }

/* Sélecteur de langue */
.langs { display: flex; gap: 4px; }
.lang {
    color: #cfe0f2;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.lang:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lang.active { background: #fff; color: var(--bleu); }

/* ── Contenu ── */
.page { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 28px 20px 48px; }

.card {
    background: #fff;
    border: 1px solid var(--gris-bord);
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    padding: 28px 32px 32px;
}
.card h1 { margin: 0 0 6px; color: var(--bleu-fonce); font-size: 1.6rem; }
.lead { margin: 0 0 22px; color: #5a6875; line-height: 1.5; }

/* ── Formulaire ── */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }

label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: #3c4a58; }
.req { color: var(--rouge); }

input, select, textarea {
    font: inherit;
    color: var(--gris-txt);
    padding: 10px 12px;
    border: 1px solid var(--gris-bord);
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(18, 69, 122, .15);
}
textarea { resize: vertical; }

.actions { display: flex; gap: 12px; margin-top: 24px; }
.btn {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    background: var(--vert);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .05s;
}
.btn:hover { background: #128a3e; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: #eef2f6; color: var(--gris-txt); }
.btn-ghost:hover { background: #e2e8ee; }

.privacy { margin-top: 16px; font-size: .82rem; color: #8a97a4; }

/* Aide sous un champ (limites PJ, types acceptés) */
.hint { font-size: .78rem; color: #8a97a4; margin-top: 4px; line-height: 1.35; }

/* Champ fichier */
input[type="file"] {
    padding: 8px;
    background: #f7f9fb;
    cursor: pointer;
}
input[type="file"]::file-selector-button {
    font: inherit;
    font-weight: 600;
    margin-right: 10px;
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: var(--bleu);
    color: #fff;
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--bleu-fonce); }

/* ── Prise en main à distance (TeamViewer) ── */
.remote { margin-top: 22px; }
.remote h2 { margin: 0 0 6px; color: var(--bleu-fonce); font-size: 1.2rem; }
.remote p { margin: 0 0 16px; color: #5a6875; }
.remote-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-remote {
    background: var(--bleu);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-remote:hover { background: var(--bleu-fonce); }
.btn-remote .os { font-size: 1.05rem; line-height: 1; }

/* ── Messages ── */
.err { color: var(--rouge); font-size: .82rem; margin-top: 4px; min-height: 1em; }
.validation-summary { color: var(--rouge); }
.validation-summary ul { margin: 0 0 12px; padding-left: 18px; }
.validation-summary:empty { display: none; }

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--ombre);
    font-weight: 500;
    animation: slidein .3s ease;
}
.toast-ico { font-size: 1.25rem; line-height: 1; }
.toast-ok { background: #e7f7ec; color: #10673a; border: 1px solid #b7e4c7; }
.toast-warn { background: #fef6e7; color: #8a5a12; border: 1px solid #f5d99b; }
@@keyframes slidein { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Piège anti-robot : hors écran, jamais visible. */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Pied ── */
.footer {
    text-align: center;
    padding: 20px;
    color: #7a8794;
    font-size: .85rem;
}

/* ── Mobile ── */
@@media (max-width: 640px) {
    .grid { grid-template-columns: 1fr; }
    .card { padding: 22px 18px 26px; }
    .brand span { font-size: .92rem; }
    .page { padding: 18px 14px 40px; }
}
