* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: #f5f8fc;
  color: #1c1c1c;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
}

header .logo img {
  max-height: 40px;
  width: auto;
}

header nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

header nav a:hover {
  color: #007bff;
}

/* HERO */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 2rem;
  background: linear-gradient(120deg, #007bff, #00bfff);
  color: white;
}

.hero-text {
  max-width: 50%;
}

.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background: white;
  color: #007bff;
  cursor: pointer;
  font-weight: bold;
}

/* STATS */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #1a3d7c;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #0077b6;
}

.stat-card .tag-bar-wrapper {
    margin: 10px 0 0 0;
}


/* PLANES */
.last-added {
  padding: 2rem;
}

.last-added h2 {
  margin-bottom: 1rem;
}

.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.plane-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column; /* important */
}


.plane-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.plane-img {
  width: 100%;
  height: 140px;
  object-fit: cover; /* image recadrée pour remplir */
  display: block;
}


.plane-header {
  position: relative;
  text-align: center;
}

.plane-header h3 {
  font-size: 1.2rem;
  color: #1a3d7c;
}

.plane-header .tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tag.onboard { background: #4CAF50; color: #fff; }
.tag.spotted { background: #2196F3; color: #fff; }
.tag.view { background: #FFC107; color: #fff; }

.plane-info p {
  margin: 5px 0;
  font-size: 0.9rem;
  color: #555;
}

.plane-actions {
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
}

.plane-info {
  padding: 8px 12px;
  flex-grow: 1; /* pour que le contenu prenne le reste */
}



.plane-actions .btn {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}

.view-btn { background-color: #2196F3; }
.view-btn:hover { background-color: #1976D2; }

.edit-btn { background-color: #4CAF50; }
.edit-btn:hover { background-color: #388E3C; }

.delete-btn { background-color: #f44336; }
.delete-btn:hover { background-color: #d32f2f; }


.plane-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.85); /* fond blanc semi-transparent */
  border-radius: 50%; /* rond */
  padding: 4px; /* espace autour du drapeau */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); /* petite ombre */
}



/* Container */
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  font-family: "Segoe UI", Roboto, sans-serif;
}

/* Table */
.table-planes {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-planes th, 
.table-planes td {
  padding: 14px 18px;
  text-align: left;
}

.table-planes th {
  background: #f5f8ff;
  color: #1a3d7c;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.table-planes tr {
  border-bottom: 1px solid #eee;
}

.table-planes tr:hover {
  background: #f9fcff;
}

/* Tags */
.tag {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
}

.tag.onboard { background: #e6f7ff; color: #0077b6; }
.tag.spotted { background: #fff4e6; color: #e67e22; }
.tag.view { background: #eafbea; color: #27ae60; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: #777;
  font-size: 1.1rem;
}

/* Formulaire général */
form {
  max-width: 400px;
  margin: 40px auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: "Segoe UI", Roboto, sans-serif;
}

/* Titres */
h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #1a3d7c;
}

/* Inputs & textarea */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border 0.3s;
}

input:focus,
textarea:focus {
  border-color: #0077b6;
  outline: none;
}

/* Bouton submit */
button[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: #0077b6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background-color: #005f87;
}

/* Message d'erreur */
p.error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-bottom: 15px;
  text-align: center;
}

/* Lien pour login */
p.login-link {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 15px;
}

p.login-link a {
  color: #0077b6;
  text-decoration: none;
  font-weight: 500;
}

p.login-link a:hover {
  text-decoration: underline;
}

.planes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plane-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.plane-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.plane-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: #1a3d7c;
}

.plane-card .tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.tag.onboard { background: #e6f7ff; color: #0077b6; }
.tag.spotted { background: #fff4e6; color: #e67e22; }
.tag.view { background: #eafbea; color: #27ae60; }

.plane-card .notes {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
}

.plane-card .date {
  font-size: 0.8rem;
  color: #999;
}

/* Bouton ajouter flottant */
.add-plane-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0077b6;
  color: #fff;
  padding: 15px 20px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

.add-plane-btn:hover {
  background: #005f87;
}

/* Conteneur filtre & recherche */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

/* Input recherche */
#searchInput {
  flex: 1;
  min-width: 200px;
  padding: 10px 15px;
  border-radius: 25px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  transition: all 0.2s;
}

#searchInput:focus {
  border-color: #0077b6;
  box-shadow: 0 0 5px rgba(0,119,182,0.3);
  outline: none;
}

/* Boutons de filtre */
.filter-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  background-color: #eee;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background-color: #0077b6;
  color: #fff;
}

.filter-btn.active {
  background-color: #0077b6;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* HERO */
.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 60px 20px;
  background: linear-gradient(to right, #f0f4ff, #ffffff);
}

.hero-text {
  flex: 1;
  min-width: 250px;
  margin-right: 30px;
}

.hero-text h1 {
  font-size: 2.5rem;
  color: #1a3d7c;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  color: #555;
}

.cta {
  display: inline-block;
  padding: 14px 28px;
  background-color: #0077b6;
  color: #fff;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.cta:hover {
  background-color: #005f87;
}

.hero-img img {
  max-width: 400px;
  width: 100%;
  display: block;
}

/* FEATURES */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 60px 20px;
}

.feature {
  flex: 1 1 250px;
  text-align: center;
}

.feature img {
  max-width: 80px;
  margin-bottom: 15px;
}

.feature h3 {
  margin-bottom: 10px;
  color: #1a3d7c;
}

.feature p {
  color: #555;
  font-size: 0.95rem;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 40px 20px;
}

.cta-large {
  display: inline-block;
  padding: 16px 32px;
  background-color: #0077b6;
  color: #fff;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.cta-large:hover {
  background-color: #005f87;
}

/* Responsive */
@media(max-width:768px){
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-text { margin-right:0; }
  .hero-img { margin-top:30px; }
  .features { flex-direction: column; gap: 40px; }
}

.stats-container {
    background:#f0f4f8;
    padding:15px;
    margin-bottom:20px;
    border-radius:10px;
}
.stat-item {
    margin-bottom:8px;
    font-size:14px;
}


.tag-bar-wrapper {
  position: relative;
  background: #e0e0e0;
  border-radius: 10px;
  height: 25px;
  margin-bottom: 5px;
  overflow: hidden;
}

.tag-bar-bg {
  height: 100%;
}

.tag-bar-bg.onboard { background-color: #4CAF50; }
.tag-bar-bg.spotted { background-color: #2196F3; }
.tag-bar-bg.view { background-color: #FFC107; }

.tag-label {
  position: absolute;
  left: 10px;
  top: 0;
  height: 100%;
  line-height: 25px;
  color: #fff;
  font-weight: bold;
}



.country-badge {
  display: inline-block;
  background: #f1f1f1;
  border-radius: 12px;
  padding: 3px 8px;
  margin-right: 5px;
  font-size: 14px;
}


.total-planes {
  display: inline-flex;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
}
.total-planes .plane-icon {
  font-size: 24px;
  margin-right: 5px;
}


/** bouton historique de vol et live FR24 **/

.flight-btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2196F3, #21CBF3);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.flight-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.flight-btn .icon {
  margin-right: 8px;
}
