/**
 * Calendrier de Grossesse - Styles V2
 * @version 2.0.0
 */

/* ═══════════════════════════════════════════════════════════════════
   NOTE: Les variables --cal-* sont définies dans design-tokens.css
   Elles héritent automatiquement des tokens globaux --pfm-*
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   VUE AUJOURD'HUI (HERO)
   ═══════════════════════════════════════════════════════════════════ */

.cal-today {
  background: linear-gradient(135deg, var(--cal-primary), var(--cal-primary-dark));
  color: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.cal-today::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.cal-today__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.cal-today__week {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.cal-today__week small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.cal-today__countdown {
  text-align: right;
}

.cal-today__countdown-number {
  font-size: 2.5rem;
  font-weight: 700;
}

.cal-today__countdown-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

.cal-today__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.cal-today__baby,
.cal-today__mom {
  background: rgba(255,255,255,0.15);
  border-radius: 0.75rem;
  padding: 1.25rem;
  backdrop-filter: blur(10px);
}

.cal-today__section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cal-today__section-icon {
  font-size: 2rem;
}

.cal-today__section-title {
  font-weight: 600;
  font-size: 1rem;
}

.cal-today__baby-size {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cal-today__fruit-icon {
  font-size: 3rem;
}

.cal-today__measurements {
  font-size: 0.875rem;
  opacity: 0.9;
}

.cal-today__measurements strong {
  display: block;
  font-size: 1.125rem;
}

.cal-today__description {
  font-size: 0.875rem;
  line-height: 1.5;
  opacity: 0.95;
}

.cal-today__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.cal-today__action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.cal-today__action:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════
   BARRE DE PROGRESSION PRINCIPALE
   ═══════════════════════════════════════════════════════════════════ */

.cal-progress {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cal-progress__bar-container {
  position: relative;
  height: 24px;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 1rem;
}

.cal-progress__bar-fill {
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--cal-t1) 0%, var(--cal-t1) 35%, var(--cal-t2) 35%, var(--cal-t2) 70%, var(--cal-t3) 70%);
  transition: width 0.5s ease;
  position: relative;
}

.cal-progress__bar-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: var(--cal-primary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

.cal-progress__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
}

.cal-progress__trimester-labels {
  display: flex;
  justify-content: space-around;
  margin-top: 0.5rem;
}

.cal-progress__trimester {
  font-size: 0.6875rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════
   TIMELINE HORIZONTALE
   ═══════════════════════════════════════════════════════════════════ */

.cal-timeline {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow-x: auto;
}

.cal-timeline__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.cal-timeline__track {
  display: flex;
  gap: 0;
  min-width: max-content;
  padding: 1rem 0;
}

.cal-timeline__event {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  position: relative;
}

.cal-timeline__event::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 3px;
  background: #e0e0e0;
}

.cal-timeline__event:first-child::before {
  left: 50%;
}

.cal-timeline__event:last-child::before {
  right: 50%;
}

.cal-timeline__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  z-index: 1;
  transition: all 0.2s;
}

.cal-timeline__event--past .cal-timeline__dot {
  background: var(--cal-milestone);
  border-color: var(--cal-milestone);
  color: white;
}

.cal-timeline__event--current .cal-timeline__dot {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--cal-primary-light);
}

.cal-timeline__event--future .cal-timeline__dot {
  background: white;
  border-color: #ccc;
  color: #999;
}

.cal-timeline__label {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  color: #666;
  text-align: center;
  max-width: 70px;
}

.cal-timeline__date {
  font-size: 0.625rem;
  color: #999;
}

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION TRIMESTRES
   ═══════════════════════════════════════════════════════════════════ */

.cal-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cal-nav__btn {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  font-size: 0.9375rem;
}

.cal-nav__btn small {
  display: block;
  font-size: 0.75rem;
  color: #999;
  font-weight: 400;
  margin-top: 0.25rem;
}

.cal-nav__btn:hover {
  border-color: var(--cal-primary);
}

.cal-nav__btn--active {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: white;
}

