/* ==========================================
   CSS fusionné : design esthétique + structure existante
   Auteur : Théo Pasquier
   Date : 16-06-2025
   ========================================== */

/* ---------- Variables de thème ---------- */
:root{
  --couleurPrimaire: #355C7D;
  --couleurSecondaire: #6C5B7B;
  --accent: #F67280;
  --fond: #ffffff;
  --textePrincipal: #22313F;
  --texteSecondaire: #556674;
  --ombreDouce: 0 6px 18px rgba(34,49,63,0.12);
  --rayon: 14px;
  --transitionRapide: 200ms cubic-bezier(.2,.9,.3,1);
}

/* ========= Layout global ========= */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: var(--fond);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--textePrincipal);
}

.page-raquettes,
#app-container {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* ========= Sidebar ========= */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, rgba(53,92,125,0.95), rgba(108,91,123,0.95));
  padding: 20px;
  border-right: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--ombreDouce);
}

.sidebar-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
}

.sidebar p {
  margin-top: 40px;
  font-size: 14px;
  text-align: center;
  color: rgba(255,255,255,0.9);
}

.sidebar-select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
}

.sidebar-bottom button {
  width: 48%;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  border: none;
}

/* ========= Header ========= */
header {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100px;
  border-bottom: 2px solid #000;
  background-color: #fefefe;
}

header h1 {
  font-size: 60px;
  font-weight: bold;
  margin: 0 auto;
}

#logo {
  width: 60px;
  height: 68px;
  position: absolute;
  left: 20px;
  top: 5px;
}

#btnLoginRegister {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
}

/* ========= Zone principale ========= */
.main-zone, #view {
  flex: 1;
  padding: 40px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ========= Barre de recherche ========= */
.search-bar {
  width: 350px;
  margin-left: auto;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--ombreDouce);
}

.search-bar input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: var(--textePrincipal);
}

/* ========= Grille modernisée ========= */
.raquette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.raquette-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(246,248,250,0.9));
  border-radius: 14px;
  padding: 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(34,49,63,0.06);
  transition: transform var(--transitionRapide), box-shadow var(--transitionRapide);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.raquette-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 40px rgba(34,49,63,0.15);
}

.raquette-card img {
  width: 80px;
  opacity: 0.5;
  margin-bottom: 10px;
}

.raquette-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--couleurPrimaire);
}

.raquette-price {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(246,114,128,0.12);
  color: var(--couleurPrimaire);
  font-weight: 600;
  font-size: 14px;
}

/* ========= Formulaire Login ========= */
.formulaireLogin {
  width: 320px;
  background: #fff;
  padding: 40px;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.formulaireLogin input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* ========= Footer ========= */
footer {
  text-align: center;
  padding: 15px;
  border-top: 2px solid #000;
  font-size: 16px;
  background-color: #fefefe;
  margin-top: auto;
}

/* ========= Zone image + formulaire (création raquette) ========= */
.container { display: flex; flex-direction: column; min-height: 100vh; }
.main-content { display: flex; flex: 1; padding: 10px; }

.image-upload-container {
  flex: 2;
  display: flex;
  flex-direction: column;
  padding: 10px;
  margin-right: 10px;
  border: 1px solid #ccc;
}

.drop-zone {
  border: 2px dashed #aaa;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  cursor: pointer;
  margin-bottom: 10px;
}

.drop-zone img { width: 80px; opacity: 0.5; }

.form-section {
  flex: 1;
  padding: 15px;
  border-left: 1px solid #ccc;
  overflow-y: auto;
}

.form-section input,
.form-section textarea,
.form-section select {
  width: 100%;
  padding: 6px;
  margin-top: 5px;
  font-size: 14px;
}

/* ========= Animation subtile ========= */
@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(8px) }
  to{ opacity:1; transform: translateY(0) }
}

.raquette-card{ animation: fadeInUp 400ms ease both; }
