/* Thème repris de french-craft.com : fond blanc, texte #404040, titres noirs en capitales,
   liens #2f6882, Open Sans ; bleu/rouge du logo FRC en accents. */
:root {
  --bg: #f0f0f0;
  --card: #ffffff;
  --line: #e3e3e3;
  --line-strong: #cccccc;
  --text: #404040;
  --title: #000000;
  --muted: #6b6f73;
  --accent: #2f6882;
  --accent-dark: #24526a;
  --frc-blue: #0047f8;
  --frc-red: #d63e2a;
  --danger: #c0392b;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 'Open Sans', Arial, 'Helvetica Neue', Helvetica, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 700; color: #222; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.tricolore { display: flex; height: 4px; }
.tricolore span { flex: 1; }
.tricolore span:nth-child(1) { background: var(--frc-blue); }
.tricolore span:nth-child(2) { background: #fff; }
.tricolore span:nth-child(3) { background: var(--frc-red); }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--title); }
.brand:hover { text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand span { font-weight: 800; font-size: 1.4rem; text-transform: uppercase; letter-spacing: -.02em; }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--title); text-transform: uppercase; font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
.site-header nav a:hover { color: var(--accent); text-decoration: none; }

/* Titres */
.hero { padding: 36px 0 8px; }
.kicker { margin: 0 0 4px; text-transform: uppercase; font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--frc-red); }
h1 { font-weight: 800; font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.15; text-transform: uppercase; letter-spacing: -.02em; color: var(--title); margin: 0 0 12px; }
h2 { font-weight: 800; font-size: 1.15rem; text-transform: uppercase; color: var(--title); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.lead { font-size: 1.08rem; max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .95rem; flex: none; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 16px 0; }
.narrow { max-width: 480px; }

.alert { background: #eaf2f6; border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 4px; margin: 16px 0; }
.alert-error { background: #fbecea; border-color: var(--danger); }

/* Options d'adhésion (couleurs des races, comme sur l'image des offres) */
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.option { position: relative; cursor: pointer; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; }
.option-body {
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--radius); padding: 18px 16px 16px; text-align: center;
  background: linear-gradient(180deg, var(--opt) 0%, color-mix(in srgb, var(--opt) 55%, #000) 100%);
  border: 3px solid transparent; outline: 1px solid rgba(0, 0, 0, .06);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.option:hover .option-body { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.option input:focus-visible + .option-body { outline: 3px solid var(--frc-blue); outline-offset: 2px; }
.option input:checked + .option-body { border-color: #fff; box-shadow: 0 0 0 3px var(--opt), 0 8px 22px rgba(0, 0, 0, .25); transform: translateY(-2px); }
.option input:checked + .option-body::after {
  content: '✓'; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--opt); font-weight: 800; display: grid; place-items: center;
}
.option-name { font-weight: 800; font-size: 1.4rem; color: #fff; text-transform: uppercase; letter-spacing: .03em; }
.option-price { font-size: 2.3rem; font-weight: 800; color: #fff; line-height: 1; margin-top: 10px; }
.option-min { font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .85); text-transform: uppercase; letter-spacing: .08em; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .3); margin-bottom: 12px; }
.option ul { margin: 0; padding: 12px 14px 12px 28px; text-align: left; font-size: .88rem; background: #fff; color: var(--text); border-radius: 4px; flex: 1; }
.option ul strong { color: var(--opt); }

.option-img { width: 112px; height: 112px; margin: 10px auto 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); transition: transform .2s; }
.option:hover .option-img, .option input:checked + .option-body .option-img { transform: scale(1.06); }
.option-price { margin-top: 8px !important; }

/* Onglets « Première adhésion / Déjà adhérent » (sans JS, grâce à :has) */
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow); margin: 8px 0 0; }
.mode-tabs label { margin: 0; position: relative; cursor: pointer; }
.mode-tabs input { position: absolute; opacity: 0; inset: 0; }
.mode-tabs span { display: block; text-align: center; padding: 12px 10px; border-radius: 4px; font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .03em; color: var(--muted); transition: all .15s; }
.mode-tabs label:hover span { color: var(--title); }
.mode-tabs input:checked + span { background: var(--accent); color: #fff; }
.mode-tabs input:focus-visible + span { outline: 3px solid var(--frc-blue); outline-offset: 2px; }
.only-renewal { display: none; }
.form:has(#mode-renewal:checked) .only-renewal { display: block; }
.form:has(#mode-renewal:checked) label.only-renewal { display: flex; }
.form:has(#mode-renewal:checked) .only-new,
.form:has(#mode-renewal:checked) .only-new-inline { display: none; }
.form:has(#mode-renewal:checked) .identity:not(.is-forced) { display: none; }
.form:has(#mode-renewal:checked):has(#update_identity:checked) .identity { display: grid; }
.identity.is-forced .hint.only-renewal { display: none !important; }
.email-field { max-width: 480px; }
.option-image-field { display: flex; gap: 14px; align-items: center; }
.option-image-field img { border-radius: 50%; background: var(--opt); flex: none; }

/* Choix de goodie / taille */
.choices { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0 0; }
.choices[hidden] { display: none; }
.choices legend { font-weight: 800; text-transform: uppercase; font-size: .85rem; padding: 0 6px; color: var(--title); }
.choice-group + .choice-group { margin-top: 12px; }
.choice-label { display: block; font-weight: 600; margin-bottom: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; margin: 0; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: inline-block; min-width: 48px; text-align: center; padding: 8px 16px; border: 2px solid var(--line-strong); border-radius: 999px; font-weight: 600; background: #fff; transition: all .15s; }
.pill:hover span { border-color: var(--accent); }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--frc-blue); outline-offset: 2px; }

/* Montant */
.amount { margin-top: 22px; padding: 16px; background: #f7f9fa; border-radius: var(--radius); border-left: 4px solid var(--accent); }
.amount label { font-weight: 700; }
.amount-input { position: relative; max-width: 200px; }
.amount-input input { font-size: 1.4rem; font-weight: 700; padding-right: 40px; }
.amount-input .currency { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; font-weight: 700; color: var(--muted); }
.amount-min { margin: 8px 0 0; font-size: .95rem; }
.amount-min strong { color: var(--accent); text-transform: uppercase; font-size: 1rem; }
.amount-min.is-below strong { color: var(--danger); }
input.is-below { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .15) !important; }

/* Champs */
.form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { margin-bottom: 14px; }
.field-wide { grid-column: 1 / -1; }
label { display: block; font-weight: 600; margin-bottom: 4px; color: #222; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search], input:not([type]), textarea, select {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 4px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 104, 130, .18); }
input[type=color] { width: 60px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.req { color: var(--frc-red); }
.field-error { color: var(--danger); font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; color: var(--text); }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff; font: 700 .95rem 'Open Sans', sans-serif; text-transform: uppercase; letter-spacing: .03em;
  padding: 12px 22px; border-radius: 4px; margin-top: 12px;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-big { width: 100%; padding: 16px; font-size: 1.05rem; margin-top: 18px; }
.btn-ghost { background: #fff; border: 1px solid var(--line-strong); color: var(--title); }
.btn-ghost:hover { background: #f4f4f4; color: var(--title); }
.btn-small { padding: 7px 14px; font-size: .8rem; margin-top: 0; }
.btn-danger { background: var(--danger); }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
form.inline { display: inline; }
.steps li { margin-bottom: 8px; }

.site-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .85rem; padding: 24px 0; margin-top: 40px; text-align: center; }
.site-footer a { color: var(--muted); }

/* Espace bureau */
.admin-bar { display: flex; justify-content: flex-end; gap: 12px; padding-top: 16px; color: var(--muted); font-size: .9rem; }
.admin h1 { margin-top: 12px; font-size: 1.8rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--muted); box-shadow: var(--shadow); }
a.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--title); }
.stat-alert { border-color: var(--frc-red); border-width: 2px; }
.stat-alert strong { color: var(--frc-red); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; }
.filters input[type=search] { flex: 1; min-width: 160px; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
.table td.wrap-cell { white-space: pre-line; min-width: 200px; }
.table th { background: #fafafa; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: #f6f9fb; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--opt); color: #fff; font-size: .8rem; font-weight: 700; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; text-transform: uppercase; letter-spacing: .03em; }
.status-pending { background: #fff1d6; color: #8a5a00; }
.status-validated { background: #e1f3dc; color: #2d6a1f; }
.status-refused { background: #fbe1de; color: #9b2c1f; }
.detail-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }
.pre { white-space: pre-wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 8px; }
.history { padding-left: 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: .8rem; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--title); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--title); }
.option-edit { border-left: 6px solid var(--opt); }
.option-edit .grid-3 { display: grid; grid-template-columns: 2fr 1fr auto auto; gap: 0 14px; align-items: end; }
.option-edit.inactive { opacity: .65; }
.hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }

@media (max-width: 700px) {
  .form .grid, .detail-grid, .option-edit .grid-3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { margin-top: 6px; }
  .site-header nav { gap: 14px; }
}
