/* ==========================================================================
   THÈME 1 : PAGE DE PRISE DE NOTES (admin.php - Style Parchemin & Turquoise)
   ========================================================================== */
body.theme-admin {
  --sable: #f3e5c8;
  --creme: #fbf4e2;
  --terre: #a4512a;
  --terre-fonce: #5e3219;
  --turquoise: #2b9a8f;
  --turquoise-fonce: #1d6f67;
  --sauge: #8a9a6b;
  --nuit: #3a271a;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  margin: 0;
  padding: 1.5rem 1rem 3rem;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--nuit);
  background-color: #5a3820;
  background-image:
    radial-gradient(rgba(255,220,170,.07) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,.12) 1px, transparent 1px);
  background-size: 14px 14px, 22px 22px;
  background-position: 0 0, 7px 9px;
}

.theme-admin * { box-sizing: border-box; }

.theme-admin .page {
  max-width: 860px;
  margin: 9px auto 0;
  overflow: hidden;
  background: var(--sable);
  border: 3px solid var(--terre-fonce);
  border-radius: 6px;
  box-shadow: 0 0 0 6px var(--turquoise-fonce), 0 0 0 9px var(--terre-fonce), 0 14px 30px rgba(0,0,0,.55);
}

.theme-admin .contenu { padding: 1.5rem 1.6rem 1.8rem; }

.theme-admin .bande {
  height: 28px;
  background-color: var(--terre);
  background-image:
    linear-gradient(135deg, var(--creme) 25%, transparent 25%),
    linear-gradient(225deg, var(--creme) 25%, transparent 25%),
    linear-gradient(315deg, var(--creme) 25%, transparent 25%),
    linear-gradient(45deg,  var(--creme) 25%, transparent 25%);
  background-size: 28px 28px;
  background-position: -14px 0, -14px 0, 0 0, 0 0;
  border-top: 4px solid var(--turquoise);
  border-bottom: 4px solid var(--turquoise);
}

