/* Imprimerie Dieu — plateforme /print.
   Same palette, fonts and components as imprimeriedieu.be (v7):
   navy #272A51, dark navy #141634, yellow #F9D115, Playfair Display + Open Sans. */

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../fonts/open-sans-variable-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('../fonts/playfair-display-variable-latin.woff2') format('woff2');
}

:root {
    --navy: #272A51;
    --navy-dark: #141634;
    --yellow: #F9D115;
    --grey-bg: #F2F2F2;
    --grey: #707070;
    --white: #fff;
    --red: #B3261E;
    --green: #1E7D32;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--navy);
    background: var(--grey-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; }
a { color: var(--navy); font-weight: 600; }
a:hover { color: #000; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; color: var(--navy); line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }

.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--navy); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.site-header .logo { width: 64px; display: block; }
.site-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--white); text-decoration: none; padding: 8px 10px; font-size: .95rem; }
.site-nav a:hover { color: var(--yellow); }

.hero { background: var(--navy); color: var(--white); padding: 24px 0 40px; }
.hero h1 { color: var(--white); }
.hero .kicker { font-family: 'Playfair Display', serif; color: var(--yellow); font-style: italic; }
.hero p { color: var(--white); opacity: .9; max-width: 640px; margin-top: .5rem; }
.hero hr { width: 60px; border: 0; border-top: 3px solid var(--yellow); margin: 12px 0; }

/* ------------------------------------------------------------------ main */
main { flex: 1; padding: 32px 0 48px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.card--overlap { margin-top: -32px; }
.notice { border-left: 4px solid var(--yellow); background: #FFFBE6; padding: 12px 16px; border-radius: 6px; margin: 16px 0; }
.notice--error { border-color: var(--red); background: #FDECEA; }
.notice--ok { border-color: var(--green); background: #E8F5E9; }

/* ----------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { font-size: .85rem; color: var(--grey); }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number],
.field select, .field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #C8C9D3; border-radius: 8px; font: inherit; color: var(--navy); background: var(--white);
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.field .error { color: var(--red); font-size: .9rem; margin-top: 4px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--navy); }
fieldset { border: 0; }

.btn {
    display: inline-block; padding: 12px 22px; border: 0; border-radius: var(--radius); cursor: pointer;
    background: var(--yellow); color: var(--navy); font: inherit; font-weight: 700; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--secondary { background: var(--navy); color: var(--white); }
.btn--secondary:hover { background: var(--yellow); color: var(--navy); }
.btn--small { padding: 6px 12px; font-size: .9rem; }
.btn--link { background: none; color: var(--red); padding: 4px; font-weight: 600; text-decoration: underline; }
.btn--link:hover { background: none; color: #000; }

/* dropzone + files */
.dropzone {
    border: 2px dashed #A9ABBE; border-radius: var(--radius); padding: 28px 16px; text-align: center; background: #FAFAFC; cursor: pointer;
}
.dropzone.is-over { border-color: var(--navy); background: #EEF0FA; }
.dropzone strong { display: block; font-size: 1.1rem; }
.file-item { border: 1px solid #E1E2EA; border-radius: var(--radius); padding: 16px; margin-top: 16px; }
.file-item__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.file-item__name { font-weight: 700; word-break: break-all; }
.file-item__size { color: var(--grey); font-size: .9rem; }
.progress { height: 8px; background: #E6E7EE; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.progress__bar { height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.status { font-size: .95rem; margin-top: 6px; }
.status--ok { color: var(--green); }
.status--error { color: var(--red); }

.summary-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.summary-table th, .summary-table td { text-align: left; padding: 8px; border-bottom: 1px solid #E6E7EE; vertical-align: top; }
.big-number { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--navy); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--navy-dark); color: var(--white); padding: 32px 0 20px; }
.site-footer a { color: var(--white); font-weight: 400; }
.site-footer a:hover { color: var(--yellow); }
.footer-contacts { display: grid; gap: 24px; grid-template-columns: 1fr; text-align: center; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.footer-contacts img { height: 28px; }
.footer-contacts .title { text-transform: uppercase; font-weight: 600; margin: 8px 0 4px; font-size: .9rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; font-size: .8rem; opacity: .7; padding-top: 16px; }

@media (min-width: 640px) {
    .grid--2 { grid-template-columns: 1fr 1fr; }
    .grid--3 { grid-template-columns: 1fr 1fr 1fr; }
    .footer-contacts { grid-template-columns: repeat(3, 1fr); }
    h1 { font-size: 2.6rem; }
    .site-header .logo { width: 80px; }
}

@media print {
    .site-header, .site-footer, .hero, .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; padding: 0; }
}

/* small utilities (no inline styles: the CSP forbids them) */
.section-title { margin-top: 32px; }
.spaced { margin: 16px 0; }
.spaced-top { margin-top: 12px; }

/* launch banner (before the opening date) */
.launch-banner { background: var(--yellow); color: var(--navy); text-align: center; }
.launch-banner__kicker { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 700; margin: 0; }
.launch-banner__text { font-size: 1.15rem; font-weight: 600; margin: 4px 0 0; }
.form-body:disabled { opacity: .55; }
.form-body:disabled .dropzone { cursor: not-allowed; }
