/* 
***************
Grid
***************
*/

:root {
  --columns: 2;
  --gap: 10px;
}

* {
  box-sizing: border-box;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  width: 100%;
}

.col {
  flex: 0 0 auto;
  box-sizing: border-box;
}

.col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Correctly calculated column widths considering the gap */
.col-1 {
  flex: 0 0 calc(100% / var(--columns) * 1 - (var(--gap) * (var(--columns) - 1) / var(--columns)));
}

.col-2 {
  flex: 0 0 calc(100% / var(--columns) * 2 - (var(--gap) * (var(--columns) - 2) / var(--columns)));
}

@media (max-width: 580px) {
  .col-1,
  .col-2 {
    flex: 0 0 calc(100%);
  }
}

/* 
***************
End Grid
***************
*/

/* 
***************
Layout Instagram Data
***************
*/

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
}

body {
  font-family: "Helvetica", sans-serif;
  background-color: #ffffff;
  padding: 20px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
}

/* Fiche profil */
.profile-card {
  background-color: #ffffff;
  padding: 30px;
  border: 1px solid #000000;
  margin-bottom: 10px;
  color: rgb(0, 0, 0);
}

.profile-header h1 {
  font-size: 2.5rem;
  margin: 0 0 5px 0;
  font-weight: bold;
  text-transform: none;
}

.profile-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0 0 25px 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cartes de données */
.data-card {
  background-color: white;
  padding: 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  color: #000000;
  border: 1px solid #000000;
}

.card-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid currentColor;
}

.card-header h2 {
  font-size: 1rem;
  margin: 0;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


/* Liste de données */
.data-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.data-list li:last-child {
  border-bottom: none;
}

.account-name {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Métriques */
.metric {
  margin-bottom: 15px;
}

.metric:last-child {
  margin-bottom: 0;
}

.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 5px;
}

.metric-label {
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-large {
  text-align: center;
  margin: 20px 0;
}

.metric-value-large {
  display: block;
  font-size: 3.5rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 10px;
}

.metric-label-large {
  font-size: 1rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Engagement */
.engagement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.engagement-item:last-child {
  border-bottom: none;
}

.engagement-account {
  font-weight: 500;
  font-size: 0.95rem;
}

.engagement-type {
  font-size: 0.8rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Informations profil */
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Login */
.login-date {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.login-ip {
  display: block;
  font-size: 0.8rem;
  opacity: 0.6;
  font-family: monospace;
}

.data-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Description */
.card-description {
  font-size: 0.875rem;
  opacity: 0.6;
  margin: 10px 0 0 0;
  font-style: italic;
}

/* Login card pleine largeur */
.login-card {
  flex: 0 0 calc(100%);
  width: 100%;
  margin-top: 10px;
}

.login-note {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f5f5f5;
  border-left: 3px solid #000000;
}

.login-note strong {
  font-weight: bold;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.login-location {
  display: block;
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 3px;
  font-style: italic;
}

/* Responsive */
@media (min-width: 768px) {
  :root {
    --columns: 3;
  }

  body {
    padding: 30px;
  }

  .profile-header h1 {
    font-size: 3rem;
  }

  .profile-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .login-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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