/*****************************************************
 * PLAN DE ROUTE - STYLE MINIMALISTE & RAFFINÉ
 *****************************************************/

/* -------------------------------------
   1) BACKGROUND & BASE
-------------------------------------- */
body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    color: #333; /* Texte gris foncé pour bonne lisibilité */
    background-color: #fafafa;
  }
  
  .wpt-plan-de-route-wrapper {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 1rem;
    position: relative;
    background-color: transparent; /* Laisse le fond 'dashboard' apparent */
  }
  
  /* -------------------------------------
     2) DASHBOARD / HEADER
  -------------------------------------- */
  #wpt-plan-de-route-dashboard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 1rem;
  }
  .wpt-dashboard-left {
    flex: 1 1 250px;
  }
  .wpt-dashboard-left h2 {
    margin: 0 0 0.5rem;
    color: #333;
    font-size: 1.2rem;
  }
  #wptWeddingCountdown {
    font-size: 0.9rem;
    color: #666;
  }
  
  /* Barre de progression globale */
  .wpt-global-progress-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
  .wpt-global-progress-bar {
    flex: 1;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
  }
  .wpt-global-progress-fill {
    height: 6px;
    width: 0%;
    background: #007aff; /* Accent “iOS” */
    transition: width 0.4s ease;
  }
  .wpt-progress-text {
    font-size: 0.8rem;
    color: #777;
  }
  
  /* -------------------------------------
     3) URGENT TASKS BOX
  -------------------------------------- */
  .wpt-urgent-box {
    background: #fcfaff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    width: 100%;
    flex: 0 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .wpt-urgent-box-header h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    color: #d83b01; /* Légère touche colorée */
  }
  .wpt-urgent-box-content {
    margin-top: 0.5rem;
    color: #444;
    font-size: 0.9rem;
  }
  .wpt-urgent-box-content p {
    margin: 0.3rem 0;
  }
  
  /* -------------------------------------
     4) ACCORDÉON (PHASES)
  -------------------------------------- */
  .wpt-accordion-item {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    /* Surtout PAS overflow: hidden ici, pour permettre le scroll interne */
  }
  .wpt-accordion-header {
    background: #fafafa;
    padding: 0.75rem 1rem;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    border-radius: 6px 6px 0 0;
  }
  .wpt-accordion-header:hover {
    background: #f3f3f3;
  }
  .wpt-phase-stats {
    color: #999;
    font-size: 0.85rem;
    margin-left: auto;
  }
  .wpt-accordion-chevron {
    font-size: 0.9rem;
    color: #888;
  }
  
  /* Contenu accordéon “slide toggle” */
  .wpt-slide-toggle {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    /* On peut ajouter un léger padding quand c’est ouvert */
    padding: 0 1rem;
    box-sizing: border-box;
  }
  .wpt-slide-toggle.open {
    /* Limiter la hauteur pour forcer le scroll interne si trop de tâches */
    max-height: 400px;
    overflow-y: auto;  
    opacity: 1;
    padding: 0.75rem 1rem; /* un peu de padding lorsqu'ouvert */
  }
  
  /* -------------------------------------
     5) SECTION TÂCHES
  -------------------------------------- */
  #wpt-plan-de-route-tasks-section {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  #wptPhasesContainer {
    margin-top: 1rem;
  }
  .pdr-phase-task-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    
    /* Sur écrans plus larges, 2 colonnes */
    /* vous pouvez adapter si vous souhaitez plus de colonnes */
  }

  #wptAddTaskBtn {
    background: #34c759; /* vert iOS “Add” */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  #wptAddTaskBtn:hover {
    background: #2fab49;
  }
  #wptAddTaskBtn:active {
    transform: scale(0.96);
  }


  @media (min-width: 768px) {
    .pdr-phase-task-list {
      grid-template-columns: 1fr 1fr;
    }

  }
  
