/* SETTINGS */
html, body {
	margin: 0;
	padding: 0;
	color: #191825;
}

a, a:visited, a:hover, a:active {
    color: #191825;
    text-decoration: none;
}

a:hover { 
    cursor:pointer;  
}

header, main, footer {
	padding: 5px;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

header {
	min-height: 6vh;
	background-color: #CE1212;
	display: flex;
	align-items: end;
	justify-content: space-between;
}

header a {
	color: #EEEBDD !important;
	margin: 0 14px;
	font-size: larger;
}

header img {
	border-radius: 50%;
	width: 50px;
	height: 50px;
}

.profile img{
	border-radius: 50%;
	width: 30px;
	height: 30px;
	background-color: #EEEBDD;
	margin-bottom: -2px;
}

.profile-initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: #EEEBDD;
	color: #191825;
	font-weight: bold;
	font-size: 16px;
	margin-bottom: -2px;
	position: relative;
	bottom: 4px;
}

.left-nav {
	display: flex;
	align-items: end;
}

.left-nav nav {
	margin-left: 10px;
}

footer {
	min-height: 10vh;
	background-color: #CE1212;
	line-height: 30px;
	border-top: 1px solid #191825;
}

footer a {
	padding: 4px 6px;
	color: #EEEBDD !important;
}

main {
	flex: 1 0 auto;
	background-color: #EEEBDD;
}

/* navigation */
.filters {
	margin: 8px 0;
}

.pagination {
  margin-top: 20px;
}

.page-btn {
  margin: 5px;
  padding: 8px 12px;
  cursor: pointer;
}

/* cards */
.card {
	display: flex;
	align-items: center;
	border-top: 1px solid #191825;
}

.card img {
	width: 300px;
	height: 169px;
	flex-shrink: 0;
	margin: 16px;
}

.card-content {
	width: 65vw;
	padding: 24px;
}

.card-content h2 {
	margin-bottom: 0;
}

.price {
	margin: 0;
	font-size: large;
}

.card-cta {
	width: 169px;
	height: 169px;
	flex-shrink: 0;
	margin: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-align: center;
	color: #EEEBDD !important;
	font-weight: bold;
	font-size: 1.8rem;
	background-color: #CE1212;
	border-left: 1px solid #191825;
	border-radius: 8px;
	text-decoration: none;
}

.card-cta .arrow {
	font-size: 1.6em;
	line-height: 1;
}
.btn-primary {
	display: inline-block;
	color: #EEEBDD !important;
	font-weight: bold;
	border: 1px solid #191825;
	border-radius: 10px;
	background-color: #CE1212;
	padding: 6px 12px;
	text-decoration: none;
}

/* ANIMATIONS */
/* normal state */
.fade {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* hidden state */
.fade-out {
  opacity: 0;
}

/* cards initial states */
.card {
  opacity: 0;
  transform: translateY(15px);
}

/* animation */
.card.show {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
/* PAGE DÉTAIL VÉHICULE */
.detail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-top: 16px;
}

.detail-image {
  flex: 1 1 320px;
  max-width: 480px;
}

.detail-image img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.detail-info {
  flex: 1 1 280px;
}

.vehicle-detail .btn {
  font-weight: bold;
}

.edit-vehicle .btn {
  font-weight: bold;
}

.apply .btn {
  font-weight: bold;
}

.applications .btn {
  font-weight: bold;
}

/* LISTE ADMIN VÉHICULES */
.admin-form {
  margin: 40px 0;
}

.admin-vehicles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-vehicle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-top: 1px solid #191825;
  background-color: #EEEBDD;
}

.admin-vehicle-row .info {
  flex: 1;
  min-width: 0;
}

.admin-vehicle-row .name {
  font-weight: bold;
  margin: 0;
}

.admin-vehicle-row .description {
  margin: 4px 0 0 0;
  font-size: 0.9em;
  color: #444;
}

.admin-vehicle-row .type,
.admin-vehicle-row .price,
.admin-vehicle-row .kms {
  margin: 0;
}

.admin-vehicle-row .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.admin-vehicle-row .actions form {
  margin: 0;
}

.admin-vehicle-row .thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #191825;
  flex-shrink: 0;
}

.edit-btn,
.delete-btn {
  color: #EEEBDD !important;
  font-weight: bold;
  border: 1px solid #191825;
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
}

.edit-btn {
  background-color: #191825;
}

.delete-btn {
  background-color: #CE1212;
}

/* DOSSIERS ADMIN */
.dossiers {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background-color: #EEEBDD;
}

.dossiers th,
.dossiers td {
  padding: 8px 10px;
  border: 1px solid #191825;
  text-align: left;
  vertical-align: middle;
}

.dossiers th {
  background-color: #191825;
  color: #EEEBDD;
}

.dossiers .actions {
  display: flex;
  gap: 8px;
}

.dossiers .actions form {
  margin: 0;
}

