:root {
  --marine: #0D1245;
  --or: #DDB670;
  --orange: #F0822D;
  --fond: #F6F4EF;
  --carte: #FFFFFF;
  --texte: #1C1F33;
  --doux: #5F6278;
  --ligne: #E2DFD6;
  --rouge: #B3261E;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; color: var(--marine); line-height: 1.2; }
h1 { font-size: 1.9rem; margin: 0 0 .5rem; }
h2 { font-size: 1.3rem; margin: 0 0 .5rem; }
a { color: var(--marine); }

.bandeau { background: var(--marine); color: #fff; border-bottom: 3px solid var(--or); }
.bandeau-int { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.marque { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font-family: Georgia, serif; font-size: 1.1rem; }
.marque img { height: 34px; width: auto; }
.marque span { border-left: 1px solid rgba(255,255,255,.35); padding-left: 14px; color: var(--or); }
.nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.nav a, .nav .lien { color: #fff; text-decoration: none; font-size: .95rem; opacity: .9; }
.nav a:hover, .nav .lien:hover { opacity: 1; text-decoration: underline; }
.inline { display: inline; margin: 0; }
button.lien { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

main { max-width: 1200px; margin: 0 auto; padding: 32px 16px 64px; }
main.etroit { max-width: 560px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; padding: 24px; margin: 0 0 20px; }
.carte.danger { border-color: #EBC5C2; }
.aide { color: var(--doux); font-size: .9rem; }
.titre-ligne { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.titre-ligne h1 { margin: 0; }

form label { display: block; margin: 0 0 16px; font-weight: 600; font-size: .95rem; }
input[type=email], input[type=password], input:not([type]), select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: normal;
  border: 1px solid #C9C5B9; border-radius: 6px; background: #fff; color: var(--texte);
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--or); outline-offset: 1px; }
input:disabled { background: #F0EEE8; color: var(--doux); }
label.case { display: flex; gap: 10px; align-items: center; font-weight: normal; }
label.case input { width: 18px; height: 18px; margin: 0; }
fieldset { border: 1px solid var(--ligne); border-radius: 8px; padding: 12px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }
.ligne-acces { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; align-items: center; font-weight: normal; margin-bottom: 10px; }
.ligne-acces select { margin-top: 0; }

button, .bouton {
  display: inline-block; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--marine);
  background: #fff; color: var(--marine); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
button.principal, .bouton.principal { background: var(--marine); color: #fff; }
button.principal:hover, .bouton.principal:hover { background: #1C2470; }
button.danger { border-color: var(--rouge); color: var(--rouge); }
form .principal { width: 100%; }
.titre-ligne .principal { width: auto; }

.message { padding: 12px 14px; border-radius: 6px; margin: 0 0 16px; }
.message.erreur { background: #FBEAE9; color: var(--rouge); border: 1px solid #EBC5C2; }
.message.info { background: #FBF5E8; border: 1px solid var(--or); }
.message.provisoire code { font-size: 1.3rem; letter-spacing: .05em; background: #fff; padding: 4px 10px; border-radius: 4px; user-select: all; }
.message p { margin: .3rem 0; }

.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.tuile { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--carte); border: 1px solid var(--ligne); border-top: 4px solid var(--or); border-radius: 10px; text-decoration: none; color: var(--texte); }
.tuile:hover { border-top-color: var(--orange); box-shadow: 0 4px 14px rgba(13,18,69,.08); }
.tuile strong { font-family: Georgia, serif; font-weight: normal; font-size: 1.25rem; color: var(--marine); }
.tuile span { color: var(--doux); font-size: .92rem; }
.tuile em { font-style: normal; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); margin-top: auto; }

.table-defile { overflow-x: auto; background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
th { background: #FAF8F3; font-weight: 600; color: var(--marine); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.inactif td { opacity: .55; }
td .aide { font-size: .85rem; }
.vide { color: #BBB; }
.badge { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 10px; background: var(--marine); color: #fff; vertical-align: middle; }
.badge.gris { background: #888; }
.badge.orange { background: var(--orange); }

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  .carte { padding: 18px; }
  .ligne-acces { grid-template-columns: 1fr; gap: 4px; }
  .marque span { display: none; }
}
