/* ============================================================
   STYLE PARTAGÉ — "EMBER" (noir + rouge)
   Utilisé par index.html (entrée) ET resources.html (ressources).
   ============================================================ */

/* ===== Couleurs (la DA) ===== */
:root {
  --bg:           #1F1F20;
  --field-bg:     #1F1F20;
  --field-border: #ADB3B2;
  --card:         #ADB3B2 ;
  --card-border:  #ADB3B2;
  --text:         #f2f2f3;
  --muted:        #8a8a90;
  --placeholder:  #6a6a70;
  --red:          #2962D8;
  --red-hover:    #3F72DC;
  --red-soft:     rgba(0, 0, 0, 0);
  --success:      #32d583;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
}

/* ===== Logo (en haut à gauche) — remplace par le tien ===== */
.logo-corner {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3;
  width: 100px;
  height: 100px;
  border-radius: 13px;
  background-image: url(Instagram_icon);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================================
   PAGE D'ENTRÉE (index.html)
   ============================================================ */
.layout {
  position: relative;
  display: flex;
  min-height: 100vh;
}

/* Colonne gauche : visuel (cachée en mobile) */
.visual {
  display: none; 
  position: relative; /* Remplacé 'left' par 'relative' pour bloquer le voile noir */
  flex: 1;
  
  /* IMAGE DE FOND */
  background-image: url('fon.png');
  background-position: center;
  background-size: cover; /* Conserve les proportions de l'image et remplit la zone */
  background-repeat: no-repeat; /* Évite que l'image ne se répète */
}
.visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0); /* Voile noir semi-transparent de 45% */
}

.visual .tagline {
  position: absolute;
  left: 48px;
  bottom: 48px;
  z-index: 1;
  max-width: 380px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.5px;
}
.visual .tagline span { color: var(--red); }

/* Colonne droite : formulaire */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.top {
  flex: 1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 72px 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.title {
  font-size: 22px;
  font-weight: 700;
  text-align: left;
  margin: 0 0 6px;
}
.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.field { margin-bottom: 14px; }

input {
  width: 100%;
  padding: 18px;
  font-size: 16px;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--placeholder); }
input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

/* Bouton pleine largeur, arrondi "pilule" */
.btn {
  width: 100%;
  padding: 17px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--red-hover); }
.btn:active { transform: translateY(1px); }

/* Message (erreur / succès) */
.message {
  font-size: 14px;
  text-align: center;
  margin-top: 18px;
  display: none;
}
.message.error   { color: var(--red); }
.message.success { color: var(--success); font-weight: 600; }

/* Bas : lien d'aide */
.bottom {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.bottom a { color: var(--red); text-decoration: none; font-weight: 600; }
.bottom a:hover { text-decoration: underline; }

/* PC : 2 colonnes à partir de 900px */
@media (min-width: 900px) {
  .visual { display: block; flex: 1.1; }
  .panel  { flex: 0.9; }
}

/* ============================================================
   PAGE DES RESSOURCES (resources.html)
   ============================================================ */
.resources {
  max-width: 820px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}
.resources h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
}
.resources h1 span { color: var(--red); }
.resources .intro {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 36px;
}

/* Titre de section (matière) */
.section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 32px 0 14px;
}

/* Grille de liens */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

/* Une carte-lien vers un artefact */
.card-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .05s, background .15s;
}
.card-link:hover {
  border-color: var(--red);
  background: #18181b;
}
.card-link:active { transform: translateY(1px); }

.card-link .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}
.card-link .label { font-weight: 600; font-size: 15px; }
.card-link .arrow { margin-left: auto; color: var(--muted); }

/* Lien de retour / déconnexion */
.logout {
  display: inline-block;
  margin-top: 40px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.logout:hover { color: var(--red); text-decoration: underline; }

/* Liste de cours affichée dans le panneau (après connexion) */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.course-list .card-link { width: 100%; }

