/* Base Styles and Variables */
:root {
  --primary-color: #740938;
  --text-color: #000000;
  --bg-color: #ffffff;
  --font-primary: "Fredoka", sans-serif;
  --font-secondary: "Biz UDPMincho", serif;
  --transition-smooth: all 0.3s ease-in-out;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.3px;
}

p {
  margin-bottom: 1.2rem;
  font-weight: 300;
  color: rgba(0, 0, 0, 0.8);
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 1rem;
}

.grid {
  display: grid;
}

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

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Header/Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.4rem 0;
  background-color: var(--bg-color);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.header.scrolled {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
}

.header-img {
  width: 100px;
  position: absolute;
  left: 5rem;
}

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

.nav-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
}

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

.nav-link {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
  position: relative;
}

.nav-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition-smooth);
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 100%;
}

.social-icon {
  font-size: 2rem;
}

/* Hero Section */
.hero {
  height: 85vh;
  background-image: url(/static/images/DSCF1930.JPG);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right;
  background-position-y: -63rem;
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-content {
  max-width: 600px;
  z-index: 1;
  margin-top: 4rem;
}

.hero-logo {
  width: 20rem;
  position: absolute;
  left: 57rem;
  top: -12rem;
}

.hero-image {
  position: absolute;
  top: 10rem;
  right: 15rem;
  height: 50%;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn:hover {
  background-color: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
}

.btn-outline:hover {
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* Features Section */
.features {
  text-align: center;
  padding: 6rem 0;
}

.section-title {
  margin-bottom: 3rem;
  text-align: center;
}

.feature-card {
  padding: 2rem;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-image {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 1.5rem;
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-text {
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.95rem;
}

/* Coffee Shop Section */
.coffee-shop {
  padding: 6rem 0;
  background-color: #f9f9f9;
}

.coffee-shop-content {
  max-width: 500px;
}

.coffee-shop-title {
  margin-bottom: 1.5rem;
}

.coffee-shop-text {
  margin-bottom: 2rem;
}

.coffee-shop-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* Menu Section */
.menu {
  padding: 6rem 0;
}

/* .block-menu {
  display: flex;
  justify-content: center;
  gap: 125px;
} */

.block-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 125px;
  row-gap: 2.5rem;
}

h2.section-title {
  margin-bottom: 0px;
  font-size: 25px;
  margin-top: 39px;
  font-family: var(--font-secondary);
}

.menu-header {
  text-align: center;
  margin-bottom: -5rem;
}

.menu-title {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.menu-image {
  max-width: 500px;
  width: 20%;
  margin: 0 auto 3rem;
  display: block;
}

.menu-item {
  margin-bottom: -34px;
}

.menu-item-header {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.menu-item-title {
  font-size: 1.2rem;
  font-weight: 500;
  margin-right: 10px;
}

h2.section-title {
  margin-bottom: 0px;
}

.menu-item-price {
  font-size: 1.2rem;
}

.menu-item-desc {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.7);
}

/* Manifesto Section */
.manifesto {
  padding: 6rem 0;
  text-align: center;
}

.manifesto-title {
  font-size: 3rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.manifesto-icon {
  width: 30px;
  height: 30px;
}

.manifesto-container {
  display: flex;
}

.manifesto-image {
  max-width: 600px;
  width: 65%;
  margin: 0 auto 3rem;
  display: block;
}

.manifesto-content {
  max-width: 700px;
  margin: 0 auto;
}

.manifesto-lead {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.4;
}

.manifesto-text {
  margin-bottom: 2rem;
}

.manifesto-signature {
  font-style: italic;
  margin-bottom: 2rem;
}

/* Map Section Styles */
.map-section {
  position: relative;
}

.map-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: 450px;
}

.interactive-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-info {
  background-color: var(--bg-color);
  padding: 0;
  position: relative;
  z-index: 2;
}

.map-info-content {
  padding: 2rem;
  height: 100%;
  overflow-y: auto;
}

.map-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.map-info p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-info i {
  color: var(--primary-color);
}

.transport-options {
  margin-top: 1rem;
}

.transport-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

.transport-option i {
  font-size: 1.2rem;
  width: 25px;
  text-align: center;
}

.transport-option span {
  font-size: 0.9rem;
  flex: 1;
}

/* Instagram Section */
.instagram {
  padding: 4rem 0;
  text-align: center;
}

.instagram-title {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.instagram-title span {
  font-size: 1.2rem;
  font-weight: 400;
}

.instagram-link {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  display: block;
}

.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.instagram-item {
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
}

.instagram-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.instagram-item:hover .instagram-img {
  transform: scale(1.05);
}

/* Contact Section */
.contact {
  padding: 6rem 0;
}

.contact-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.contact-info h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-image {
  width: 70%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background-color: var(--bg-color);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}

.footer-info {
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-col h3 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.8rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.6);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

.section-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 40px rgba(116, 9, 56, 0.1);
}
.logo {
  text-align: center;
  margin-bottom: 2rem;
}
.logo h1 {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -1px;
}
.logo p {
  font-size: 0.9rem;
  color: #999;
  margin-top: 0.2rem;
}
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.alert.error {
  background: #fde8e8;
  color: #c0392b;
}
.alert.success {
  background: #e6f4ea;
  color: #2e7d32;
}
label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.4rem;
  font-weight: 400;
}
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  transition: border-color 0.2s;
  outline: none;
}
input:focus {
  border-color: var(--primary);
}
button {
  width: 100%;
  padding: 0.85rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.5px;
}
button:hover {
  background: var(--primary-dark);
}
.back {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.back a {
  color: var(--primary);
  text-decoration: none;
}
.back a:hover {
  text-decoration: underline;
}

.admin-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header .brand {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--primary);
}
.admin-header .subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -4px;
}
.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.btn-site {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.btn-site:hover {
  color: var(--primary);
}
.btn-logout {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  background: var(--primary);
  color: var(--muted);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-logout:hover {
  background: var(--primary-dark);
}

/* Layout */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Alertes */
.alert {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.alert.success {
  background: #e6f4ea;
  color: #2e7d32;
}
.alert.error {
  background: #fde8e8;
  color: #c0392b;
}

/* Section titre */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.section-header h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.section-header .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Carte ajout */
.add-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.add-card h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  color: var(--primary);
}
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.form-group label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}
.form-group select,
.form-group input {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  background: white;
  color: var(--text);
}
.form-group select:focus,
.form-group input:focus {
  border-color: var(--primary);
}
.form-group.flex-1 {
  flex: 1;
  min-width: 160px;
}
.form-group.w-auto {
  width: auto;
}
#nouvelle_categorie_wrap {
  display: none;
}
.btn-add {
  font-family: "Fredoka", sans-serif;
  font-size: 0.95rem;
  padding: 0.55rem 1.4rem;
  background: #f0a500;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  align-self: flex-end;
}
.btn-add:hover {
  background: #c98900;
}

/* Tableau catégorie */
.cat-block {
  margin-bottom: 2rem;
}
.cat-title {
  font-family: "BIZ UDPMincho", serif;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  text-transform: lowercase;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th {
  background: #faf7f6;
  color: var(--muted);
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: #fdfbfa;
}

/* Formulaires inline dans tableau */
.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.inline-form input {
  font-family: "Fredoka", sans-serif;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}
.inline-form input:focus {
  border-color: var(--primary);
}
.input-nom {
  width: 160px;
}
.input-prix {
  width: 70px;
}
.btn-edit {
  font-family: "Fredoka", sans-serif;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  background: #f0a500;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-edit:hover {
  background: #c98900;
}
.btn-delete {
  font-family: "Fredoka", sans-serif;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  background: transparent;
  color: #c0392b;
  border: 1.5px solid #f5c6c6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-delete:hover {
  background: #fde8e8;
  border-color: #c0392b;
}

.prix-cell {
  color: var(--primary);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
  }
  .inline-form {
    flex-wrap: wrap;
  }
  .input-nom {
    width: 100%;
  }
  .admin-header {
    padding: 1rem;
  }
  .btn-site {
    display: none;
  }
}

/* Media Queries */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.2rem;
  }
  h2 {
    font-size: 2rem;
  }

  /* Hero */
  .hero-logo {
    width: 20rem;
    left: 10rem;
    top: -8rem;
  }

  .hero-image {
    right: 5rem;
    height: 40%;
  }

  /* Grilles 3 colonnes → 2 colonnes */
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Menu */
  .block-menu {
    gap: 60px;
  }

  /* Manifesto */
  .manifesto-image {
    width: 80%;
  }

  /* Map */
  .map-container {
    grid-template-columns: 1fr 280px;
  }

  /* Instagram */
  .instagram-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- MOBILE (≤768px) ---- */
@media (max-width: 768px) {
  /* Typographie */
  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.6rem;
  }

  .section {
    padding: 3rem 0;
  }

  /* Navigation */
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu.open {
    display: flex;
  }

  /* Hero */
  .hero {
    height: auto;
    min-height: 70vh;
    background-position: center;
    align-items: flex-end;
    padding-bottom: 3rem;
  }

  .hero-content {
    max-width: 100%;
    margin-top: 6rem;
  }

  .hero-logo {
    width: 14rem;
    left: 50%;
    transform: translateX(-50%);
    top: -6rem;
  }

  .hero-image {
    display: none;
  }

  /* Grilles → 1 colonne */
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  /* Features */
  .features {
    padding: 3rem 0;
  }

  /* Coffee shop */
  .coffee-shop {
    padding: 3rem 0;
  }

  .coffee-shop .flex {
    flex-direction: column;
    gap: 2rem;
  }

  .coffee-shop-content {
    max-width: 100%;
  }

  .coffee-shop-image {
    width: 100%;
    height: 260px;
  }

  /* Menu */
  .menu {
    padding: 3rem 0;
  }

  .block-menu {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

  .menu-title {
    font-size: 2rem;
  }

  .menu-image {
    width: 50%;
  }

  /* Manifesto */
  .manifesto {
    padding: 3rem 0;
  }

  .manifesto-container {
    flex-direction: column;
    align-items: center;
  }

  .manifesto-title {
    font-size: 2rem;
  }

  .manifesto-image {
    width: 90%;
  }

  .manifesto-lead {
    font-size: 1.2rem;
  }

  /* Map */
  .map-container {
    grid-template-columns: 1fr;
    grid-template-rows: 300px auto;
    height: auto;
  }

  .interactive-map {
    height: 300px;
  }

  .map-info-content {
    padding: 1.5rem;
  }

  /* Instagram */
  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact {
    padding: 3rem 0;
  }

  .contact-title {
    font-size: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-image {
    display: none;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ---- TRÈS PETIT MOBILE (≤480px) ---- */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.85rem;
  }

  .hero-logo {
    width: 11rem;
  }

  .instagram-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .menu-title {
    font-size: 1.6rem;
  }

  .manifesto-title {
    font-size: 1.6rem;
  }

  .contact-title {
    font-size: 1.6rem;
  }
}
