/* style.css */
body {
  font-family: system-ui, sans-serif;
  background: #f8fafc;
  margin: 0;
  padding: 0;
  color: #1f2937;
}

.container {
  max-width: 480px;
  margin: auto;
  padding: 1.5rem 1rem;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #1e3a8a;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.intro-section {
  padding: 0 1.5rem;
  text-align: left;
}

.intro-section article {
  max-width: 600px;
  margin: 0 auto;
}

.card {
  background: white;
  padding: 0.5rem;
  border-radius: 1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  margin-bottom: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Général */
.stat-box {
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Valeur en gros */
.stat-box .value {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.125rem;
}

/* Libellé */
.stat-box .label {
  font-size: 0.85rem;
  font-weight: 400;
  color: #4b5563;
}

/* Couleurs appliquées au bloc complet */
.stat-box.total     { background: #eff6ff; color: #3b82f6; }
.stat-box.normal    { background: #ecfdf5; color: #16a34a; }
.stat-box.night     { background: #f5f3ff; color: #8b5cf6; }
.stat-box.holiday   { background: #fef2f2; color: #dc2626; }
.stat-box.sunday    { background: #fff7ed; color: #f97316; }
.stat-box.remaining { background: #f9fafb; color: #111827; }


.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.calendar-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-header-bar h2 {
  margin: 0;
}

.calendar-header-bar input[type="month"] {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  padding: 0.4rem 0.6rem;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  cursor: pointer;
}


.calendar-cell {
  background: #f3f4f6;
  padding: 0.75rem;
  border-radius: 0.5rem;
}

/* ✅ Jour normal travaillé */
.calendar-cell.filled.normal {
  background: #dbeafe;
  border: 2px solid #60a5fa;
}

.calendar-cell.holiday {
  background: #fecaca;
  border: 2px solid #fecaca;
  color: #991b1b;
}

/* ✅ Jour férié travaillé */
.calendar-cell.filled.holiday {
  background: #dbeafe;
  border: 2px solid #f87171;
  color: #991b1b;
}

.calendar-cell.filled {
  background-color: #dbeafe !important;
}

.calendar-cell.sunday {
  background: #fde68a;
  border: 2px solid #fde68a;
  color: #92400e;
}

/* ✅ Dimanche travaillé */
.calendar-cell.filled.sunday {
  background: #dbeafe;
  border: 2px solid #f59e0b;
  color: #92400e;
}

.calendar-cell.clickable:hover {
    background: #d8d9dd;
    cursor: pointer;
  }
  .calendar-cell.empty {
    background: transparent;
  }

.highlight {
    color: #3b82f6;
 }

 input {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
  }
  
  button {
    background: #3b82f6;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
  }

  button:hover {
    background: #2563eb;
  }
  

.center {
    text-align: center;
  }
.small-text {
    font-size: 0.9rem;
    color: #6b7280;
  }
.night-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
.weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  .weekdays label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
  }
  
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .btn-small {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    background: #ef4444;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
  }

  .btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .time-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .time-range input[type="time"] {
    flex: 1;
  }  

  .btn-group button {
    flex: 1;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
  }

  .btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    cursor: pointer;
  }
  
  .btn-full:hover {
    background: #2563eb;
  }  

  .modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
  }
  
  .modal.hidden {
    display: none;
  }
  
  .modal-content {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
  }
  
  .modal-content h3 {
    margin-top: 0;
  }
  
  .modal-content label {
    display: block;
    margin: 0.5rem 0;
  }
  
  .modal-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .modal-buttons button {
    flex: 1;
    padding: 0.5rem;
  }
  
  button.danger {
    background: #dc2626;
    color: white;
    border: none;
  }
  
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .header h1 {
    font-size: 1.4rem;
    color: #1e3a8a;
    margin: 0;
  }
  
  .header-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .btn {
    background: #3b82f6;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    text-decoration: none;
    font-size: 0.85rem;
  }

  .danger {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.6rem;
    font-weight: 500;
    cursor: pointer;
  }
  
  .danger:hover {
    background: #b91c1c;
  }
  
  .btn-danger {
    background: #ef4444;
  }
  
  .month-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .month-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 1rem;
    cursor: pointer;
  }
  
  .month-btn:hover {
    background: #2563eb;
  }

  .entry-list-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1rem; /* ✅ Ajoute un espacement gauche/droite */
  }
  
  .entry-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dbeafe;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.05rem;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .entry-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .entry-date {
    font-weight: 600;
    color: #111827;
    font-size: 0.85rem;
  }

  .entry-time {
    color: #4b5563;
    font-size: 0.7rem;
  }
  
  .entry-info .date {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
  }
  
  .entry-info .time {
    font-size: 0.9rem;
    color: #6b7280;
  }
  
  .entry-actions {
    display: flex;
    gap: 0.5rem;
  }
  
  .entry-actions button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  
  .entry-actions button svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
    stroke: #4b5563;
  }
  
  .entry-actions button:hover {
    background: #f3f4f6;
  }
  

  .calendar-cell.today {
    font-weight: bold;
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
  }
  
  .progress-wrapper {
    background: #e5e7eb;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    position: relative;
  }
  
  .progress-bar {
    height: 10px;
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
  }
  
  body.login-body {
    background: #f1f5f9;
    font-family: system-ui, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
  }
  
  .login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
  }
  
  .login-header {
    background: linear-gradient(90deg, #3b82f6, #8976e0);
    padding: 1rem 1.5rem;
    text-align: center;
    color: white;
  }
  
  .login-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    color: white;
  }
  
  .login-header p {
    margin: 0;
    font-size: 1.2rem;
  }
  
  .login-form {
    padding: 0.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .login-form label {
    font-weight: 500;
    font-size: 0.9rem;
  }
  
  .login-form input {
    padding: 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #f9fafb;
  }
  
  .btn-login {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #0f172a;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
  }
  
  .btn-login:hover {
    background: #1e293b;
  }
  
.divider {
  display: flex; /* Rend le conteneur flex */
  align-items: center; /* Centre verticalement les éléments flex */
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin: 1rem 0;
  gap: 15px; /* Ajoute un espace entre les éléments flex (le texte et les lignes) */
}
  
.divider::before,
.divider::after {
  content: "";
  flex-grow: 1; /* Permet aux lignes de prendre tout l'espace disponible */
  height: 1px;
  background: #e5e7eb;
  /* Supprimez les positions absolues car Flexbox gère le positionnement */
  /* top: 50%; */
  /* width: 40%; */
  /* left: 0; */
  /* right: 0; */
}
  
  .divider::before { left: 0; }
  .divider::after  { right: 0; }
  
  .btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.6rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
    text-decoration: none;
    margin: 0 1.5rem 1rem;
  }
  
  .btn-google:hover {
    background: #f3f4f6;
  }
  
  .login-footer {
    text-align: center;
   /* font-size: 0.85rem; */
    margin-bottom: 1rem;
  }
  
  .login-footer a {
    color: #6366f1;
    text-decoration: none;
  }
  
  .error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 1rem 1.5rem -0.5rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
  }
  
  .flash {
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem;
    margin: 1rem auto;
    border-radius: 8px;
    width: 90%;
    text-align: center;
    font-weight: 500;
  }
  .hidden {
    display: none;
  }
  
  /* Conteneur principal des vacations */