.cal-nav__btn--active small {
  color: rgba(255,255,255,0.8);
}

.cal-nav__btn--t1 { border-left: 4px solid var(--cal-t1); }
.cal-nav__btn--t2 { border-left: 4px solid var(--cal-t2); }
.cal-nav__btn--t3 { border-left: 4px solid var(--cal-t3); }

.cal-nav__btn--t1.cal-nav__btn--active { background: linear-gradient(135deg, #E57373, #EF5350); }
.cal-nav__btn--t2.cal-nav__btn--active { background: linear-gradient(135deg, #81C784, #66BB6A); }
.cal-nav__btn--t3.cal-nav__btn--active { background: linear-gradient(135deg, #64B5F6, #42A5F5); }

/* ═══════════════════════════════════════════════════════════════════
   CARTES SEMAINES
   ═══════════════════════════════════════════════════════════════════ */

.cal-weeks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cal-week {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #e0e0e0;
  transition: all 0.2s;
}

.cal-week:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.cal-week--current {
  border-left-color: var(--cal-primary);
  box-shadow: 0 4px 20px rgba(147,96,247,0.15);
}

.cal-week--past {
  opacity: 0.7;
  border-left-color: var(--cal-milestone);
}

.cal-week--future {
  border-left-color: #e0e0e0;
}

.cal-week__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #fafafa, white);
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.cal-week__number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cal-week__sa {
  font-weight: 700;
  font-size: 1.25rem;
  color: #333;
}

.cal-week__badge {
  background: var(--cal-primary);
  color: white;
  font-size: 0.6875rem;
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.cal-week__dates {
  font-size: 0.875rem;
  color: #666;
}

.cal-week__fruit {
  font-size: 2rem;
}

.cal-week__content {
  padding: 1.5rem;
  display: none;
}

.cal-week.expanded .cal-week__content {
  display: block;
}

.cal-week--current .cal-week__content {
  display: block;
}

/* Grille bébé/maman */
.cal-week__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.cal-week__section {
  padding: 1rem;
  border-radius: 0.75rem;
  background: #fafafa;
}

.cal-week__section--baby {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.cal-week__section--mom {
  background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
}

.cal-week__section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cal-week__section-icon {
  font-size: 1.5rem;
}

.cal-week__section-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #333;
}

.cal-week__baby-size {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(255,255,255,0.7);
  border-radius: 0.5rem;
}

.cal-week__fruit-big {
  font-size: 2.5rem;
}

.cal-week__measurements {
  font-size: 0.8125rem;
  color: #666;
}

.cal-week__measurements strong {
  display: block;
  font-size: 1rem;
  color: #333;
}

.cal-week__description {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
}

.cal-week__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cal-week__list li {
  font-size: 0.8125rem;
  color: #555;
  padding: 0.375rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.cal-week__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--cal-primary);
  font-weight: bold;
}

/* Événements */
.cal-week__events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.cal-week__event {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

.cal-week__event--medical {
  background: #E3F2FD;
  color: var(--cal-medical);
}

.cal-week__event--admin {
  background: #FFF3E0;
  color: var(--cal-admin);
}

.cal-week__event--milestone {
  background: #E8F5E9;
  color: var(--cal-milestone);
}

.cal-week__event--warning {
  background: #FFF8E1;
  color: var(--cal-warning);
}

/* Tips */
.cal-week__tips {
  margin-top: 1rem;
  padding: 1rem;
  background: #FFFDE7;
  border-radius: 0.75rem;
  border-left: 3px solid #FFC107;
}

.cal-week__tips-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #F57C00;
}

.cal-week__tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cal-week__tips-list li {
  font-size: 0.8125rem;
  color: #666;
  padding: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.cal-week__tips-list li::before {
  content: '💡';
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* Lien article */
.cal-week__article {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--cal-primary-light);
  color: var(--cal-primary-dark);
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cal-week__article:hover {
  background: var(--cal-primary);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════
   MODULES - BASE
   ═══════════════════════════════════════════════════════════════════ */

.cal-modules {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.cal-module {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cal-module__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cal-module__title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.cal-module__subtitle {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
}

.cal-module__action {
  padding: 0.5rem 1rem;
  background: var(--cal-primary-light);
  color: var(--cal-primary);
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cal-module__action:hover {
  background: var(--cal-primary);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════
   KICK COUNTER PRO
   ═══════════════════════════════════════════════════════════════════ */

.cal-kicks__main {
  margin-bottom: 1rem;
}

.cal-kicks__session {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #F3E8FF, #E9D5FF);
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.cal-kicks__session--active {
  animation: kickPulse 2s infinite;
}

@keyframes kickPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(147, 96, 247, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(147, 96, 247, 0); }
}

.cal-kicks__counter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-kicks__count {
  font-size: 4rem;
  font-weight: 700;
  color: var(--cal-primary);
  line-height: 1;
  transition: transform 0.2s;
}

.cal-kicks__label {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}

.cal-kicks__button {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e0e0e0;
  color: white;
  border: none;
  font-size: 2.5rem;
  cursor: not-allowed;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cal-kicks__button:not(:disabled) {
  background: var(--cal-primary);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(147,96,247,0.3);
}

.cal-kicks__button--active {
  background: var(--cal-primary) !important;
  cursor: pointer !important;
}

.cal-kicks__button:not(:disabled):hover {
  transform: scale(1.05);
}

.cal-kicks__button:not(:disabled):active {
  transform: scale(0.95);
}

.cal-kicks__timer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-kicks__timer-value {
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  font-variant-numeric: tabular-nums;
}

.cal-kicks__timer-label {
  font-size: 0.75rem;
  color: #666;
}

.cal-kicks__success {
  text-align: center;
  padding: 1rem;
  background: #E8F5E9;
  border-radius: 0.75rem;
  color: var(--cal-milestone);
  font-weight: 500;
  margin-bottom: 1rem;
}

.cal-kicks__actions {
  margin-bottom: 1rem;
}

.cal-kicks__action {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cal-kicks__action--primary {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: white;
}

.cal-kicks__action:hover {
  border-color: var(--cal-primary);
}

.cal-kicks__action--primary:hover {
  background: var(--cal-primary-dark);
}

/* Historique Kicks */
.cal-kicks__history {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.cal-kicks__history-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

.cal-kicks__history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cal-kicks__history-session {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.cal-kicks__history-session--success {
  background: #E8F5E9;
}

.cal-kicks__history-time {
  font-weight: 600;
  color: #333;
}

.cal-kicks__history-count {
  color: var(--cal-primary);
  font-weight: 500;
}

.cal-kicks__history-duration {
  color: #666;
}

.cal-kicks__history-badge {
  margin-left: auto;
  color: var(--cal-milestone);
  font-weight: bold;
}

/* Stats 7 jours Kicks */
.cal-kicks__stats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.cal-kicks__stats-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

.cal-kicks__stats-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

.cal-kicks__stats-day {
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: #f5f5f5;
  border-radius: 0.5rem;
}

.cal-kicks__stats-day--ok {
  background: #E8F5E9;
}

.cal-kicks__stats-day--partial {
  background: #FFF3E0;
}

.cal-kicks__stats-dayname {
  font-size: 0.6875rem;
  color: #666;
  text-transform: uppercase;
}

.cal-kicks__stats-daycount {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-top: 0.25rem;
}

.cal-kicks__stats-day--ok .cal-kicks__stats-daycount {
  color: var(--cal-milestone);
}

/* Warning Kicks */
.cal-kicks__warning {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #FFF8E1;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #F57C00;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   CONTRACTION TIMER
   ═══════════════════════════════════════════════════════════════════ */

.cal-contractions__main {
  margin-bottom: 1rem;
}

.cal-contractions__display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.cal-contractions__timer-box {
  text-align: center;
}

.cal-contractions__timer-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--cal-medical);
  font-variant-numeric: tabular-nums;
}

.cal-contractions__timer-label {
  font-size: 0.75rem;
  color: #666;
}

.cal-contractions__button {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--cal-medical);
  color: white;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(21, 101, 192, 0.3);
}

.cal-contractions__button:hover {
  transform: scale(1.05);
}

.cal-contractions__button--active {
  background: #D32F2F;
  animation: contractionPulse 1s infinite;
  box-shadow: 0 4px 20px rgba(211, 47, 47, 0.4);
}

@keyframes contractionPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.cal-contractions__stats-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cal-contractions__stat {
  text-align: center;
}

.cal-contractions__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cal-medical);
}

.cal-contractions__stat-label {
  font-size: 0.6875rem;
  color: #666;
  text-transform: uppercase;
}

/* Recommendations contractions */
.cal-contractions__recommendation {
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
}

.cal-contractions__recommendation--info {
  background: #E3F2FD;
  color: var(--cal-medical);
}

.cal-contractions__recommendation--warning {
  background: #FFF3E0;
  color: var(--cal-warning);
}

.cal-contractions__recommendation--urgent {
  background: #FFEBEE;
  color: #D32F2F;
  font-weight: 600;
  animation: urgentFlash 1s infinite;
}

@keyframes urgentFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Historique contractions */
.cal-contractions__history {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

.cal-contractions__history-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
}

.cal-contractions__clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.cal-contractions__clear:hover {
  opacity: 1;
}

.cal-contractions__history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.cal-contractions__history-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

.cal-contractions__history-time {
  font-weight: 600;
  color: #333;
}

.cal-contractions__history-duration {
  color: var(--cal-medical);
  font-weight: 500;
}

.cal-contractions__history-interval {
  color: #666;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════
   SYMPTOM TRACKER
   ═══════════════════════════════════════════════════════════════════ */

.cal-symptoms__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cal-symptoms__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 0.75rem;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.cal-symptoms__item--active {
  background: var(--cal-primary-light);
  border-color: var(--cal-primary);
}

.cal-symptoms__icon {
  font-size: 1.5rem;
}

.cal-symptoms__label {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #333;
}

.cal-symptoms__intensity {
  display: flex;
  gap: 0.25rem;
}

.cal-symptoms__level {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  background: white;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  transition: all 0.2s;
}

.cal-symptoms__level:hover {
  border-color: var(--cal-primary);
}

.cal-symptoms__level--active {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: white;
}

.cal-symptoms__level[data-level="1"].cal-symptoms__level--active {
  background: #81C784;
  border-color: #81C784;
}

.cal-symptoms__level[data-level="2"].cal-symptoms__level--active {
  background: #FFB74D;
  border-color: #FFB74D;
}

.cal-symptoms__level[data-level="3"].cal-symptoms__level--active {
  background: #E57373;
  border-color: #E57373;
}

.cal-symptoms__save {
  width: 100%;
  padding: 0.875rem;
  background: var(--cal-primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.2s;
}

.cal-symptoms__save:hover {
  background: var(--cal-primary-dark);
}

/* Historique symptômes */
.cal-symptoms__history {
  margin-top: 1rem;
}

.cal-symptoms__history summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: #666;
  padding: 0.5rem 0;
}

.cal-symptoms__history-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cal-symptoms__history-day {
  text-align: center;
  padding: 0.5rem 0.25rem;
  background: #fafafa;
  border-radius: 0.5rem;
}

.cal-symptoms__history-date {
  font-size: 0.6875rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.cal-symptoms__history-icons {
  font-size: 0.875rem;
  min-height: 1.5em;
}

/* ═══════════════════════════════════════════════════════════════════
   WEIGHT TRACKER PRO
   ═══════════════════════════════════════════════════════════════════ */

/* Setup initial */
.cal-weight__setup {
  text-align: center;
  padding: 1rem;
}

.cal-weight__setup p {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 1rem;
}

.cal-weight__setup-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cal-weight__setup-form input {
  width: 120px;
  padding: 0.75rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  text-align: center;
}

.cal-weight__setup-form input:focus {
  outline: none;
  border-color: var(--cal-primary);
}

.cal-weight__setup-btn {
  padding: 0.75rem 1.5rem;
  background: var(--cal-primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Chart container */
.cal-weight__chart-container {
  height: 200px;
  margin-bottom: 1rem;
  position: relative;
}

.cal-weight__chart-container canvas {
  max-width: 100%;
}

/* Stats poids */
.cal-weight__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cal-weight__stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: #fafafa;
  border-radius: 0.5rem;
}

.cal-weight__stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cal-primary);
}

.cal-weight__stat-value--gain {
  color: var(--cal-warning);
}

.cal-weight__stat-label {
  font-size: 0.6875rem;
  color: #666;
  margin-top: 0.25rem;
}

/* Recommendations poids */
.cal-weight__recommendation {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  text-align: center;
}

.cal-weight__recommendation--success {
  background: #E8F5E9;
  color: var(--cal-milestone);
}

.cal-weight__recommendation--warning {
  background: #FFF3E0;
  color: var(--cal-warning);
}

/* Historique poids */
.cal-weight__history {
  margin-top: 1rem;
}

.cal-weight__history summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: #666;
  padding: 0.5rem 0;
}

.cal-weight__history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
  max-height: 150px;
  overflow-y: auto;
}

.cal-weight__history-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
}

/* ═══════════════════════════════════════════════════════════════════
   JOURNAL ENRICHI
   ═══════════════════════════════════════════════════════════════════ */

/* Mood selector */
.cal-journal__mood {
  margin-bottom: 1rem;
}

.cal-journal__mood-label {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.cal-journal__mood-grid {
  display: flex;
  gap: 0.5rem;
}

.cal-journal__mood-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s;
}

.cal-journal__mood-btn:hover {
  border-color: var(--cal-primary);
  transform: scale(1.1);
}

.cal-journal__mood-btn--active {
  border-color: var(--cal-primary);
  background: var(--cal-primary-light);
  transform: scale(1.1);
}

/* Textarea */
.cal-journal__textarea {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  resize: vertical;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cal-journal__textarea:focus {
  outline: none;
  border-color: var(--cal-primary);
}

.cal-journal__textarea::placeholder {
  color: #999;
}

/* Actions */
.cal-journal__actions {
  margin-top: 1rem;
}

.cal-journal__save {
  width: 100%;
  padding: 0.875rem;
  background: var(--cal-primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.2s;
}

.cal-journal__save:hover {
  background: var(--cal-primary-dark);
}

/* Historique journal */
.cal-journal__history {
  margin-top: 1rem;
}

.cal-journal__history summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: #666;
  padding: 0.5rem 0;
}

.cal-journal__history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-height: 300px;
  overflow-y: auto;
}

.cal-journal__history-item {
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 0.5rem;
  border-left: 3px solid var(--cal-primary-light);
}

.cal-journal__history-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cal-journal__history-date {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #333;
}

.cal-journal__history-week {
  font-size: 0.75rem;
  color: #999;
}

.cal-journal__history-mood {
  margin-left: auto;
  font-size: 1.25rem;
}

.cal-journal__history-text {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   PROCHAINS RDV
   ═══════════════════════════════════════════════════════════════════ */

.cal-upcoming {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cal-upcoming__title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1rem;
}

.cal-upcoming__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cal-upcoming__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fafafa;
  border-radius: 0.75rem;
  border-left: 3px solid var(--cal-medical);
}

.cal-upcoming__item--admin {
  border-left-color: var(--cal-admin);
}

.cal-upcoming__icon {
  font-size: 1.5rem;
}

.cal-upcoming__info {
  flex: 1;
}

.cal-upcoming__name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #333;
}

.cal-upcoming__date {
  font-size: 0.8125rem;
  color: #666;
}

.cal-upcoming__countdown {
  padding: 0.375rem 0.75rem;
  background: var(--cal-primary-light);
  color: var(--cal-primary);
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   INTÉGRATIONS OUTILS PFM
   ═══════════════════════════════════════════════════════════════════ */

.cal-integrations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cal-integration {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s;
}

.cal-integration:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cal-integration__icon {
  font-size: 2rem;
}

.cal-integration__info {
  flex: 1;
}

.cal-integration__name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.cal-integration__desc {
  font-size: 0.75rem;
  color: #666;
}

/* ═══════════════════════════════════════════════════════════════════
   ACTIONS
   ═══════════════════════════════════════════════════════════════════ */

.cal-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cal-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: all 0.2s;
}

.cal-action:hover {
  border-color: var(--cal-primary);
  color: var(--cal-primary);
}

.cal-action--primary {
  background: var(--cal-primary);
  border-color: var(--cal-primary);
  color: white;
}

.cal-action--primary:hover {
  background: var(--cal-primary-dark);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════════ */

.cal-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  animation: fadeInUp 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   TIMELINE AMÉLIORÉE (avec version mobile verticale)
   ═══════════════════════════════════════════════════════════════════ */

/* Ajout du conteneur info pour la timeline */
.cal-timeline__info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cal-today__content {
    grid-template-columns: 1fr;
  }

  .cal-today__actions {
    flex-direction: column;
  }

  .cal-week__grid {
    grid-template-columns: 1fr;
  }

  .cal-nav {
    flex-direction: column;
  }

  .cal-weight__stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .cal-kicks__session {
    flex-direction: column;
    gap: 1.5rem;
  }

  .cal-contractions__display {
    flex-direction: column;
    gap: 1.5rem;
  }

  .cal-symptoms__grid {
    grid-template-columns: 1fr;
  }

  .cal-integrations {
    grid-template-columns: 1fr;
  }

  .cal-actions {
    flex-direction: column;
  }

  .cal-action {
    justify-content: center;
  }

  /* Timeline verticale sur mobile */
  .cal-timeline__track {
    flex-direction: column;
    align-items: stretch;
    min-width: auto;
    gap: 0;
  }

  .cal-timeline__event {
    flex-direction: row;
    min-width: auto;
    padding: 0.75rem 0;
    gap: 1rem;
  }

  .cal-timeline__event::before {
    display: none;
  }

  .cal-timeline__event::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 45px;
    bottom: -10px;
    width: 3px;
    background: #e0e0e0;
  }

  .cal-timeline__event:last-child::after {
    display: none;
  }

  .cal-timeline__event--past::after {
    background: var(--cal-milestone);
  }

  .cal-timeline__info {
    align-items: flex-start;
    flex: 1;
  }

  .cal-timeline__label {
    text-align: left;
    max-width: none;
  }

  .cal-journal__mood-grid {
    flex-wrap: wrap;
  }

  .cal-journal__mood-btn {
    flex: 0 0 calc(33.333% - 0.5rem);
  }
}

@media (max-width: 480px) {
  .cal-today {
    padding: 1.5rem;
  }

  .cal-today__header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .cal-today__countdown {
    text-align: center;
  }

  .cal-today__week {
    font-size: 2.5rem;
  }

  .cal-kicks__count {
    font-size: 3rem;
  }

  .cal-kicks__button {
    width: 90px;
    height: 90px;
    font-size: 2rem;
  }

  .cal-contractions__timer-value {
    font-size: 2.5rem;
  }

  .cal-contractions__button {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }

  .cal-weight__stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cal-symptoms__grid {
    gap: 0.5rem;
  }

  .cal-symptoms__item {
    padding: 0.5rem 0.75rem;
  }

  .cal-symptoms__icon {
    font-size: 1.25rem;
  }

  .cal-symptoms__level {
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
  }

  .cal-kicks__stats-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
  }

  .cal-kicks__stats-dayname {
    font-size: 0.5625rem;
  }

  .cal-kicks__stats-daycount {
    font-size: 0.875rem;
  }

  .cal-symptoms__history-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
  }

  .cal-symptoms__history-date {
    font-size: 0.5625rem;
  }

  .cal-journal__mood-btn {
    flex: 0 0 calc(33.333% - 0.35rem);
    padding: 0.5rem;
    font-size: 1.25rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   UPCOMING EVENTS - Badge now
   ═══════════════════════════════════════════════════════════════════ */

.cal-upcoming__countdown--now {
  background: var(--cal-primary);
  color: white;
}
