/* Pages de la carte de membre du Syndicat (générateur, carte, vérification).
   Chargée uniquement sur ces pages. */

@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/google/dmmono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(../fonts/google/dmmono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.vgc { padding: 48px 0 80px; }
.vgc-head { max-width: 640px; margin-bottom: 32px; }
.vgc-eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #6b6b6b; margin-bottom: 8px; }
.vgc-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin-bottom: 12px; }
.vgc-lede { color: #4a4a4a; font-size: 16px; line-height: 1.6; margin: 0; }

/* Générateur : formulaire à gauche, aperçu collant à droite ; sur mobile
   l'aperçu passe AU-DESSUS du formulaire, pour voir la carte en tapant. */
.vgc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: start; }
.vgc-preview { position: sticky; top: 100px; order: 2; }
.vgc-form { order: 1; min-width: 0; }
@media (max-width: 991px) {
  .vgc-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .vgc-preview { position: static; order: 0; }
}
.vgc-canvas-wrap { background: #e9e4dc; padding: 18px; border-radius: 6px; }
.vgc-canvas-wrap canvas { width: 100%; height: auto; display: block; border-radius: 3.6% / 5.7%; box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.vgc-preview-note { font-size: 13px; color: #6b6b6b; margin: 10px 2px 0; }

.vgc-field { margin-bottom: 18px; }
.vgc-field > label, .vgc-label { display: block; font-size: 14px; font-weight: 600; color: #141210; margin-bottom: 6px; }
.vgc-field .vgc-hint { font-size: 13px; color: #6b6b6b; margin-top: 5px; }
.vgc-input, .vgc-select {
  width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px; color: #141210;
  background: #fff; border: 1px solid #cfc8bc; border-radius: 4px;
}
.vgc-input:focus, .vgc-select:focus { border-color: #141210; outline: none; }
.vgc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 575px) { .vgc-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Photo : deux boutons (galerie / appareil), puis recadrage circulaire. */
.vgc-photo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vgc-photo-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 1px solid #141210; background: #fff; color: #141210; font-weight: 600; font-size: 14px;
  cursor: pointer; border-radius: 4px;
}
.vgc-photo-btn:hover { background: #141210; color: #fff; }
.vgc-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.vgc-crop { display: none; margin-top: 16px; gap: 18px; align-items: center; flex-wrap: wrap; }
.vgc-crop.is-on { display: flex; }
.vgc-crop-view {
  position: relative; width: 220px; height: 220px; border-radius: 50%; overflow: hidden;
  background: #2a2a2d; touch-action: none; cursor: grab; flex: none;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px #cfc8bc;
}
.vgc-crop-view:active { cursor: grabbing; }
.vgc-crop-view canvas { width: 100%; height: 100%; display: block; }
.vgc-crop-tools { flex: 1; min-width: 180px; }
.vgc-crop-tools input[type="range"] { width: 100%; accent-color: #5e3916; min-height: 32px; }
.vgc-crop-tools p { font-size: 13px; color: #6b6b6b; margin: 6px 0 0; }

.vgc-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: #3a3a3a; background: #f6f2ec; padding: 14px; border-radius: 4px; }
.vgc-consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: #141210; }
.vgc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vgc-submit { width: 100%; min-height: 54px; font-size: 16px; margin-top: 8px; }
.vgc-error { background: #fdecea; color: #8a1c1c; padding: 12px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 16px; }

/* Page « ma carte » */
.vgc-result { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 991px) { .vgc-result { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.vgc-downloads { display: grid; gap: 10px; margin: 18px 0 22px; }
.vgc-dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px;
  padding: 10px 16px; border: 1px solid #141210; background: #fff; color: #141210; text-align: left;
  font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 4px; width: 100%;
}
.vgc-dl small { display: block; font-weight: 400; color: #6b6b6b; font-size: 13px; }
.vgc-dl.is-primary { background: #141210; color: #fff; }
.vgc-dl.is-primary small { color: rgba(255,255,255,.7); }
.vgc-dl:hover { border-color: #5e3916; }
.vgc-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; font-size: 14px; margin: 0; }
.vgc-meta dt { color: #6b6b6b; font-weight: 400; }
.vgc-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vgc-mono { font-family: 'DM Mono', ui-monospace, Consolas, monospace; letter-spacing: .02em; }
.vgc-notice { padding: 14px 16px; border-radius: 4px; font-size: 14px; line-height: 1.55; margin-bottom: 18px; background: #f6f2ec; }
.vgc-notice.is-warn { background: #fff4e5; color: #6a3c00; }
.vgc-notice.is-bad { background: #fdecea; color: #8a1c1c; }

/* Page publique de vérification */
.vgv { max-width: 460px; margin: 0 auto; padding: 48px 0 80px; text-align: center; }
.vgv-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 99px;
  font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 24px;
}
.vgv-badge.is-valide { background: #e7f4ec; color: #1e5c37; }
.vgv-badge.is-expiree, .vgv-badge.is-en_attente_validation, .vgv-badge.is-en_attente_paiement { background: #fff4e5; color: #6a3c00; }
.vgv-badge.is-suspendue, .vgv-badge.is-revoquee, .vgv-badge.is-inconnue { background: #fdecea; color: #8a1c1c; }
.vgv-photo { display: block; margin-left: auto; margin-right: auto; width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 5px #fff, 0 0 0 6px #d8d1c6; margin-bottom: 20px; }
.vgv .vgv-nom { font-size: 26px; line-height: 1.2; margin-bottom: 6px; text-wrap: balance; }
.vgv-fonction { color: #4a4a4a; margin-bottom: 18px; }
.vgv .vgc-meta { text-align: left; max-width: 320px; margin: 0 auto 24px; }
.vgv-foot { font-size: 13px; color: #6b6b6b; }
