/*
Theme Name: Hammamet Online - Réservation Matchs Sportifs
Theme URI: https://hammamet.online
Description: Plateforme simple et légère de réservation de matchs sportifs. Inspirée de PlayFast, optimisée pour Namecheap.
Version: 1.0.0
Author: Hammamet Online
Author URI: https://hammamet.online
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hammamet-online
Domain Path: /languages
Requires at least: 5.6
Requires PHP: 7.4
*/

/* ================================================
   HAMMAMET ONLINE - THÈME WORDPRESS
   Réservation de Matchs Sportifs
   ================================================ */

:root {
  --primary-color: #FF6B35;
  --primary-dark: #D84315;
  --secondary-color: #004E89;
  --secondary-light: #1B6CA8;
  --success-color: #06A77D;
  --danger-color: #E63946;
  --warning-color: #F77F00;
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
  --text-dark: #1A1A1A;
  --text-gray: #666666;
  --border-color: #E0E0E0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
}

body {
  font-size: 16px;
}

/* ================================================
   TYPOGRAPHIE
   ================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* ================================================
   LAYOUT GÉNÉRAL
   ================================================ */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-full {
  width: 100%;
  padding: 0 1rem;
}

/* ================================================
   HEADER
   ================================================ */

header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.logo a {
  color: var(--text-dark);
}

.logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

.btn-admin {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn-admin:hover {
  background-color: var(--secondary-light);
}

@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ================================================
   HERO SECTION
   ================================================ */

.hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  color: var(--white);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ================================================
   FILTRES
   ================================================ */

.filters-section {
  background-color: var(--white);
  padding: 2rem 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.filters-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

@media (max-width: 1024px) {
  .filters-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .filters-container {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   CARTES DE MATCHS
   ================================================ */

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.match-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.match-card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sport-badge {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.sport-icon {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.match-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.match-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.match-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-gray);
}

.match-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.match-info-icon {
  min-width: 20px;
  font-size: 1.1rem;
}

.match-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 1rem 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-gray);
}

.match-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success-color);
  margin-bottom: 1rem;
}

.match-card-footer {
  margin-top: auto;
}

/* ================================================
   BOUTONS
   ================================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
}

.btn-success {
  background-color: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger-color);
  color: var(--white);
}

.btn-danger:hover {
  background-color: #d62828;
}

.btn-disabled, .btn-complet {
  background-color: #CCCCCC;
  color: var(--text-dark);
  cursor: not-allowed;
}

.btn-disabled:hover, .btn-complet:hover {
  background-color: #CCCCCC;
}

/* ================================================
   MODAL
   ================================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  max-width: 500px;
  width: 90%;
  padding: 2rem;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  margin: 0;
  color: var(--text-dark);
}

.modal-header p {
  margin: 0.5rem 0 0 0;
  color: var(--text-gray);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-gray);
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--text-dark);
}

/* ================================================
   FORMULAIRES
   ================================================ */

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-error {
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ================================================
   MESSAGES
   ================================================ */

.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ================================================
   FOOTER
   ================================================ */

footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin: 0.5rem 0;
}

footer a {
  color: var(--primary-color);
}

footer a:hover {
  color: #FF8C59;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    gap: 1rem;
    text-align: center;
  }

  .matches-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
  }
}

/* ================================================
   WORDPRESS CLASSES
   ================================================ */

.wp-block-image {
  margin-bottom: 1rem;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

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

/* Responsive images */
@media (max-width: 768px) {
  img {
    width: 100%;
  }
}