.theme-admin .banniere {
  text-align: center;
  padding: 1.2rem 1rem 1rem;
  background: linear-gradient(var(--terre-fonce), #47260f);
  color: var(--creme);
}
.theme-admin .banniere strong {
  display: block;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f6d9a0;
  text-shadow: 0 2px 3px rgba(0,0,0,.6);
}
.theme-admin .banniere small {
  display: block;
  margin-top: .35rem;
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: #bfe3da;
}
.theme-admin .banniere .nat { font-size: 1.2rem; margin: 0 .7rem; }
.theme-admin .nature {
  text-align: center;
  padding: .6rem;
  font-size: 1.3rem;
  letter-spacing: .9rem;
  background: linear-gradient(#47260f, var(--terre-fonce));
}

.theme-admin h1, .theme-admin h2 { font-family: var(--serif); color: var(--terre-fonce); }
.theme-admin h1 { margin: .2rem 0 .6rem; font-size: 1.6rem; }
.theme-admin h2 {
  margin: 1.8rem 0 .4rem;
  font-size: 1.25rem;
  padding-bottom: .3rem;
  border-bottom: 2px dotted #b98b5e;
}
.theme-admin h2::before { content: "❖ "; color: var(--turquoise); }
.theme-admin a { color: var(--turquoise-fonce); font-weight: 700; }
.theme-admin a:hover { color: var(--terre); }
.theme-admin .ok  { background: #e2ead2; border: 2px solid var(--sauge); color: #2f4a1f; padding: .6rem .9rem; border-radius: 4px; }
.theme-admin .err { background: #f6dccd; border: 2px solid #c0472b; color: #7a2410; padding: .6rem .9rem; border-radius: 4px; }

/* Grille des deux cellules de prise de note */
.theme-admin .grille-note {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin-top: .8rem;
}
.theme-admin .cellule {
  background: rgba(255, 255, 255, .35);
  border: 2px dotted #b98b5e;
  border-radius: 4px;
  padding: .7rem .9rem .9rem;
}
.theme-admin label {
  display: block;
  margin-top: 0;
  font-weight: 700;
  color: var(--terre-fonce);
  letter-spacing: .03em;
}
.theme-admin input[type=text],
.theme-admin input[type=password],
.theme-admin textarea {
  width: 100%;
  margin-top: .35rem;
  padding: .65rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--nuit);
  background: var(--creme);
  border: 2px solid #b98b5e;
  border-radius: 3px;
}
.theme-admin textarea {
  resize: none;
  overflow: hidden;
  min-height: 90px;
  line-height: 1.45;
}
.theme-admin input:focus,
.theme-admin textarea:focus {
  outline: none;
  border-color: var(--turquoise);
  box-shadow: 0 0 0 3px rgba(43,154,143,.3);
}

.theme-admin button {
  margin-top: .4rem;
  padding: .6rem 1.3rem;
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--creme);
  background: linear-gradient(#c0643a, var(--terre));
  border: 2px solid var(--terre-fonce);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--terre-fonce), 0 4px 6px rgba(0,0,0,.3);
}
.theme-admin button:hover { background: linear-gradient(#d07a4a, #b05a30); }
.theme-admin button:active { transform: translateY(1px); }

.theme-admin .haut {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
}
.theme-admin .haut button { margin: 0; background: linear-gradient(#3aa99d, var(--turquoise-fonce)); }
.theme-admin .lien-vue { margin-right: .8rem; font-size: .9rem; }
.theme-admin form.inline { display: inline; }

.theme-admin table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.theme-admin th {
  text-align: left;
  font-family: var(--serif);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--terre-fonce);
  padding: .4rem .5rem;
  border-bottom: 2px solid var(--terre);
}
.theme-admin td { padding: .65rem .5rem; border-bottom: 2px dotted #b98b5e; vertical-align: top; }
.theme-admin tr:hover td { background: rgba(43,154,143,.09); }
.theme-admin td strong { color: var(--terre-fonce); }
.theme-admin td strong::before { content: "◆ "; color: var(--turquoise); font-size: .8em; }
.theme-admin td.actions, .theme-admin th.actions { white-space: nowrap; text-align: right; }
.theme-admin td form { display: inline; }
.theme-admin td button {
  margin: 0 0 0 .4rem;
  padding: .3rem .7rem;
  font-size: .7rem;
  background: linear-gradient(#c24b34, #8f2f1d);
}
.theme-admin .petit { font-size: .82rem; color: #7b5b40; }


/* ==========================================================================
   THÈME 2 : LISTE DES NOTES (index.php - Style Plaque Bois & Or)
   ========================================================================== */
body.theme-public {
  --fond: #4a3228;
  --brun-fonce: #2d1a10;
  --or: #e8b84b;
  --or-fonce: #c9972e;
  --creme: #fbefd0;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  margin: 0;
  background: var(--fond);
  color: var(--creme);
  font-family: Georgia, 'Times New Roman', serif;
}

.theme-public * { box-sizing: border-box; }

.theme-public .entete {
  background-color: #3a2416;
  background-image: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.45)), url('entete.jpg');
  background-size: cover;
  background-position: center;
  padding: 2rem 1rem;
  text-align: center;
  border-bottom: 3px solid var(--or-fonce);
}
.theme-public .plaque {
  display: inline-block;
  padding: 1.1rem 2.5rem;
  background: linear-gradient(160deg, #6b4126, #3d2314);
  border: 2px solid var(--or-fonce);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,220,140,.15);
}
.theme-public .plaque h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: .06em;
  color: var(--creme);
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
  text-transform: uppercase;
}
.theme-public .plaque .sous {
  margin: .3rem 0 0;
  color: var(--or);
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .25em;
  font-size: clamp(.7rem, 2vw, 1rem);
  text-transform: uppercase;
}
.theme-public .plaque .etoiles {
  margin: .5rem 0 0;
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--or);
}

.theme-public nav {
  background: linear-gradient(var(--brun-fonce), #1f1109);
  border-bottom: 1px solid var(--or-fonce);
  text-align: center;
  padding: .6rem;
}
.theme-public nav a {
  color: var(--creme);
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
  margin: 0 .9rem;
}
.theme-public nav a:hover { color: var(--or); }

.theme-public main { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.theme-public h2.titre {
  font-family: var(--serif);
  text-align: center;
  color: var(--or);
  font-size: 1.8rem;
  letter-spacing: .06em;
  margin: 1rem 0 .3rem;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
}
.theme-public .intro { text-align: center; font-size: .88rem; margin: 0 0 1.4rem; }
.theme-public .defile { overflow-x: auto; }

/* Tableau 2 cellules : Nom + Aperçu 30 caractères */
.theme-public table.t { width: 100%; border-collapse: collapse; }
.theme-public table.t th {
  text-align: left;
  font-family: var(--serif);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--or);
  padding: .55rem .7rem;
  border-bottom: 2px solid var(--or-fonce);
}
.theme-public table.t td {
  padding: .75rem .7rem;
  border-bottom: 1px solid rgba(232,184,75,.3);
  vertical-align: middle;
}
.theme-public table.t tr:nth-child(even) td { background: rgba(0,0,0,.14); }
.theme-public table.t tr.ligne-cliquable { cursor: pointer; transition: background .15s; }
.theme-public table.t tr.ligne-cliquable:hover td { background: rgba(232,184,75,.16); }

.theme-public .cellule-nom { width: 42%; }
.theme-public .cellule-nom a { color: var(--or); text-decoration: none; font-size: 1.05rem; }
.theme-public .cellule-apercu { width: 58%; color: var(--creme); font-style: italic; }
.theme-public .petit { font-size: .78rem; opacity: .8; }

.theme-public .lien-retour { color: var(--or); font-weight: 700; text-decoration: none; }
.theme-public .lien-retour:hover { text-decoration: underline; }

.theme-public .carte-lecture {
  padding: 1.2rem 1.4rem;
  background: linear-gradient(#fbf1da, #ecd5a4);
  color: #3d2314;
  border: 2px solid #8b5a2b;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.45);
  line-height: 1.6;
  font-size: 1.02rem;
}

.theme-public .pied {
  margin: 2.5rem auto 0;
  max-width: 640px;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(160deg, #6b4126, #3d2314);
  border: 2px solid var(--or-fonce);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.theme-public .pied strong {
  display: block;
  font-family: var(--serif);
  color: var(--or);
  font-size: 1.1rem;
  letter-spacing: .05em;
}
.theme-public .pied span { font-size: .75rem; }