/* ============================================================
   2A-ULBO – Feuille de styles principale
   Couleurs : Vert #1a7a35, Or #f5c518, Blanc
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* ----- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --vert:       #1a7a35;
  --vert-dark:  #0f5224;
  --vert-light: #e8f5ec;
  --or:         #f5c518;
  --or-dark:    #c9a010;
  --blanc:      #ffffff;
  --gris-1:     #f7f8fa;
  --gris-2:     #e9ecef;
  --gris-3:     #adb5bd;
  --gris-4:     #495057;
  --noir:       #1a1a2e;
  --rouge:      #dc3545;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.16);
  --radius:     12px;
  --radius-sm:  8px;
  --transition: all .25s ease;
  --font-body:  'Source Sans 3', sans-serif;
  --font-head:  'Playfair Display', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gris-1);
  color: var(--noir);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
}

/* ----- Typography ------------------------------------------ */
h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p  { margin-bottom: .75rem; }
a  { color: var(--vert); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--vert-dark); }

/* ----- Header ---------------------------------------------- */
.site-header {
  background: linear-gradient(135deg, var(--vert-dark) 0%, var(--vert) 60%, #22963f 100%);
  padding: 1.25rem 0;
  box-shadow: var(--shadow-md);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 1100px; margin: auto; padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1rem;
}
.header-logo { width: 64px; height: 64px; object-fit: contain; }
.header-text h1 { color: var(--or); font-size: 1.2rem; }
.header-text p  { color: rgba(255,255,255,.8); font-size: .8rem; margin: 0; }

/* ----- Hero Banner ----------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--vert-dark) 0%, var(--vert) 100%);
  color: var(--blanc);
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.hero-content { position: relative; max-width: 700px; margin: auto; }
.hero h1 { color: var(--blanc); margin-bottom: .5rem; }
.hero .subtitle { font-size: 1.05rem; color: rgba(255,255,255,.85); margin-bottom: 2rem; }
.hero-badge {
  display: inline-block;
  background: var(--or); color: var(--vert-dark);
  font-weight: 700; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; padding: .3rem .9rem; border-radius: 50px;
  margin-bottom: 1.5rem;
}

/* ----- Conteneur principal --------------------------------- */
.container { max-width: 1100px; margin: auto; padding: 0 1.5rem; }
.section    { padding: 3rem 0; }

/* ----- Cartes de choix d'adhésion (page d'accueil) --------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.adhesion-card {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  border: 2px solid transparent;
  display: flex; flex-direction: column;
}
.adhesion-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--vert);
}
.card-header-band {
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-head);
}
.card-header-band.standard { background: var(--vert); color: var(--blanc); }
.card-header-band.premium  { background: linear-gradient(135deg, #2c1810, #8B6914); color: var(--or); }
.card-header-band h2 { font-size: 1.5rem; margin: 0; }
.card-header-band .price {
  font-size: 2rem; font-weight: 700; margin-top: .5rem; display: block;
}
.card-body { padding: 1.75rem; flex: 1; }
.card-body ul { list-style: none; }
.card-body ul li {
  padding: .4rem 0;
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .95rem; color: var(--gris-4);
  border-bottom: 1px dashed var(--gris-2);
}
.card-body ul li:last-child { border: none; }
.card-body ul li::before { content: '✓'; color: var(--vert); font-weight: 700; flex-shrink: 0; }
.card-footer { padding: 1.5rem; text-align: center; }

/* ----- Boutons --------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 2rem;
  border-radius: 50px; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  letter-spacing: .03em; transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--vert); color: var(--blanc);
  box-shadow: 0 4px 14px rgba(26,122,53,.35);
}
.btn-primary:hover {
  background: var(--vert-dark); transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,122,53,.45); color: var(--blanc);
}
.btn-gold {
  background: linear-gradient(135deg, var(--or), var(--or-dark));
  color: var(--vert-dark);
  box-shadow: 0 4px 14px rgba(245,197,24,.4);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245,197,24,.5);
  color: var(--vert-dark);
}
.btn-outline {
  background: transparent; color: var(--vert);
  border: 2px solid var(--vert);
}
.btn-outline:hover { background: var(--vert); color: var(--blanc); }
.btn-danger  { background: var(--rouge); color: var(--blanc); }
.btn-danger:hover { background: #b02a37; color: var(--blanc); }
.btn-sm { padding: .45rem 1.2rem; font-size: .875rem; }
.btn-block { width: 100%; display: flex; }

/* ----- Formulaires ----------------------------------------- */
.form-wrapper {
  background: var(--blanc);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  max-width: 760px; margin: 2rem auto;
}
.form-title-band {
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem 2.5rem;
  margin: -2.5rem -2.5rem 2rem;
  text-align: center;
}
.form-title-band.standard { background: var(--vert); color: var(--blanc); }
.form-title-band.premium  { background: linear-gradient(135deg, #2c1810, #8B6914); color: var(--or); }
.form-title-band h2 { font-size: 1.4rem; margin: 0; }
.form-title-band p  { margin: .4rem 0 0; font-size: .9rem; opacity: .85; }

.form-group { margin-bottom: 1.4rem; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: .45rem;
  color: var(--gris-4); font-size: .9rem;
}
.form-group label .required { color: var(--rouge); margin-left: 2px; }
.form-group .hint { font-size: .8rem; color: var(--gris-3); margin-top: .25rem; }

.form-control {
  width: 100%; padding: .7rem 1rem;
  border: 1.5px solid var(--gris-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .95rem;
  background: var(--blanc); color: var(--noir);
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--vert);
  box-shadow: 0 0 0 3px rgba(26,122,53,.15);
}
.form-control.is-invalid { border-color: var(--rouge); }
.invalid-feedback { color: var(--rouge); font-size: .8rem; margin-top: .3rem; }

textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control    { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 580px) { .form-row { grid-template-columns: 1fr; } }

/* Radios & Checkboxes */
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .4rem; }
.radio-item, .check-item {
  display: flex; align-items: center; gap: .45rem;
  cursor: pointer; font-size: .95rem;
}
.radio-item input, .check-item input { accent-color: var(--vert); width: 16px; height: 16px; }

/* Niveaux premium */
.premium-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.level-card {
  border: 2px solid var(--gris-2); border-radius: var(--radius-sm);
  padding: .75rem; cursor: pointer; transition: var(--transition); text-align: center;
  position: relative;
}
.level-card:has(input:checked), .level-card.selected {
  border-color: var(--or); background: #fffbea;
}
.level-card input { position: absolute; opacity: 0; }
.level-card .lv-name { font-weight: 700; font-size: .9rem; }
.level-card .lv-price { color: var(--vert); font-size: 1.1rem; font-weight: 700; margin-top: .25rem; }

/* File upload */
.file-upload-area {
  border: 2px dashed var(--gris-3); border-radius: var(--radius-sm);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--gris-1);
}
.file-upload-area:hover, .file-upload-area.dragover {
  border-color: var(--vert); background: var(--vert-light);
}
.file-upload-area input[type="file"] { display: none; }
.file-upload-area .upload-icon { font-size: 2rem; margin-bottom: .5rem; }
.file-preview { margin-top: 1rem; }
.file-preview img { max-width: 120px; max-height: 120px; border-radius: var(--radius-sm); object-fit: cover; }

/* Étapes */
.steps-bar {
  display: flex; justify-content: center; gap: 0; margin-bottom: 2rem; flex-wrap: wrap;
}
.step-item {
  display: flex; flex-direction: column; align-items: center;
  position: relative; flex: 1; max-width: 160px;
}
.step-item:not(:last-child)::after {
  content: ''; position: absolute; top: 18px; left: 50%; width: 100%;
  height: 2px; background: var(--gris-2); z-index: 0;
}
.step-item.done::after  { background: var(--vert); }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; position: relative; z-index: 1;
  border: 2px solid var(--gris-2); background: var(--blanc); color: var(--gris-3);
}
.step-item.active .step-circle { border-color: var(--vert); color: var(--vert); }
.step-item.done   .step-circle { border-color: var(--vert); background: var(--vert); color: var(--blanc); }
.step-label { font-size: .75rem; margin-top: .4rem; color: var(--gris-3); text-align: center; }
.step-item.active .step-label { color: var(--vert); font-weight: 600; }

