/* =========================
   LOCAL FONTS
========================= */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-SemiBold.ttf') format('ttf');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* =========================
   VARIABLES
========================= */

:root {
  --primary: #4A5C6A;
  --accent: #8FAF9D;
  --background: #F8F6F2;
  --white: #FFFFFF;
  --text-dark: #2B2B2B;
  --text-light: #7A7A7A;
  --radius: 18px;
}

/* =========================
   RESET
========================= */

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

/* =========================
   BODY + BACKGROUND
========================= */

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Silhouette globale */

body::before {
  content: "";
  position: fixed;
  bottom: -120px;
  right: -100px;
  width: 800px;
  height: 800px;
  background: url('../img/horse-silhouette.png') no-repeat center;
  background-size: contain;
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
}
body::before {
  animation: floatHorse 12s ease-in-out infinite;
}

@keyframes floatHorse {
  0% { transform: translateX(5%) translateY(0px); }
  50% { transform: translateX(5%) translateY(-10px); }
  100% { transform: translateX(5%) translateY(0px); }
}

/* =========================
   HERO CENTER
========================= */

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* =========================
   CARD
========================= */

.card {
  background: var(--white);
  padding: 50px 40px;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,0.05);
  text-align: center;
  max-width: 420px;
  width: 100%;
}
.card {
  animation: fadeUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   TYPOGRAPHY
========================= */

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 15px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 35px;
}

/* =========================
   BUTTONS
========================= */

.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.btn-primary,
.btn-outline {
  padding: 14px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: #394854;
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover,
.btn-outline:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
/* =========================
   APP HERO
========================= */

.app-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px;
  text-align: center;
}

.app-container {
  max-width: 420px;
}

.app-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  color: var(--primary);
  margin-bottom: 15px;
}

.app-tagline {
  color: var(--text-light);
  margin-bottom: 40px;
  line-height: 1.6;
}

.app-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.full {
  width: 100%;
  text-align: center;
}

/* =========================
   FEATURES MOBILE STYLE
========================= */

.app-features {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 18px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 14px;
}
/* =========================
   FORMULAIRE
========================= */

.form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

button {
  border: none;
  cursor: pointer;
}

.back-link {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}
/* =========================
   DASHBOARD
========================= */

.dashboard {
  padding: 30px 20px 80px;
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--primary);
}

.logout {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
}

.modules {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.module-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.2s ease;
}

.module-card:hover {
  transform: translateY(-3px);
}

.module-card h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 8px;
  font-size: 18px;
}

.module-card p {
  font-size: 14px;
  color: var(--text-light);
}

.alert-error {
  background: #FDEAEA;
  color: #8B2E2E;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 15px;
}

.alert {
  background: #EAF4EA;
  color: #3E6B3E;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 15px;
}
.notif-icon {
  position: relative;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #c0392b;
  color: white;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 50%;
}
/* NOTIFICATION PUSH */
.notif-dropdown {
  background: white;
  width: 300px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.notif-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.notif-item.unread {
  background: #F8F6F2;
  font-weight: bold;
}
/* =========================
   RESPONSIVE
========================= */

@media (max-width: 480px) {
  .card {
    padding: 40px 25px;
  }

  .logo {
    font-size: 26px;
  }
}
.notif-wrapper {
    position: relative;
    display: inline-block;
}

.notif-container {
    position: relative;
    cursor: pointer;
}

.notif-icon {
    font-size: 22px;
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #E53935;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.notif-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 10px;
    z-index: 1000;
}

.notif-wrapper.active .notif-dropdown {
    display: block;
}

.notif-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.notif-item.unread {
    background: #f5f9ff;
}
.notif-item {
    transition: background 0.3s ease;
}

.notif-item.unread {
    background: #f0f6ff;
}
@media (min-width: 768px) {

  .app-container {
    max-width: 600px;
  }
  .app-features {
    flex-direction: row;
    justify-content: center;
  }
  .feature-card {
    flex: 1;
    max-width: 300px;
  }
  .modules {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .module-card {
    flex: 1 1 calc(50% - 20px);
  }
}