/* Container principal */
.bloc-mariage-date {
  background: #efeefc;
  border-radius: 12px;
  padding: 24px;
  margin: 1.5rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

/* Label */
.bloc-mariage-date label {
  display: block;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2d3748;
}

/* Input + bouton alignés via Grid */
.bloc-mariage-date .input-group {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: center;
}

/* Champ date */
.bloc-mariage-date .input-group input[type="date"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.bloc-mariage-date .input-group input[type="date"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

/* Bouton */
.bloc-mariage-date .input-group button {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(90deg, #667eea, #5a67d8);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.bloc-mariage-date .input-group button:hover {
  background: linear-gradient(90deg, #5a67d8, #4c51bf);
}

.bloc-mariage-date .input-group button:active {
  transform: scale(0.97);
}

/* Affichage de la date */
.bloc-mariage-date .wpt-date-display {
  margin-top: 12px;
  font-size: 0.95rem;
  color: #4a5568;
}

/* Séparateur */
.bloc-mariage-date + hr {
  margin: 2rem auto;
  border: none;
  border-top: 1px solid #e2e8f0;
  max-width: 600px;
}

/* === Responsive (mobile) === */
@media (max-width: 767px) {
  .bloc-mariage-date .input-group {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .bloc-mariage-date .input-group input[type="date"] {
    width: 100%;
  }
  .bloc-mariage-date .input-group button {
    width: 90%;
  }
}



  /* -------------------------------------
     6) MODALES (Tâche + Confirmation)
  -------------------------------------- */
  /* Modale d'édition de tâche */
  .wpt-modal {
    position: fixed;
    z-index: 9999;
    left: 0; 
    top: 0;
    width: 100%;
    height: 100%;
    display: none; /* visible via JS */
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.4);
  }
  .wpt-modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    animation: zoomIn 0.3s ease;
    box-sizing: border-box;
  }
  @keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
  }
  .wpt-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
  }
  .wpt-close-modal:hover {
    color: #333;
  }
  #wptTaskForm label {
    display: block;
    font-weight: 600;
    margin: 0.5rem 0 0.2rem;
    color: #444;
  }
  #wptTaskForm input[type="text"],
  #wptTaskForm input[type="date"],
  #wptTaskForm select,
  #wptTaskForm textarea {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.8rem;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
  }
  #wptTaskForm button[type="submit"] {
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
  }
  #wptTaskForm button[type="submit"]:hover {
    background: #005bbb;
  }
  
  /* Modale de confirmation */
  .wpt-confirm-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none; /* visible via JS */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
  }
  .wpt-confirm-modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    animation: zoomIn 0.3s ease;
    text-align: center;
    color: #333;
  }
  .wpt-confirm-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
  }
  .wpt-confirm-actions button {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  .wpt-confirm-actions button:hover {
    background: #ebebeb;
  }
  
  /* -------------------------------------
   8) TOASTS
-------------------------------------- */
.wpt-toast-container {
    position: fixed;
    z-index: 10001;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .wpt-toast {
    background: #333;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .wpt-toast.show {
    opacity: 1;
    transform: translateY(0);
  }
  .wpt-toast-info {
    background: #666;
  }
  .wpt-toast-success {
    background: #34c759; /* Vert iOS */
  }
  .wpt-toast-error {
    background: #ff3b30; /* Rouge iOS */
  }
  
  
  /* -------------------------------------
     8) CONFETTIS (animation de célébration)
  -------------------------------------- */
  .wpt-confetti {
    position: fixed;
    top: 0;
    width: 10px;
    height: 10px;
    background: #007aff; /* Couleur bleue “iOS” */
    animation: confetti-fall 2s linear;
    opacity: 0;
  }
  @keyframes confetti-fall {
    0%   { transform: translateY(-100px); opacity: 1; }
    100% { transform: translateY(600px) rotate(720deg); opacity: 0; }
  }
  
  /* -------------------------------------
     9) SIDEBAR (Récapitulatif)
  -------------------------------------- */
  .plan-de-route-sidebar {
    width: 100%;
    max-width: 250px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 20px;
    margin: 10px;
    color: #333;
  }
  .plan-de-route-sidebar h3 {
    margin: 0 0 15px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
  }
  .pdr-divider {
    border: none;
    border-bottom: 1px solid #eee;
    margin: 15px 0;
  }
  .pdr-date-row {
    display: block;
    margin-bottom: 15px;
  }
  @media (min-width: 480px) {
    .pdr-date-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: baseline;
    }
    .wpt-urgent-box  {
      width: 100% !important;
  }
  }
  .pdr-date-row p {
    margin: 0;
    line-height: 1.4;
    color: #555;
  }
  .pdr-date strong {
    color: #333;
  }
  .pdr-sidebar-countdown {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
  }
  .pdr-sidebar-progress-wrap {
    margin-bottom: 15px;
  }
  .pdr-label {
    margin: 0 0 5px;
    font-size: 0.9em;
    color: #666;
  }
  .pdr-progress-bar {
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
    margin-bottom: 5px;
  }
  .pdr-progress-bar-fill {
    background: #007aff; /* Accent bleu */
    height: 100%;
    transition: width 0.4s ease;
  }
  .pdr-progress-text {
    font-size: 0.85em;
    color: #444;
    text-align: right;
  }
  .pdr-urgent {
    font-size: 0.9em;
    margin: 0;
    padding: 0;
    color: #333;
  }
  .pdr-stats-lines p {
    margin: 0 0 10px;
    font-size: 0.9em;
    color: #444;
  }
  .pdr-stats-lines p:last-child {
    margin-bottom: 0;
  }
  .pdr-stats-lines strong {
    color: #333;
  }
  
  /* -------------------------------------
     10) NOUVEAU DESIGN DES TÂCHES (CARDS)
  -------------------------------------- */
  .pdr-task-card {
    background-color: #fff;
    border: 0.5px solid #eee;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    color: #333;
  }
  .pdr-task-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-color: #ddd;
  }
  /* État => bordure/ligne colorée à gauche (pastel) */
  .pdr-etat-en_attente {
    border-left: 4px solid #cccccc;
  }
  .pdr-etat-en_cours {
    border-left: 4px solid #ffdeab; /* orange pastel */
  }
  .pdr-etat-termine {
    border-left: 4px solid #b3e6b3; /* vert pastel */
    opacity: 0.95;
  }
  /* Animation quand l’état change */
  .pdr-transition-state {
    animation: pdrPulseChange 0.6s ease;
  }
  @keyframes pdrPulseChange {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.02); }
  }
  .pdr-task-completed {
    text-decoration: line-through;
    opacity: 0.7;
  }
  
  /* HEADER de la carte (emoji/icône + titre) */
  .pdr-task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .pdr-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .pdr-emoji-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    font-size: 16px;
    color: #666;
  }
  .pdr-task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin: 0;
  }
  
  /* META & Badges */
  .pdr-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .pdr-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    background-color: #eee;
    color: #555;
  }
  /* Priorités (pastel) */
  .pdr-badge-priority-basse {
    background: #e3fcef;
    color: #1a7d5a;
  }
  .pdr-badge-priority-moyenne {
    background: #fff9e5;
    color: #8a6d3b;
  }
  .pdr-badge-priority-haute {
    background: #ffeceb;
    color: #d83b01;
  }
  /* Importances (pastel) */
  .pdr-badge-importance-accessoire {
    background: #f8eaf7;
    color: #91558e;
  }
  .pdr-badge-importance-optionnelle {
    background: #edf9ed;
    color: #3a7d3a;
  }
  .pdr-badge-importance-essentielle {
    background: #e9f0ff;
    color: #005a9e;
  }
  
 /* Actions (boutons outline) */