/* Section formulaire */
.form-section {
  border-left: 3px solid var(--vert);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}
.form-section-title {
  font-family: var(--font-head);
  color: var(--vert-dark); margin-bottom: 1rem; font-size: 1.05rem;
}

/* ----- Alertes & Flash ------------------------------------- */
.alert {
  padding: .9rem 1.2rem; border-radius: var(--radius-sm);
  margin-bottom: 1.25rem; display: flex; align-items: flex-start; gap: .75rem;
  font-size: .9rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error, .alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

/* ----- Badges ---------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .7rem; border-radius: 50px;
  font-size: .75rem; font-weight: 700; letter-spacing: .05em;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #e0f2fe; color: #075985; }
.badge-secondary { background: var(--gris-2); color: var(--gris-4); }

/* ----- Tableau Admin --------------------------------------- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--blanc);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  background: var(--vert); color: var(--blanc);
  padding: .9rem 1rem; text-align: left; font-size: .85rem;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.data-table td {
  padding: .8rem 1rem; border-bottom: 1px solid var(--gris-2);
  font-size: .88rem; vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--gris-1); }
.data-table tbody tr:last-child td { border: none; }

/* ----- Sidebar Admin --------------------------------------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; background: var(--vert-dark); color: var(--blanc);
  flex-shrink: 0; display: flex; flex-direction: column;
  padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  padding: 1.5rem; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand img { width: 60px; margin-bottom: .5rem; }
.sidebar-brand h3 { color: var(--or); font-size: 1rem; margin: 0; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.5rem; color: rgba(255,255,255,.8);
  transition: var(--transition); cursor: pointer;
  text-decoration: none; font-size: .9rem;
}
.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,.1); color: var(--blanc);
  border-left: 3px solid var(--or);
}
.nav-item .icon { width: 18px; text-align: center; }
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.admin-main { flex: 1; padding: 2rem; background: var(--gris-1); overflow-y: auto; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
}
.admin-topbar h1 { font-size: 1.5rem; color: var(--vert-dark); }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--blanc); border-radius: var(--radius-sm);
  padding: 1.25rem; box-shadow: var(--shadow-sm); text-align: center;
}
.stat-card .stat-number { font-size: 2rem; font-weight: 700; color: var(--vert); font-family: var(--font-head); }
.stat-card .stat-label  { font-size: .8rem; color: var(--gris-3); text-transform: uppercase; letter-spacing: .06em; }

/* Filtre & recherche */
.filter-bar {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem;
}
.filter-bar .form-control { max-width: 200px; }

/* ----- Page de paiement ------------------------------------ */
.payment-box {
  max-width: 560px; margin: 3rem auto;
  background: var(--blanc); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.payment-header { background: var(--vert); color: var(--blanc); padding: 1.5rem 2rem; }
.payment-header h2 { margin: 0; }
.payment-body { padding: 2rem; }
.amount-display {
  text-align: center; margin: 1.5rem 0;
  font-size: 2.5rem; font-weight: 700;
  color: var(--vert); font-family: var(--font-head);
}
.amount-display span { display: block; font-size: .9rem; color: var(--gris-3); font-family: var(--font-body); font-weight: 400; }
.payment-methods { display: flex; flex-direction: column; gap: .75rem; margin: 1.5rem 0; }
.payment-method-btn {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--gris-2); border-radius: var(--radius-sm);
  background: var(--blanc); cursor: pointer; transition: var(--transition);
  text-align: left; width: 100%;
}
.payment-method-btn:hover { border-color: var(--vert); background: var(--vert-light); }
.payment-method-btn .pm-icon { font-size: 1.75rem; }
.payment-method-btn .pm-name { font-weight: 600; font-size: .95rem; }
.payment-method-btn .pm-desc { font-size: .8rem; color: var(--gris-3); }

/* ----- Page succès ----------------------------------------- */
.success-page { text-align: center; padding: 4rem 1.5rem; max-width: 560px; margin: auto; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-page h2 { color: var(--vert); margin-bottom: .75rem; }
.dossier-box {
  background: var(--vert-light); border: 1.5px solid var(--vert);
  border-radius: var(--radius-sm); padding: 1.25rem; margin: 1.5rem 0;
  font-family: 'Courier New', monospace; font-size: 1.2rem; font-weight: 700;
  letter-spacing: .1em; color: var(--vert-dark);
}

/* ----- Footer ---------------------------------------------- */
.site-footer {
  background: var(--vert-dark); color: rgba(255,255,255,.7);
  text-align: center; padding: 1.5rem;
  font-size: .85rem; margin-top: 3rem;
}
.site-footer strong { color: var(--or); }

/* ----- Responsive ------------------------------------------ */
@media (max-width: 768px) {
  .form-wrapper { padding: 1.5rem; margin: 1rem; }
  .form-title-band { margin: -1.5rem -1.5rem 1.5rem; padding: 1.25rem 1.5rem; }
  .admin-sidebar { display: none; }
  .admin-layout { flex-direction: column; }
  .admin-main { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ----- Loader ---------------------------------------------- */
.loader-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; display: none;
}
.loader-spinner {
  width: 48px; height: 48px; border: 4px solid var(--vert-light);
  border-top-color: var(--vert); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { margin-top: 1rem; color: var(--vert-dark); font-weight: 600; }

/* Print */
@media print {
  .admin-sidebar, .btn, .filter-bar, .admin-topbar .btn { display: none !important; }
  .admin-main { padding: 0; }
}
