:root {
    color-scheme: dark;
    --ivoire: #f1e3c8;
    --sourd: #c9b498;
    --or: #d9ab61;
    --ligne: #856035;
    --encre: #17100d;
    --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
    font-family: Georgia, serif;
    color: var(--ivoire);
    background: #120e0c;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 4vh, 42px) 20px;
    background: #140e09 url('cabinet.webp') center center / cover no-repeat fixed;
}
.cadre {
    position: relative;
    width: min(100%, 990px);
    margin: auto;
    padding: clamp(20px, 3vw, 36px) clamp(20px, 5vw, 70px) 20px;
    border: 1px solid #a47842;
    outline: 1px solid #553820;
    outline-offset: 4px;
    background: rgb(25 16 11 / 85%);
    box-shadow: 0 18px 60px #000b, inset 0 0 90px #0604029c;
}
.cadre::before, .cadre::after {
    content: '◆';
    position: absolute;
    top: -10px;
    color: #edc181;
    padding: 0 4px;
    text-shadow: 0 1px 5px #000;
    font-size: 15px;
    pointer-events: none;
}
.cadre::before { left: -7px; }
.cadre::after { right: -7px; }
.intro { display: grid; grid-template-columns: minmax(145px, 220px) 1fr; align-items: center; gap: 28px; }
.embleme { text-align: center; }
.embleme img {
    display: block;
    width: min(100%, 205px);
    height: auto;
    margin: auto;
}
.texte-intro { text-align: center; }
h1, h2, p { margin: 0; }
h1 {
    font: italic 500 clamp(38px, 4.6vw, 63px)/.98 var(--serif);
    color: #f0c984;
    text-shadow: 0 2px 3px #000;
    letter-spacing: -.035em;
}
.texte-intro p { margin: 8px auto 0; max-width: 55ch; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.38; }
.texte-intro .recrutement { max-width: none; text-wrap: balance; }
@media (min-width: 900px) {
    .intro { grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
}
.texte-intro .accroche { font: italic 600 clamp(19px, 2vw, 25px)/1.2 var(--serif); color: #f4dba6; }
.texte-intro .liberte { color: #eac994; margin-top: 12px; }
.filet {
    width: min(85%, 420px);
    height: 1px;
    position: relative;
    background: linear-gradient(90deg, transparent, #c38a43, transparent);
    margin: 13px auto;
}
.filet::after {
    position: absolute;
    content: '';
    top: -3px;
    left: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border: 1px solid #e0ad65;
    background: #21130d;
    transform: rotate(45deg);
}
.candidature { max-width: 760px; margin: 10px auto 0; }
.candidature > h2 {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 auto 12px;
    font: 500 28px/1 var(--serif);
    color: #f4dcad;
}
.candidature > h2::before, .candidature > h2::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, var(--ligne));
}
.candidature > h2::after { transform: scaleX(-1); }
.formulaire { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.large { grid-column: 1 / -1; }
.piege { display: none; }
label { display: block; margin-bottom: 5px; font-size: 15px; line-height: 1.2; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
    width: 100%;
    color: var(--encre);
    background: #eadbc4;
    border: 1px solid #c9ad86;
    border-radius: 5px;
    outline: none;
    padding: 8px 11px;
    min-height: 38px;
    font: 16px/1.3 system-ui, sans-serif;
    box-shadow: inset 0 1px 4px #4d25191c;
}
textarea { display: block; resize: vertical; min-height: 72px; }
input::placeholder, textarea::placeholder { color: #69594b; }
:where(input, textarea, select, button, summary, a):focus-visible {
    outline: 2px solid #f4c679;
    outline-offset: 3px;
}
button {
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 8px 13px;
    cursor: pointer;
    color: var(--ivoire);
    background: #2d1d15;
}
.principal {
    justify-self: center;
    margin: 3px 0 0;
    padding: 13px 24px;
    border-color: #be8945;
    background: linear-gradient(#681f25, #3c1116);
    box-shadow: 0 4px 12px #0008, inset 0 0 0 2px #35100e;
    color: #ffe8bc;
    font: 700 14px/1.2 var(--serif);
    text-transform: uppercase;
    letter-spacing: .075em;
    min-height: 44px;
}
button:hover { border-color: #efbc70; }
.principal:hover { background: linear-gradient(#7c2a2f, #4a161b); }
button:disabled { opacity: .75; cursor: wait; }
footer { margin-top: 12px; text-align: center; font: 14px/1.42 Georgia, serif; color: var(--sourd); }
footer details { margin-top: 4px; }

summary { cursor: pointer; color: #debd8d; width: fit-content; margin: 0 auto; }
a { color: #f0cf9c; }
.reception { margin: 22px 0 15px; text-align: center; }
.reception h2 { font-size: 26px; margin: 10px 0; }
.reception p { line-height: 1.5; }
.message { padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--ligne); background: #271911; }
.erreur { color: #ffe5d4; border-color: #ab5d53; background: #451b1d; }
.administration .cadre { max-width: 860px; margin: 0 auto; }
.administration h1 { font-size: clamp(35px, 5vw, 54px); margin-bottom: 24px; }
.connexion { max-width: 390px; }
.connexion button { margin-top: 12px; }
.deconnexion { margin-bottom: 16px; }
.dossier { border-top: 1px solid var(--ligne); padding: 14px 0; overflow-wrap: anywhere; }
.dossier .meta, .dossier .email { color: var(--sourd); margin: 6px 0; }
.motivation { margin: 10px 0; white-space: pre-wrap; }
.actions, .actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions select { width: auto; }
.actions label { margin: 0; }

@media (max-width: 640px) {
    body { padding: 18px 13px; background-attachment: scroll; }
    .cadre { padding: 18px 16px; }
    .intro { grid-template-columns: 1fr; gap: 6px; }
    .embleme img { width: 90px; }
    .candidature { margin-top: 20px; }
    .formulaire { grid-template-columns: 1fr; gap: 12px; }
    input, textarea, select { min-height: 44px; }
    .principal { width: 100%; }
}

@media (min-width: 641px) and (max-height: 860px) {
    body { padding-top: 24px; padding-bottom: 24px; }
    .cadre { padding-top: 16px; padding-bottom: 16px; }
    .embleme img { width: min(100%, 150px); }
    h1 { font-size: clamp(37px, 4vw, 49px); }
    .texte-intro p { margin-top: 6px; font-size: 16px; line-height: 1.3; }
    .texte-intro .accroche { font-size: clamp(19px, 2vw, 22px); }
    .texte-intro .liberte { margin-top: 8px; }
    .filet { margin: 9px auto; }
    .candidature { margin-top: 14px; }
    .candidature > h2 { margin-bottom: 10px; font-size: 26px; }
    .formulaire { row-gap: 8px; }
    footer { margin-top: 8px; }
    textarea { min-height: 66px; height: 66px; }
}

.donnees-personnelles {
    max-width: 780px;
    margin: 8px auto 0;
    padding-inline: clamp(6px, 1.5vw, 16px);
    text-align: left;
}
.donnees-personnelles p + p { margin-top: 7px; }
.donnees-personnelles a { text-decoration: underline; }
.reception p + p { margin-top: 7px; }

@media (min-width: 900px) {
    body { padding-block: 36px; }
    .cadre { min-height: calc(100svh - 72px); display: flex; flex-direction: column; justify-content: center; }
    .candidature { width: 100%; }
    .formulaire { grid-template-columns: 1fr 1.35fr 1.2fr; }
    .formulaire .champ-mail { grid-column: auto; }
}
@media (max-width: 899px) {
    .formulaire .champ-mail { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (min-height: 861px) {
    .cadre { gap: 24px; }
}

@media (pointer: coarse) {
    input, textarea, select { min-height: 44px; }
}

@media (min-width: 641px) {
    .embleme img { transform: translateY(16px); }
}
.texte-intro p + p { margin-top: 9px; }
.texte-intro .liberte { margin-top: 14px; }
.pilotage { max-width: 680px; text-align: center; }
.pilotage h1 { font-size: clamp(38px, 6vw, 58px); }
.pilotage p { margin-top: 18px; line-height: 1.45; }
.commandes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.commandes button { min-width: 110px; min-height: 44px; }
.commandes button:disabled { cursor: default; }
