/* PRDIA — charte graphique (section 9 du cahier des charges) */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

:root {
  --rdc-blue: #007FFF;
  --rdc-red: #CE1021;
  --rdc-yellow: #F7D618;
  --rdc-navy: #003F7F;
  --ink: #1F2937;
  --ink-soft: #4B5563;
  --line: #E2E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FA;
  --ok: #157F3D;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg-soft); }
h1, h2, h3, h4 { font-family: "Montserrat", "Inter", sans-serif; color: var(--rdc-navy); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
a { color: var(--rdc-navy); }
a:hover { color: var(--rdc-blue); }
p { margin: 0 0 1em; }
img { max-width: 100%; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* En-tête : bleu ciel, diagonale rouge bordée de jaune */
.site-header { background: var(--rdc-blue); color: #fff; position: relative; overflow: hidden; }
.site-header::after { content: ""; position: absolute; right: -40px; top: -20px; width: 260px; height: 140%; background: var(--rdc-red); border-left: 8px solid var(--rdc-yellow); border-right: 8px solid var(--rdc-yellow); transform: skewX(-35deg); opacity: .95; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; position: relative; z-index: 1; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 1.25rem; letter-spacing: .02em; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: .72rem; letter-spacing: 0; opacity: .92; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a { color: #fff; text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .16); color: #fff; }
.nav form { margin: 0; }
.nav button.linklike { background: none; border: 0; color: #fff; font: inherit; font-weight: 500; padding: 8px 12px; cursor: pointer; border-radius: 8px; }
.nav button.linklike:hover { background: rgba(255, 255, 255, .16); }

.flag-rule { height: 6px; background: linear-gradient(90deg, var(--rdc-blue) 0 60%, var(--rdc-yellow) 60% 64%, var(--rdc-red) 64% 96%, var(--rdc-yellow) 96%); }

main { padding: 32px 0 56px; }

/* Boutons */
.btn { display: inline-block; border: 0; border-radius: 8px; padding: 11px 20px; font: 600 .98rem "Inter", sans-serif; text-decoration: none; cursor: pointer; transition: transform .05s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rdc-blue); color: #fff; }
.btn-primary:hover { background: var(--rdc-navy); color: #fff; }
.btn-cta { background: var(--rdc-red); color: #fff; }
.btn-cta:hover { background: #A50D1A; color: #fff; }
.btn-ghost { background: #fff; color: var(--rdc-navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--rdc-blue); }
.btn-small { padding: 6px 12px; font-size: .88rem; }

/* Héros */
.hero { background: var(--rdc-navy); color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 55%; top: -30%; width: 220px; height: 170%; background: var(--rdc-red); border-left: 10px solid var(--rdc-yellow); border-right: 10px solid var(--rdc-yellow); transform: skewX(-35deg); opacity: .9; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 680px; }
.hero h1 em { font-style: normal; color: var(--rdc-yellow); }
.hero p.lead { font-size: 1.15rem; max-width: 600px; opacity: .95; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: -32px; position: relative; z-index: 2; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--rdc-blue); }
.stat:nth-child(2) { border-top-color: var(--rdc-yellow); }
.stat:nth-child(3) { border-top-color: var(--rdc-red); }
.stat strong { display: block; font-family: "Montserrat", sans-serif; font-size: 1.9rem; color: var(--rdc-navy); }
.stat span { color: var(--ink-soft); font-size: .92rem; }

/* Cartes et grilles */
.section { margin-top: 48px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .3em; }
.card .meta { color: var(--ink-soft); font-size: .9rem; }
.layout-sidebar { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .layout-sidebar { grid-template-columns: 1fr; } }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.badge-verified { background: #E8F3FF; color: var(--rdc-navy); border-color: #B9DAFF; }
.badge-verified::before { content: "★ "; color: var(--rdc-yellow); -webkit-text-stroke: .4px var(--rdc-navy); }
.badge-warn { background: #FFF8D6; color: #6B5800; border-color: #F2DD6B; }
.badge-red { background: #FDECEE; color: var(--rdc-red); border-color: #F6C1C7; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--rdc-blue), var(--rdc-navy)); }

/* Formulaires */
form p, .field { margin: 0 0 14px; }
label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rdc-blue); outline-offset: 1px; border-color: var(--rdc-blue); }
select[multiple] { min-height: 140px; }
.checks ul, ul.checks, form ul[id] { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; }
form ul[id] label, .checks label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.helptext { color: var(--ink-soft); font-size: .85rem; }
.errorlist { color: var(--rdc-red); list-style: none; padding: 0; margin: 4px 0; font-size: .9rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 20px; background: #fff; }
legend { font-family: "Montserrat", sans-serif; font-weight: 600; color: var(--rdc-navy); padding: 0 8px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; border-bottom: 1px dashed var(--line); padding: 10px 0; }
.form-row p { margin: 0; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .85rem; color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; background: #E8F3FF; border-left: 4px solid var(--rdc-blue); }
.messages li.success { background: #E7F6EC; border-color: var(--ok); }
.messages li.warning { background: #FFF8D6; border-color: var(--rdc-yellow); }
.messages li.error { background: #FDECEE; border-color: var(--rdc-red); }

.pagination { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.muted { color: var(--ink-soft); }
.facet a { display: flex; justify-content: space-between; text-decoration: none; padding: 4px 0; }

.site-footer { background: var(--rdc-navy); color: #DCE8F7; padding: 32px 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
