/* assets/style.css */

/* Reset & base */
* {
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0; padding: 0;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}
a {
  color: #0077cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  display: block;
}
button {
  cursor: pointer;
  background-color: #0077cc;
  border: none;
  padding: 0.6em 1.2em;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #005fa3;
}

/* Container */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 101;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 900;
  font-size: 1.6rem;
  color: #0077cc;
  letter-spacing: 1px;
}
nav a {
  margin-left: 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  color: #333;
}
nav a:first-child {
  margin-left: 0;
}
.cta-button {
  margin-left: 2rem;
}

/* Under construction banner */
.under-construction {
  background: #ffcc00;
  color: #663300;
  text-align: center;
  font-weight: 700;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 60px; /* under header */
  z-index: 100;
}

/* Hero */
.hero {
  background-color: #0077cc;
  color: white;
  padding: 4rem 1rem 3rem;
  text-align: center;
  margin-top: 40px; /* To offset sticky banners */
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 500;
}
.hero input[type="search"] {
  width: 100%;
  max-width: 480px;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}
.hero button.search-btn {
  padding: 0.85rem 1.5rem;
  border-radius: 0 4px 4px 0;
  font-weight: 700;
}
.example-search {
  margin-top: 1rem;
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Filter dropdown */
.filter-container {
  max-width: 1100px;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  text-align: right;
}
.filter-container label {
  font-weight: 600;
  margin-right: 0.5rem;
  color: #333;
}
.filter-container select {
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
}
.filter-container select:hover {
  border-color: #0077cc;
}

/* Featured cards */
.featured-section {
  padding: 3rem 1rem 1rem;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  margin: 3rem 0;
}
.featured-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 700;
  font-size: 1.9rem;
  color: #0077cc;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: auto;
}
.card {
  background: #f0f8ff;
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}
.card:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.card img {
  height: 60px;
  margin-bottom: 1rem;
  object-fit: contain;
  max-width: 120px;
  margin-left: auto;
  margin-right: auto;
}
.card .owner-name {
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}
.card .ownership-percent {
  color: #555;
  font-size: 0.9rem;
}

/* Categories */
.categories-section {
  background: white;
  padding: 3rem 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.categories-section h2 {
  text-align: center;
  font-weight: 700;
  font-size: 1.9rem;
  margin-bottom: 2rem;
  color: #0077cc;
}
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 1rem;
  max-width: 900px;
  margin: auto;
  text-align: center;
}
.category-tile {
  background: #e7f0fa;
  padding: 1rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  color: #0077cc;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}
.category-tile:hover {
  background-color: #c9def8;
}

/* How it works */
.how-it-works {
  background: #f0f8ff;
  padding: 3rem 1rem;
  margin-bottom: 3rem;
}
.how-it-works .container {
  max-width: 900px;
  text-align: center;
}
.how-it-works h2 {
  font-weight: 700;
  font-size: 1.9rem;
  color: #0077cc;
  margin-bottom: 2rem;
}
.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.step {
  background: white;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex: 1 1 250px;
  max-width: 280px;
}
.step h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #005fa3;
  font-size: 1.3rem;
}
.step p {
  margin: 0;
  font-size: 1rem;
  color: #333;
}

/* Sources */
.sources {
  background: white;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  margin-bottom: 3rem;
}

/* Footer */
footer {
  background: #0077cc;
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}
footer a {
  color: #cde7ff;
  margin: 0 0.5rem;
}
footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .steps {
    flex-direction: column;
    gap: 1.5rem;
  }
  nav a {
    margin-left: 0.8rem;
    font-size: 0.9rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

/* ===== Spécifique all_companies.html ===== */
.all-companies-container {
  max-width: 1100px;
  margin: auto;
  padding: 1rem;
}

.sort-controls {
  text-align: right;
  margin-bottom: 20px;
}

.sort-controls label {
  font-weight: bold;
  color: #003366;
  margin-right: 10px;
}

.sort-controls select {
  padding: 4px 8px;
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 20px;
  margin-top: 1rem;
}

.card {
  background: #f0f8ff;
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.card:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card img {
  max-height: 80px;
  margin-bottom: 15px;
  object-fit: contain;
}

.card .name {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #003366;
}

.card .description {
  font-size: 0.9rem;
  color: #555;
  flex-grow: 1;
}
