/* Responsive calendar styles */
.responsive-calendar {
  width: 100%;
  overflow-x: auto;
  padding: 0;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(120deg, rgba(36,40,50,0.97) 60%, rgba(44,48,60,0.93) 100%);
  color: #ffd700;
  font-weight: 600;
  text-align: center;
  border-radius: 6px 6px 0 0;
  margin-bottom: 2px;
  font-size: 1em;
  padding: 6px 4px;
  box-sizing: border-box;
}
.calendar-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.calendar-cell {
  min-height: 70px;
  background: linear-gradient(120deg, rgba(36,40,50,0.97) 60%, rgba(44,48,60,0.93) 100%);
  border: 1px solid #2d3340;
  border-radius: 0 0 6px 6px;
  padding: 6px 4px;
    font-size: 0.85em;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.calendar-cell.holiday-note {
    background: linear-gradient(120deg, #3a4052 60%, #ffe066 100%);
    border: 2px solid #2d3340;
    color: #ffe066;
    font-weight: bold;
    opacity: 0.75;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.05);
    position: relative;
    white-space: normal;
    word-break: break-word;
}

.calendar-cell.holiday-name {
    background: linear-gradient(120deg, #23272f 60%, #3a4052 100%);
    border: 2px solid #2d3340;
    color: #ffe066;
    font-weight: bold;
    opacity: 0.80;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.07);
    position: relative;
    white-space: normal;
    word-break: break-word;
    padding: 12px 10px;
    margin: 6px 0;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(36, 40, 50, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: rgba(44, 48, 60, 0.98);
  color: #ffd700;
    padding: 48px 40px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  max-width: 420px;
  width: 90%;
  font-size: 1em;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #ffd700;
  font-size: 1.5em;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ffcc00;
}

.calendar-cell .course-item:hover .course-tooltip {
  opacity: 1;
  pointer-events: auto;
}
/* Améliorations responsive pour petits écrans */
@media (max-width: 600px) {
    body {
        font-size: 0.95em;
    }
    h1, h2 {
        font-size: 1.2em;
    }
    .container {
        padding: 16px 6px;
    }
    .calendar-cell, .calendar-container td {
        min-height: 44px;
        font-size: 0.75em;
        padding: 4px 2px;
    }
    .modal-content {
        padding: 16px 8px;
        font-size: 0.95em;
        max-width: 98vw;
    }
    .calendar-header {
        font-size: 0.9em;
        padding: 4px 2px;
    }
    .div-table-header, .div-table-row, .div-table-cell {
        font-size: 0.85em;
        padding: 6px 4px;
    }
    .month-container h2 {
        font-size: 1em;
        padding-top: 2px;
        padding-bottom: 2px;
    }
    .responsive-table th, .responsive-table td {
        padding: 8px 6px;
        font-size: 0.85em;
    }
}
/* Optimisation pour écrans de mobile très petits */
@media (max-width: 400px) {
    body {
        font-size: 0.85em;
    }
    h1, h2 {
        font-size: 1em;
    }
    .container {
        padding: 8px 2px;
    }
    .calendar-cell, .calendar-container td {
        min-height: 32px;
        font-size: 0.65em;
        padding: 2px 1px;
    }
    .modal-content {
        padding: 8px 2px;
        font-size: 0.85em;
        max-width: 100vw;
    }
    .calendar-header {
        font-size: 0.8em;
        padding: 2px 1px;
    }
    .div-table-header, .div-table-row, .div-table-cell {
        font-size: 0.75em;
        padding: 4px 2px;
    }
    .month-container h2 {
        font-size: 0.85em;
        padding-top: 1px;
        padding-bottom: 1px;
    }
    .responsive-table th, .responsive-table td {
        padding: 4px 2px;
        font-size: 0.75em;
    }
}

.calendar-cell:hover {
  background: #2a2e38;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.calendar-cell.empty {
  background: transparent;
  border: none;
}
.calendar-cell .day-no {
  font-weight: bold;
  color: #ffd700;
  font-size: 1.1em;
  margin-bottom: 2px;
  text-align: right;
}
.calendar-cell .course-list {
  margin-top: 2px;
}
.calendar-cell .course-item {
  background: rgba(50, 50, 60, 0.8);
  border-radius: 4px;
  color: #e0e0e0;
  margin-bottom: 2px;
  padding: 2px 4px;
  font-size: 0.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.calendar-cell .course-hours {
    display: block;
    font-size: 0.75em;
    color: #ffd700;
    margin-top: 2px;
    margin-left: 2px;
    font-weight: 500;
    opacity: 0.85;
    text-align: left;
    letter-spacing: 0.5px;
    padding: 0 2px;
}
.calendar-cell .course-item .course-hours {
    color: #ffe066;
    font-size: 0.72em;
    margin-left: 6px;
    margin-top: 1px;
    font-style: italic;
    opacity: 0.8;
    padding: 0 2px;
}
.calendar-cell .course-item:hover {
  background: rgba(50, 50, 60, 0.9);
}

.calendar-cell .course-item.ybc-event {
    background: linear-gradient(120deg, #2d3340 60%, #1e90ff 100%);
    color: #ffd700;
    font-weight: bold;
    border-radius: 4px;
    padding: 2px 4px;
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.10);
}
.calendar-cell .course-item.ybc-event:hover {
    background: linear-gradient(120deg, #23272f 60%, #1e90ff 100%);
    box-shadow: 0 2px 12px rgba(30, 144, 255, 0.16);
    color: #ffec80;
}


body {
    margin: 0;
    padding: 0;
    background: #23272f url('fond.png') repeat;
    color: #f4f4f4;
    min-height: 100vh;
}
.container {
    max-width: 900px;
    margin: 40px auto;
    background: rgba(30, 34, 44, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 32px 24px;
}
h1, h2 {
    color: #f4f4f4;
    font-weight: 600;
    margin-top: 0;
}
.section-title {
    font-size: 1.7em;
    color: #ffd700;
    font-weight: 700;
    margin: 32px 0 18px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #222;
    border-left: 6px solid #ffd700;
    padding-left: 16px;
}
p {
    line-height: 1.7;
    color: #e0e0e0;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    background: rgba(44, 48, 60, 0.98);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
th, td {
    padding: 12px 16px;
    text-align: left;
}
th {
    background: linear-gradient(90deg, #2d3340 0%, #3a4052 100%);
    color: #ffd700;
    font-weight: 500;
    border-bottom: 2px solid #444;
}
td {
    border-bottom: 1px solid #333;
}
tr:nth-child(even) td {
    background: rgba(36, 40, 50, 0.93);
}
tr:hover td {
    background: #2a2e38;
}
a {
    color: #1e90ff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.complete-courses {
    color: #ff6347;
    font-weight: bold;
}
.complete-courses span {
    color: #ff6347;
    font-weight: bold;
}
.available-courses {
    color: #32cd32;
    font-weight: bold;
}
.available-courses span {
    color: #32cd32;
    font-weight: bold;
}
.almost-complete-courses {
    color: #ffa500;
    font-weight: bold;
}
.almost-complete-courses span {
    color: #ffa500;
    font-weight: bold;
}
.footer-note {
    background: rgba(30, 34, 44, 0.95);
    padding: 12px 16px;
    border-top: 1px solid #444;
    text-align: center;
}
.calendar-container {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    background: rgba(44, 48, 60, 0.98);
    border-radius: 12px;
    overflow: scroll;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.calendar-container table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-container td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: top;
    border: 1px solid #333;
    height: 100px;
    width: 14.28%;
}
.calendar-container th {
    background: linear-gradient(90deg, #2d3340 0%, #3a4052 100%);
    color: #ffd700;
    font-weight: 500;
}
.calendar-container td {
    background: rgba(36, 40, 50, 0.93);
    color: #e0e0e0;
    font-size: 0.9em;
}
.calendar-container td:hover {
    background: #2a2e38;
}
.month-container {
    margin-bottom: 40px;
}
.month-container h2 {
    text-align: center;
    margin-bottom: 16px;
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 2px 8px #222;
    line-height: 1;
    padding-top: 4px;
    padding-bottom: 4px;
    color: #ffd700;
    text-shadow: 0 2px 8px #222;
}   
.calendar-container .course-list {
    margin-top: 8px;
    font-size: 0.9em;
}
.calendar-container .course-item {
    margin-bottom: 4px;
    padding: 4px;
    background: rgba(50, 50, 60, 0.8);
    border-radius: 4px;
    color: #e0e0e0;
}
.calendar-container .course-item:hover {
    background: rgba(50, 50, 60, 0.9);
}
.calendar-container .day-no {
    text-align: right;
    font-weight: bold;
    color: #ffd700;
    font-size: 1.2em;
    margin-bottom: 4px;
}
.calendar-container .empty-day {
    color: #888;
    font-style: italic;
}
.calendar-container .day-no:hover {
    color: #ffcc00;
    text-decoration: underline;
}
.calendar-container .course-item:hover .day-no {
    color: #ffcc00;
    text-decoration: underline;
}
.calendar-container .course-item .day-no {
    display: block;
    margin-bottom: 4px;
    font-size: 1.2em;
    color: #ffd700;
    font-weight: bold;
    text-align: center;
}
.calendar-container .course-item .day-no:hover {
    color: #ffcc00;
    text-decoration: underline;     
}
.calendar-container .course-item .day-no {
    display: block;
    margin-bottom: 4px;
    font-size: 1.2em;
    color: #ffd700;
    font-weight: bold;
    text-align: center;
}
.calendar-container .course-item .day-no:hover {
    color: #ffcc00;
    text-decoration: underline;     
}
.calendar-container .course-item .day-no {
    margin-bottom: 4px;
}
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    background: rgba(44, 48, 60, 0.98);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.responsive-table table {
    width: 100%;
    border-collapse: collapse;
}
.responsive-table th, .responsive-table td {
    padding: 12px 16px;
    text-align: left;
}
.responsive-table th {
    background: linear-gradient(90deg, #2d3340 0%, #3a4052 100%);
    color: #ffd700;
    font-weight: 500;
    border-bottom: 2px solid #444;
}
.responsive-table td {
    border-bottom: 1px solid #333;
}

/* End of responsive calendar styles */
/* responsive-div-table */


.responsive-div-table {
  width: 100%;
  margin-bottom: 32px;
  background: rgba(44, 48, 60, 0.98);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.div-table-header {
  display: grid;
  grid-template-columns: repeat(var(--div-table-cols, 5), 1fr);
  background: linear-gradient(90deg, #2d3340 0%, #3a4052 100%);
  color: #ffd700;
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid #444;
  text-align: center;
  padding: 12px 0;
}
.div-table-row {
  display: grid;
  grid-template-columns: repeat(var(--div-table-cols, 5), 1fr);
  border-bottom: 1px solid #333;
  padding: 8px 0;
}
.div-table-row:nth-child(even) {
  background: rgba(36, 40, 50, 0.93);
}
.div-table-row:hover {
  background: #2a2e38;
}
.div-table-cell {
  padding: 8px 12px;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  font-size: 0.95em;
  box-sizing: border-box;
  cursor: pointer;
}

.div-table-cell-group {
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95em;
    box-sizing: border-box;
    cursor: pointer;
}

/* Ajout pour course-item full-day */
.course-item.full-day {
    background: #ffd700;
    color: #23272f;
    font-weight: bold;
    border-radius: 4px;
    padding: 2px 4px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.12);
}

.course-item.full-day:hover {
    background: #ffcc00;
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.18);
}

/* End of responsive-div-table */