:root {
  --navy: #1B3A6B; --teal: #0E7C86; --teal-light: #E3F2F3; --gold: #F2A900;
  --bg: #F5F7FA; --surface: #FFFFFF; --text: #1F2933; --muted: #5F6B7A;
  --border: #DDE3EA; --danger: #C62828; --danger-bg: #FDECEA; --ok: #2E7D32; --ok-bg: #E8F5E9;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--teal); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }

/* En-tête */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: .6rem 1rem; display: flex;
                 align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand img { height: 38px; display: block; }
.nav { display: flex; gap: 1rem; align-items: center; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.nav form { margin: 0; }
.plan { font-size: .8rem; background: var(--teal-light); color: var(--teal); padding: .15rem .6rem;
        border-radius: 999px; font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Boutons et formulaires */
.btn, button { display: inline-block; background: var(--teal); color: #fff; border: 0;
               border-radius: 6px; padding: .55rem 1.1rem; font: inherit; font-weight: 600;
               cursor: pointer; text-decoration: none; }
.btn:hover, button:hover { filter: brightness(1.08); }
.btn.secondary, button.secondary { background: var(--surface); color: var(--navy);
                                   border: 1px solid var(--border); }
.btn.gold { background: var(--gold); color: var(--navy); }
button.link { background: none; color: var(--muted); padding: 0; font-weight: 500; }
button.danger { background: var(--danger); }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 6px;
  font: inherit; background: #fff; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; min-height: 6rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
          gap: .25rem .75rem; margin: .25rem 0; }
.checks label { font-weight: 400; margin: 0; display: flex; gap: .4rem; align-items: center; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }
.actions { margin-top: 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* Messages */
.flash { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid; }
.flash.info { background: var(--teal-light); border-color: #B5DADD; }
.flash.succes { background: var(--ok-bg); border-color: #B7DDB9; }
.flash.erreur { background: var(--danger-bg); border-color: #F3B8B3; color: #8E1C1C; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--border);
         vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.tag { font-size: .75rem; background: #EEF1F5; padding: .1rem .5rem; border-radius: 4px;
       color: var(--muted); white-space: nowrap; }

/* Projets */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.project-card { display: block; text-decoration: none; color: inherit; }
.project-card:hover { border-color: var(--teal); }
.project-card h3 { margin: .25rem 0; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: 1rem 0 1.5rem;
        overflow-x: auto; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600;
          border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--teal); border-color: var(--teal); }

/* Résultats */
.bar { background: #EEF1F5; border-radius: 4px; height: 10px; min-width: 120px; }
.bar span { display: block; height: 100%; border-radius: 4px; background: var(--teal); }
.big { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
details { margin-top: .5rem; }
summary { cursor: pointer; color: var(--teal); font-weight: 600; }

/* Accueil */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center;
        padding: 2rem 0; }
.hero h1 { font-size: 2.2rem; }
.hero p { font-size: 1.1rem; color: var(--muted); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; padding: .5rem 0 .5rem 2.5rem; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .45rem;
                    width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--teal);
                    color: #fff; display: grid; place-items: center; font-weight: 700; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
           gap: 1rem; }
.pricing .card.featured { border: 2px solid var(--teal); }
.pricing ul { padding-left: 1.1rem; }
.auth { max-width: 440px; margin: 2rem auto; }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }
footer p { margin: 0 0 .5rem; }
.footer-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.prototype { background: #FFF6DB; border-bottom: 1px solid #F1D98B; color: #5C4600;
             text-align: center; font-size: .875rem; padding: .45rem 1rem; }
.prototype a { color: inherit; font-weight: 600; }
label.consent { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400;
                font-size: .9rem; margin-top: 1rem; }
label.consent input { margin-top: .25rem; }
.legal { max-width: 820px; }
.legal h2 { margin-top: 1.75rem; }
.legal dl, dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem;
                        margin: 0 0 1rem; }
.legal dt, dl.details dt { font-weight: 600; }
.legal dd, dl.details dd { margin: 0; }
.danger-zone input[type=password] { max-width: 380px; }
.danger-zone { border-color: #F3B8B3; }
.danger-zone h2 { color: var(--danger); margin-top: 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
}
