/* style.css */

/* Variables de couleur */
:root {
  --bg-dark: #1e1e1e;
  --accent: #4b4bdd;
  --text-light: #f0f0f0;
  --card-bg: #2a2a2a;
}

/* Réinitialisation de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body et mise en page globale */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.6;
}

/* Conteneur principal qui pousse le footer en bas */
.container {
  flex: 1;
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Liens globaux */
a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background: var(--card-bg);
  padding: 0.5rem 1rem;
}

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

.header-left {
  display: flex;
  align-items: center;
}

.github-link,
.kofi-link {
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.github-link:hover,
.kofi-link:hover {
  background: var(--accent);
  color: white;
}

.header-right {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* GitHub followers badge */
.github-followers-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  margin-left: 6px;
  min-width: 1.4em;
  justify-content: center;
}

/* Mobile header */
@media (max-width: 640px) {
  .hamburger {
    display: flex;
  }

  .header-right {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
  }

  .header-right.open {
    display: flex;
  }

  .header-content {
    position: relative;
  }

  .site-header {
    position: relative;
  }

  .github-link,
  .kofi-link {
    text-align: center;
    padding: 0.6rem 1rem;
  }
}

.logo-header-small {
  width: 40px;
  /* rendu plus petit */
  height: auto;
  margin-right: 0.5rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--accent);
}

/* Zone principale */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-main-large {
  width: 300px;
  /* rendu plus grand */
  height: auto;
  margin-bottom: 1rem;
}

.intro-text {
  font-size: 1.1rem;
}

/* Section outils */
.tools-section {
  margin-bottom: 2rem;
}

.tools-category {
  margin-bottom: 2.5rem;
}

.category-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
  margin-bottom: 1.2rem;
  opacity: 0.85;
}

/* Grille des outils */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

.tool-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tool-card > a {
  display: flex;
  flex-direction: column;
  position: relative;
}

.badge-new {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 1;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  text-transform: uppercase;
}

.tool-card h3 {
  padding: 0.75rem 1rem 0.3rem;
  margin: 0;
  color: var(--accent);
  font-size: 1rem;
  text-align: left;
}

.tool-card img {
  width: 100%;
  display: block;
  border-radius: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Hover sur l’image */
.tool-card > a:hover img {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.tool-card p {
  padding: 0.1rem 1rem 1rem;
  font-size: 0.88rem;
  color: rgba(240, 240, 240, 0.65);
  line-height: 1.55;
  text-align: left;
  flex: 1;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(75, 75, 221, 0.35);
}

/* Footer */
.site-footer {
  background: var(--card-bg);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Contact Form 2025 Redesign */
.contact-form-container {
  background: rgba(42, 42, 42, 0.4);
  /* Glassmorphism base */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem;
  border-radius: 16px;
  max-width: 650px;
  margin: 2rem auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-form .form-group {
  margin-bottom: 2rem;
  position: relative;
}

.contact-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(30, 30, 30, 0.6);
  color: var(--text-light);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background: rgba(30, 30, 30, 0.9);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(75, 75, 221, 0.15), inset 0 0 10px rgba(75, 75, 221, 0.05);
  transform: translateY(-2px);
}

.contact-form input:focus+label,
.contact-form textarea:focus+label {
  color: var(--accent);
}

.submit-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #6868f0 100%);
  color: white;
  border: none;
  padding: 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
  box-shadow: 0 4px 15px rgba(75, 75, 221, 0.3);
  margin-top: 1rem;
}

.submit-btn:hover {
  transform: scale(1.02) translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 25px rgba(75, 75, 221, 0.5);
}

.submit-btn:active {
  transform: scale(0.98);
}

.alert {
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 500;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.alert.success {
  background: rgba(40, 167, 69, 0.1);
  color: #4ade80;
  border: 1px solid rgba(40, 167, 69, 0.3);
  box-shadow: 0 0 20px rgba(40, 167, 69, 0.1);
}

.alert.error {
  background: rgba(220, 53, 69, 0.1);
  color: #f87171;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Update Banner */
.update-banner {
  background: rgba(75, 75, 221, 0.1);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.accordion-header {
  width: 100%;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: rgba(75, 75, 221, 0.1);
}

.accordion-header .icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  color: var(--accent);
}

.accordion-item.active .accordion-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.accordion-item.active .icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 1.2rem;
}

.accordion-item.active .accordion-content {
  max-height: 1000px; /* arbitrary large value */
  padding: 1.2rem;
}

.update-section {
  margin-bottom: 1.2rem;
}

.update-section:last-child {
  margin-bottom: 0;
}

.update-section h4 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.update-section h4::before {
  content: '🚀';
  margin-right: 0.5rem;
  font-size: 1rem;
}

.update-banner ul {
  list-style-type: none;
  padding-left: 1.5rem;
}

.update-banner li {
  position: relative;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.update-banner li::before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
  position: absolute;
  left: -1rem;
}