/*  
   Notes de Pam — minimalist brutalist notes search
   Design & code: Pam
   Inspired by ATNOFS / ippsec.rocks  
   Built with pure HTML, CSS & JS  
*/

:root {
  --rose: #fbbcc4;
  --rose-light: #fff7f9;
  --black: #111;
  --grey-dark: #333;
  --violet: #b394e6;
  --font: "IBM Plex Mono", monospace;
}

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

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--rose);
  color: var(--black);
}

/* HEADER */
header {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: 3rem;
}

h1 {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.accent { color: var(--violet); }

#search {
  width: 100%;
  border: none;
  padding: 1.2rem 1rem;
  margin-top: 3rem;
  font-size: 2rem;
  font-weight: 600;
  color: var(--rose);
  text-align: center;
  transition: background 0.3s ease;
}
#search:focus { background: #fff; outline: none; }

/* MAIN CONTENT */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* NOTE STRUCTURES */

.note {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: stretch;
  min-height: 160px;
  background: var(--rose-light);
  transition: background 0.3s ease, transform 0.10s ease;;
}

.note .left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2rem;
}

.note .right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
}

/* NOTE LEFT: TITLE AND DESCRIPTION */

.note:nth-child(even) { background: #fff; }

.note .left:hover {
    background: var(--rose);
    transform: translateY(-1px);
}

.note .left::after { /* light shadow */
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    4px 0 8px rgba(17, 17, 17, 0.05),
    0 -4px 8px rgba(17, 17, 17, 0.05);
  pointer-events: none;
}

.note h2 { /* title */
  font-size: 1.3rem;
  font-weight: 600;
  padding: 0rem 2rem;
}

.note h3 { /* description */
  font-size: 1rem;
  font-weight: 400;
  color: var(--grey-dark);
  padding: 2rem;
  margin-bottom: 0.5rem;
}

.note p { /* default */
  color: var(--grey-dark);
  line-height: 1.6;
  font-size: 1rem;
  padding: 2rem;
}

/* NOTE RIGHT: COMMANDS */

.cmd-line {
  width: 100%;
  display: block;
  margin: 0.5rem;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  background: var(--violet);
  color: var(--rose-light);
  overflow-wrap: break-word;
}

.cmd-line:hover {
  background: var(--rose-light);
  color: var(--violet);
}

.cmd-line.copied {
  background: var(--rose);
}

.cmd-title {
  font-family: var(--font);
  margin: 1rem 0 0.5rem;
  line-height: 1.3;
}

.cmd-title:hover {
  background: var(--rose-light);
}

.cmd-title-l1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--violet);
  padding-left: 0.8rem;
  background: var(--rose-light);
  border-radius: 4px;
}

.cmd-title-l2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rose);
  padding-left: 0.6rem;
  border-radius: 3px;
}

.cmd-title-l3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--grey-dark);
  padding-left: 0.4rem;
  background: var(----rose-light);
  border-radius: 2px;
}

/* FOOTER */
footer {
  background: var(--rose);
  border-top: 1px solid var(--grey-dark);
  text-align: center;
  font-size: 0.9rem;
  padding: 1.2rem 0;
  margin-top: auto;
}

/* =========================
   MODE TITRES (t:)
========================= */

.title-list {
  display: flex;
  flex-direction: column;
}

/* Chaque titre = mini note */
.title-item {
  background: var(--rose-light);
  padding: 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: 
    background 0.25s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease;
}

/* Alternance comme .note */
.title-item:nth-child(even) {
  background: #fff;
}

/* Hover dans ton style */
.title-item:hover {
  background: var(--rose);
  transform: translateY(-1px);
  box-shadow:
    4px 0 8px rgba(17, 17, 17, 0.05),
    0 -4px 8px rgba(17, 17, 17, 0.05);
}

/* Active click */
.title-item:active {
  transform: translateY(0);
}

/* Optionnel : effet subtil au focus clavier */
.title-item:focus {
  outline: none;
  background: var(--violet);
  color: var(--rose-light);
}

.title-item.is-active {
  background: var(--violet) !important;
  color: var(--rose-light);
}

/* gain lisisiblite */

/* =========================
   LISIBILITÉ (mode normal)
   Overrides doux
========================= */

.note p,
.cmd-line {
  max-width: 80ch;
}

/* 1) Base un poil plus grande */
html {
  font-size: 18px; /* 16 -> 18 */
}

/* 2) Évite les lignes trop longues (fatigue visuelle) */
main {
  max-width: 2000px;
  margin: 0 auto;
}

/* 3) Titres / descriptions plus lisibles */
.note h2 { /* title */
  font-size: 1.6rem;   /* 1.3 -> 1.6 */
  line-height: 1.25;
}

.note h3 { /* description */
  font-size: 1.1rem;   /* 1.0 -> 1.1 */
  line-height: 1.55;
}

/* 4) Texte normal plus confort */
.note p {
  font-size: 1.05rem;  /* 1.0 -> 1.05 */
  line-height: 1.75;   /* 1.6 -> 1.75 */
}

/* 5) Commandes : le vrai gain de lisibilité */
.cmd-line {
  font-size: 1.15rem;  /* 0.95 -> 1.05 */
  line-height: 1.6;
  padding: 1.6rem 1rem; /* un poil moins haut que 2rem, plus dense */
}

/* 6) Micro-amélioration rendu typo */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}