/* =============================================
   style.css – Salle des Fêtes Paul Cornu
   Saint-Pierre-de-Varennes
   ============================================= */

/* --- Variables & Reset --- */
:root {
  --vert-principal: #3a7d3a;
  --vert-fonce: #2a5c2a;
  --gris-bg: #f4f5f7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gris-bg);
  color: #333;
  line-height: 1.6;
}

a { color: var(--vert-principal); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* --- Topbar --- */
.topbar {
  background: var(--vert-fonce);
  color: rgba(255,255,255,.85);
  font-size: .78rem;
  padding: .35rem 0;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: white; }

/* --- Header --- */
header {
  background: white;
  border-bottom: 3px solid var(--vert-principal);
  padding: .85rem 0;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.header-logo img {
  height: 60px;
  width: auto;
}
.header-title { flex: 1; }
.header-title h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vert-fonce);
  line-height: 1.2;
}
.header-title p {
  font-size: .82rem;
  color: #777;
  margin-top: .15rem;
}
.header-contact {
  text-align: right;
  font-size: .82rem;
  color: #555;
}
.header-contact strong {
  display: block;
  color: var(--vert-fonce);
  font-size: .9rem;
}

/* --- Main Nav --- */
.main-nav {
  background: var(--vert-principal);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: stretch;
}
.nav-inner a {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1rem;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.nav-inner a:hover {
  background: rgba(255,255,255,.12);
  text-decoration: none;
  color: white;
}
.nav-inner a.active {
  background: rgba(255,255,255,.18);
  color: white;
  box-shadow: inset 0 -3px 0 white;
}
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: stretch;
}
.btn-admin {
  background: rgba(255,255,255,.12) !important;
  border-radius: 4px;
  margin: .35rem 0;
  padding: .35rem .85rem !important;
}
.btn-admin:hover {
  background: rgba(255,255,255,.25) !important;
}

/* --- Page Hero --- */
.page-hero {
  background: linear-gradient(135deg, var(--vert-fonce), var(--vert-principal));
  color: white;
  padding: 2rem 1.25rem;
  text-align: center;
}
.page-hero h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}
.page-hero p {
  font-size: .9rem;
  opacity: .85;
  margin-top: .3rem;
}

/* --- Page Wrapper --- */
.page-wrapper {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 4px;
  font-family: 'Raleway', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--vert-principal);
  color: white;
}
.btn-primary:hover {
  background: var(--vert-fonce);
  color: white;
}

.btn-secondary {
  background: #e9ecef;
  color: #555;
}
.btn-secondary:hover {
  background: #dee2e6;
  color: #333;
}

.btn-danger {
  background: #f8d7da;
  color: #c0392b;
}
.btn-danger:hover {
  background: #f1b0b7;
  color: #a93226;
}

.btn-sm {
  padding: .32rem .75rem;
  font-size: .8rem;
}

/* --- Cards --- */
.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--vert-fonce);
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #e8f3e8;
}

/* --- Alerts --- */
.alert {
  padding: .85rem 1.1rem;
  border-radius: 5px;
  font-size: .88rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.alert ul { margin: .4rem 0 0 1.2rem; }
.alert a { font-weight: 700; }

.alert-info {
  background: #e8f3e8;
  border-left: 4px solid var(--vert-principal);
  color: #1a3a1a;
}
.alert-success {
  background: #d4edda;
  border-left: 4px solid #28a745;
  color: #155724;
}
.alert-error {
  background: #f8d7da;
  border-left: 4px solid #c0392b;
  color: #721c24;
}
.alert-warning {
  background: #fff3cd;
  border-left: 4px solid #e67e22;
  color: #7d4e00;
}

/* --- Forms --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
}
.form-group {
  margin-bottom: .85rem;
}
.form-group.full {
  grid-column: 1 / -1;
}
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #555;
  margin-bottom: .3rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--vert-principal);
  box-shadow: 0 0 0 3px rgba(58,125,58,.15);
}
.form-group textarea {
  min-height: 80px;
  resize: vertical;
}
.req { color: #c0392b; }

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-demande { background: #cfe2ff; color: #084298; }
.badge-blocage { background: #e2e8e2; color: #2a5c2a; }
.badge-en_attente { background: #fff3cd; color: #7d4e00; }
.badge-acceptee { background: #d4edda; color: #155724; }
.badge-refusee { background: #f8d7da; color: #c0392b; }
.badge-bloquee { background: #e2e8e2; color: #2a5c2a; }

/* --- Footer --- */
footer {
  background: var(--vert-fonce);
  color: rgba(255,255,255,.85);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-logo img {
  height: 55px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.footer-info h4 {
  font-family: 'Raleway', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.footer-info p {
  font-size: .82rem;
  line-height: 1.65;
  color: rgba(255,255,255,.75);
}
.footer-info a {
  color: rgba(255,255,255,.75);
}
.footer-info a:hover {
  color: white;
}
.footer-bottom {
  text-align: center;
  padding: .85rem 1.25rem;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.12);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: .75rem; }
  .header-contact { display: none; }

  .nav-inner { flex-wrap: wrap; }
  .nav-inner a { font-size: .82rem; padding: .55rem .75rem; }
  .nav-right { margin-left: 0; width: 100%; justify-content: center; border-top: 1px solid rgba(255,255,255,.15); }

  .page-hero h2 { font-size: 1.2rem; }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 1.25rem; }
  .footer-logo { display: flex; justify-content: center; }

  /* Admin sidebar -> top bar on mobile */
  .admin-layout { grid-template-columns: 1fr !important; }
  .admin-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: .5rem 0;
  }
  .admin-sidebar a { padding: .45rem .75rem; font-size: .8rem; }
  .admin-sidebar .who { width: 100%; padding: .4rem .75rem; }
  .admin-sidebar .sep { display: none; }

  .stats { grid-template-columns: 1fr 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .sbox { margin-left: 0; }
}

@media (max-width: 480px) {
  .topbar-inner { flex-direction: column; gap: .2rem; text-align: center; }
  .header-logo img { height: 45px; }
  .header-title h1 { font-size: 1.05rem; }
  .stats { grid-template-columns: 1fr; }
}
