/* === Suivi général === */
.pn-header {
  position: sticky;
  top: 0;
  background: #ffffffcc; /* blanc semi-transparent */
  backdrop-filter: blur(6px);
  z-index: 1000;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  text-align:center;
}

.pn-wrapper {
  font-family: "Inter", system-ui, sans-serif;
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

/* ===== Barre de progression ===== */
.pn-progress-bar {
  background: #e6e9f0; /* couleur de fond */
  border-radius: 50px;
  height: 25px;
  position: relative;
  overflow: hidden;
}

.pn-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #FF8877, #457D58) !important; /* rouge → vert */
  border-radius: 50px;
  transition: width 0.4s ease;
}

.pn-progress-fill span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  font-weight: 600;
  pointer-events: none; /* évite de bloquer les clics sur les cases */
}

.pn-progress-info {
  margin-top: 8px;
  color: #555;
  font-size: 0.95rem;
  text-align: center;
}

/* ===== Grille ===== */
.pn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.pn-item-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
}

.pn-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.pn-item-card.checked {
  background: #FFD2CB;
  border-color: #FF8877;
}

/* ===== Checkbox simplifiée et alignée ===== */
.pn-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #FF8877; /* couleur principale */
  margin-right: 10px;
  flex-shrink: 0;
}

.pn-item-card label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.pn-item-title {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
}
/* ================== Bouton Connexion ================= */
.pn-login-hint {
  display: flex;
  align-items: center; /* centre verticalement le texte et le bouton */
  gap: 10px; /* espace entre le texte et le bouton */
  font-size: 14px;
}
.pn-login-btn {
  margin-top: 10px;
  background: #457D58;
  color: #F6F6E9;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pn-login-btn:hover {
  background: #CBDDD1;
  color :#457D58;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}


/* === Suivi par matière === */
/* === Wrapper et titre === */
.pn-wrapper {
    padding: 16px;
}

.pn-title {
    text-align: center;
    font-size: 1.35rem; /* légèrement plus petit */
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

/* === Accordéon === */
.pn-accordion-item {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid transparent;
    transition: all 0.25s ease;
    overflow: hidden;
}

.pn-accordion-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.pn-accordion-title-wrapper {
    width: 100%;
}

.pn-accordion-header h3 {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
}

/* Barre de progression visible dans le header */
.pn-matiere-bar-header {
    height: 12px;
    background: #e6e9f0;
    border-radius: 6px;
    overflow: hidden;
}

.pn-matiere-fill {
    height: 100%;
    border-radius: 6px;
    background-color: var(--matiere-color);
    transition: width 0.5s ease, background-color 0.5s ease;
}

/* Pourcentage coloré selon la matière */
.pn-matiere-percent {
    font-weight: 600;
    color: var(--matiere-color);
}

/* Contenu de l’accordéon */
.pn-accordion-content {
    display: none;
    padding: 10px 16px 16px;
}

.pn-accordion-item.open {
    border-color: var(--matiere-color);
}

/* Infos items */
.pn-matiere-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
    text-align: center;
}

/* === Items cochables en 1 colonne === */
.pn-matiere-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
}

.pn-item-line {
    display: flex;
    align-items: center;
    gap: 6px; /* légèrement moins d'espace */
    font-size: 0.88rem; /* un peu plus petit */
    color: #333;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Checkbox un peu plus petite */
.pn-item-line input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--matiere-color);
    cursor: pointer;
    flex-shrink: 0;
}

/* Texte tronqué si trop long */
.pn-item-line span {
    flex: 1 1 0;        /* permet de rétrécir le texte dans le flex container */
    min-width: 0;        /* important pour que overflow fonctionne dans flex */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* ajoute "..." si le texte dépasse */
}

.pn-item-line:hover span {
    color: var(--matiere-color);
}


/* === Responsive === */
@media (max-width: 768px) {
    .pn-accordion-header {
        padding: 12px 14px;
    }
    .pn-title {
        font-size: 1.35rem;
        margin-bottom: 18px;
    }
    .pn-item-line input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    .pn-item-line span {
        font-size: 0.85rem;
    }
    .pn-wrapper {
        padding: 12px;
    }
    .pn-title {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }
    .pn-item-line input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    .pn-item-line span {
        font-size: 0.8rem;
    }
}