.pdr-task-actions {
    display: flex;
    gap: 6px;
    margin-top: 5px;
  }
  .pdr-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }
  .pdr-icon-btn:hover {
    background: #f7f7f7;
    border-color: #bbb;
  }
  .pdr-icon-btn:active {
    transform: scale(0.95);
  }
  .pdr-icon-btn i {
    font-size: 1rem;
  }
  .pdr-btn-state {
    border-color: #007aff;
    color: #007aff;
  }
  .pdr-btn-state:hover {
    background: rgba(0,122,255,0.07);
  }
  .pdr-btn-edit {
    border-color: #34c759; 
    color: #34c759;
  }
  .pdr-btn-edit:hover {
    background: rgba(52,199,89,0.07);
  }
  .pdr-btn-delete {
    border-color: #ff3b30;
    color: #ff3b30;
  }
  .pdr-btn-delete:hover {
    background: rgba(255,59,48,0.07);
  }
  
  
  /* TOOLTIP */
  .pdr-tooltip {
    position: relative;
    display: inline-block;
  }
  .pdr-tooltip .pdr-tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    position: absolute;
    z-index: 9999;
    font-size: 0.75rem;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .pdr-tooltip:hover .pdr-tooltip-text {
    visibility: visible;
    opacity: 1;
  }
  
  /* -------------------------------------
     11) MASQUER TÂCHES TERMINÉES
  -------------------------------------- */
  .wpt-hide-completed .pdr-task-card.pdr-task-completed {
    display: none;
  }
  