#vacation-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

/* Chaque bloc de vacation (fieldset) */
.vacation-group fieldset {
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 6px;
  background: #f9f9f9;
}

/* Légende (titre de chaque bloc) */
.vacation-group legend {
  font-weight: bold;
  font-size: 0.95rem;
  padding: 0 0.5rem;
}

/* Alignement des champs dans chaque vacation */
.vacation-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* Inputs plus petits pour mieux loger les vacations */
.vacation-group input[type="date"],
.vacation-group input[type="time"],
.vacation-group input[type="number"] {
  width: 100%;
  max-width: 200px;
  padding: 0.4rem;
  font-size: 0.9rem;
  margin-top: 0.2rem;
  box-sizing: border-box;
}

.vacation-block {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.vacation-header {
  background: #f1f5f9;
  padding: 0.6rem 1rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.vacation-fields {
  padding: 0.8rem 1rem;
  background: #fff;
}

.collapsed .vacation-fields {
  display: none;
}

.vacation-block {
  border: 1px solid #ccc;
  margin-bottom: 10px;
  border-radius: 5px;
  overflow: hidden;
}

.vacation-header {
  background-color: #f3f4f6;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
}

.vacation-fields {
  padding: 10px;
  background-color: #fff;
}


/* Styles pour centrer le bouton Google */
.g_id_signin {
    max-width: 240px; 
    margin: 15px auto; /* Ajoute une marge verticale de 15px et centre horizontalement */
    display: block; 
}

#g_id_onload {
    margin-top: 20px; 
    margin-bottom: 10px;
}