/* GLOBAL RESET & TYPOGRAPHIE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  line-height: 1.6;
  padding: 40px 0;
  max-width: 1000px; /* Largeur maximale de la page */
  margin: 0 auto;
  text-align: left;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

h1 {
  font-size: 2.2em;
  color: #007bff;
  border-bottom: 3px solid #28a745;
  padding-bottom: 15px;
  margin-top: 0;
  margin-bottom: 40px;
  text-align: center;
}

/* --- CLASSE POUR RÉDUIRE LA LARGEUR --- */
.narrow-container {
  max-width: 700px; /* Largeur maximale pour les conteneurs réduits */
  width: 100%; /* Assure la responsivité */
  margin-left: auto;
  margin-right: auto;
}

/* --- STYLES DE CADRE GÉNÉRAUX --- */

.form-container,
.calendar-container,
.input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  width: 100%; /* Prend 100% de l'espace disponible (limité par max-width) */
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* --- CALENDRIER (Largeur Maximale) --- */
.calendar-container {
  width: 100%;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
}

.calendar th {
  background-color: #f8f8f8;
  padding: 10px 5px;
  font-size: 0.9em;
  border: 1px solid #ddd;
}

.calendar td {
  border: 1px solid #ddd;
  padding: 15px 5px;
  text-align: center;
  vertical-align: top;
  height: 100px;
}

/* --- BOUTONS GÉNÉRAUX --- */
button {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  color: #000000;
  cursor: pointer;
  transition: all 0.2s;
  margin: 5px;
}

/* --- COULEURS SPÉCIFIQUES POUR LES BOUTONS D'ACTION --- */

.btn-primary,
#selectWeekdaysBtn {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}
.btn-primary:hover,
#selectWeekdaysBtn:hover {
  background-color: #0056b3;
}

#saveDataBtn {
  background-color: #28a745;
  color: white;
  border-color: #218838;
}
#saveDataBtn:hover {
  background-color: #218838;
}

#clearDataBtn {
  background-color: #dc3545;
  color: white;
  border-color: #c82333;
}
#clearDataBtn:hover {
  background-color: #c82333;
}

#exportPdfBtn {
  background-color: #17a2b8;
  color: white;
  border-color: #138496;
}
#exportPdfBtn:hover {
  background-color: #138496;
}

/* --- BOUTONS DU CALENDRIER --- */

.trip-buttons button {
  padding: 5px 8px;
  font-size: 11px;
  background-color: #f0f0f0;
  color: #333;
  width: 48%;
  margin: 2px 0;
}

.trip-buttons button.selected {
  background-color: #007bff !important;
  color: white !important;
  border-color: #0056b3 !important;
}

/* --- INPUTS --- */
.form-container input,
.input-container input {
  margin: 5px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 80%;
  text-align: center;
}

/* --- AUTRES ÉLÉMENTS D'INTERFACE --- */
.trip-buttons {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 5px;
}

.button-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 100;
}

.notification.show {
  opacity: 1;
}

/* --- RÉSUMÉS (summary-container) --- */

.summary-container {
  margin-top: 30px;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
}

.summary-toggle {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 15px;
}

.summary-toggle button {
  border: none;
  background-color: transparent;
  color: #007bff;
  font-weight: bold;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.summary-toggle button.active {
  border-bottom: 3px solid #28a745;
  color: #28a745;
}

.hidden-view {
  display: none !important;
}

.active-view {
  display: block;
}

.small-info {
  font-size: 0.85em;
  color: #6c757d;
  margin-top: 20px;
  border-top: 1px dashed #eee;
  padding-top: 10px;
}

/* --- STYLES POUR LE GUIDE ET LE CONTENU SEO (Largeur Max, sans .narrow-container) --- */

.guide-frame,
.content-footer-frame {
  margin-top: 30px;
}

.guide-frame h2,
.content-footer-frame h2 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 25px;
  padding-top: 10px;
  border-bottom: none;
}

.guide-frame h3,
.content-footer-frame h3 {
  color: #3498db;
  border-left: 4px solid #3498db;
  padding-left: 10px;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.guide-frame ol,
.guide-frame ul,
.content-footer-frame p,
.content-footer-frame ul {
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
  padding-left: 20px;
}

.highlight-box {
  border: 2px solid #17a2b8;
  background-color: #e2f7f9;
  padding: 15px;
  margin: 20px 0;
  border-radius: 8px;
  font-weight: bold;
}

.formula-box {
  background-color: #f0f8ff;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-size: 1.1em;
  border-left: 5px solid #007bff;
  font-family: monospace;
}

.small-text {
  font-size: 0.8em;
  color: #6c757d;
  text-align: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px dashed #ced4da;
}

/* --- PIED DE PAGE (FOOTER) --- */

.site-footer {
  width: 100%;
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
  text-align: center;
  background-color: #f8f9fa;
  color: #6c757d;
  font-size: 0.85em;
}

.footer-links a {
  color: #007bff;
  text-decoration: none;
  padding: 0 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #0056b3;
}

.separator {
  color: #ced4da;
}

.site-footer p {
  margin-top: 10px;
  margin-bottom: 0;
}