.dossiers .remove-btn {
  background-color: transparent;
  color: #CE1212;
  font-weight: bold;
  border: 1px solid #CE1212;
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
}

.status {
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.status-pending {
  background-color: #f0c040;
  color: #191825;
}

.status-accepted {
  background-color: #2e9e4f;
  color: #EEEBDD;
}

.status-refused {
  background-color: #CE1212;
  color: #EEEBDD;
}

/* MESSAGE D'ERREUR DE FORMULAIRE */
.form-error {
  color: #CE1212;
  font-weight: bold;
  margin-top: 10px;
}

/* PAGE CONNEXION / INSCRIPTION */
main.auth {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.auth-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* Bloc des deux formulaires */
.auth-forms {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 64px;
  padding: 24px;
}

.auth-panel {
  width: 100%;
  max-width: 360px;
  padding: 20px 24px;
}

.auth-panel h2 {
  margin-top: 0;
}

/* Colonne logo */
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 32px 24px;
  background-color: #e4dfcb;
}

.auth-brand img {
  width: 100%;
  max-width: 160px;
  height: auto;
}

.auth-brand .brand-name {
  margin: 0;
  font-size: 2.5rem;
  font-weight: bold;
  color: #CE1212;
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    min-height: 240px;
  }
}

.auth-panel form {
  display: flex;
  flex-direction: column;
}

.auth-panel label {
  margin-top: 10px;
  font-weight: bold;
}

.auth-panel input {
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #191825;
  border-radius: 6px;
}

.auth-panel button {
  margin-top: 16px;
  padding: 10px;
  background-color: #CE1212;
  color: #EEEBDD;
  font-weight: bold;
  border: 1px solid #191825;
  border-radius: 8px;
  cursor: pointer;
}

/* PAGE MON COMPTE */
.account {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.account-left {
  padding: 24px;
}

.account-applications {
  margin: 16px 0;
}

.form-success {
  color: #2e9e4f;
  font-weight: bold;
  margin: 8px 0;
}

.logout-form {
  margin-top: 24px;
}

.logout-form button {
  padding: 8px 16px;
  background-color: #CE1212;
  color: #EEEBDD;
  font-weight: bold;
  border: 1px solid #191825;
  border-radius: 8px;
  cursor: pointer;
}

/* FOOTER */
footer {
  color: #EEEBDD;
  text-align: center;
  padding: 12px 16px;
}

.footer-links a {
  font-weight: bold;
}

.copyright {
  margin: 8px 0;
}

.footer-credits {
  font-size: 0.75em;
  line-height: 1.5;
  opacity: 0.85;
}

.content-page {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 32px 12px;
}

.content-page-body {
  line-height: 1.6;
  background-color: #f7f4ea;
  padding: 24px 32px;
  border-radius: 12px;
}

.side-logo {
  width: 200px;
  height: auto;
  justify-self: center;
}

@media (max-width: 900px) {
  .content-page {
    grid-template-columns: 1fr;
  }
  .side-logo {
    display: none;
  }
}

.content-page h2 {
  margin-top: 28px;
}

.content-page .contact-list {
  list-style: none;
  padding: 0;
}

.content-page .contact-list li {
  margin: 6px 0;
}

.content-page .note {
  margin-top: 28px;
  font-size: 0.9em;
  font-style: italic;
  color: #555;
}

/* MOBILE — 768px  */
@media (max-width: 768px) {

  /* Header */
  header {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  header a {
    font-size: 1.6rem;
    margin: 0 10px;
    padding: 4px 0;
  }
  header img {
    width: 40px;
    height: 40px;
  }
  .left-nav {
    align-items: center;
  }
  .left-nav nav {
    margin-left: 6px;
  }

  /* Cartes catalogue */
  .card {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
  }
  .card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin: 0;
  }
  .card-content {
    width: auto;
    padding: 16px;
  }
  .card-cta {
    width: auto;
    height: auto;
    margin: 0;
    flex-direction: row;
    gap: 12px;
    padding: 14px;
    font-size: 1.3rem;
    border-left: none;
    border-top: 1px solid #191825;
    border-radius: 0;
  }
  .card-cta .arrow {
    font-size: 1.4em;
  }

  /* Filtres */
  .filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .filters input,
  .filters select {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
  }

  /* Lignes véhicules du dashboard */
  .admin-vehicle-row {
    flex-wrap: wrap;
  }
  .admin-vehicle-row .info {
    flex-basis: 100%;
  }

  /* Formulaires admin (ajout / modification) */
  .admin-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .admin-form input,
  .admin-form select,
  .admin-form textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* Formulaire de dépôt de dossier */
  .apply input,
  .apply select {
    width: 100%;
    box-sizing: border-box;
  }

  /* Tableau des dossiers */
  .dossiers {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Détail véhicule */
  .detail-container {
    gap: 16px;
  }

  /* Connexion / inscription */
  .auth-forms {
    gap: 32px;
    padding: 16px;
  }

  /* Mon compte */
  .account-left {
    padding: 16px;
  }
}