/**
 * ========================================
 * TICKETMASTER - STYLES POUR LA PAGE REQUEST
 * ========================================
 * 
 * Ce fichier contient tous les styles spécifiques à la page
 * de demande de service (request.html), incluant :
 * - Styles du formulaire multi-étapes
 * - Barre de progression
 * - Cartes de services
 * - Recherche de clients
 * - Tableau des résultats
 * - Pagination
 * - Responsive design
 * 
 * ========================================
 */

/* ========================================
   VARIABLES CSS
   ======================================== */

:root {
  --primary-color: #024DDF;
  --primary-gradient: linear-gradient(90deg, #3b5bfe 0%, #024DDF 100%);
  --text-color: #646464;
  --border-color: #e9eaf7;
  --white: #fff;
  --shadow-light: 0 4px 32px rgba(2,77,223,0.07);
  --shadow-medium: 0 8px 32px rgba(44, 62, 80, 0.12);
  --border-radius: 24px;
  --border-radius-small: 4px;
  --transition: all 0.3s ease;
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */

/**
 * Container principal du formulaire
 * Centre le contenu et applique le style de base
 */
.main-form-container {
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 4px 32px rgba(2,77,223,0.07);
  padding: 2rem 1rem;
  margin-top: 2rem;
  width: 95vw;
  max-width: 1800px;
  min-width: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/**
 * Wrapper du formulaire pour le centrage
 */
.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 5;
    box-sizing: border-box;
    overflow: visible;
    background: none;
    justify-content: center;
}

/**
 * Container du formulaire
 */
.form-container {
    background: var(--white);
    color: var(--text-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    padding: 40px 32px 32px 32px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

/* Ajoute l'espacement entre la navbar et le formulaire principal */
.request-form-center {
  margin-top: 150px;
  margin-bottom: 50px;
}

/* ========================================
   TITRES ET TEXTE
   ======================================== */

/**
 * Titre principal de la page
 */
.quote-title {
  text-align: center;
  color: var(--primary-color);
  font-family: 'Averta', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 0.5em;
}

/**
 * Sous-titre de la page
 */
.quote-subtitle {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 2em;
  font-size: 1.1em;
}

/**
 * Titres des étapes
 */
.step h2 {
  text-align: center;
  margin-bottom: 0.5em;
  font-size: 2rem;
  color: var(--primary-color);
  font-family: 'Averta', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
}

/**
 * Paragraphes des étapes
 */
.step p {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 2em;
  font-size: 1.1em;
}

/* ========================================
   GESTION DES ÉTAPES
   ======================================== */

/**
 * Conteneur des étapes
 */
.step {
    display: none;
    padding: 0 0 24px 0;
    min-width: 100%;
    box-sizing: border-box;
}

/**
 * Étape active
 */
.step.active {
    display: block;
}

/* ========================================
   BARRE DE PROGRESSION
   ======================================== */

/**
 * Container de la barre de progression
 */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

/**
 * Barre de progression principale
 */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 320px;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--border-radius-small);
    margin-bottom: 16px;
    position: relative;
}

/**
 * Remplissage de la barre de progression
 */
.progress-bar::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-small);
    z-index: 1;
    transition: width 0.4s;
}

/**
 * États de progression pour chaque étape
 */
.progress-bar.step-1::after { width: 25%; }
.progress-bar.step-2::after { width: 50%; }
.progress-bar.step-3::after { width: 75%; }
.progress-bar.step-4::after { width: 100%; }

/**
 * Labels de progression
 */
.progress-labels {
    display: flex;
    justify-content: space-between;
    width: 320px;
    margin-bottom: 24px;
}

/**
 * Label individuel de progression
 */
.progress-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1em;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

/**
 * Label de progression actif
 */
.progress-label.active {
    color: var(--primary-color);
}

/**
 * Cercle de l'étape
 */
.progress-label .step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 6px;
    transition: var(--transition);
}

/**
 * Cercle de l'étape active
 */
.progress-label.active .step-circle {
    border: 2px solid var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

/* ========================================
   BOUTONS DE NAVIGATION
   ======================================== */

/**
 * Container des boutons d'étape
 */
.step-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

/**
 * Boutons précédent/suivant
 */
.prev-step-btn, .next-step-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 32px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
}

/**
 * Effet hover sur les boutons
 */
.prev-step-btn:hover, .next-step-btn:hover {
    background: #1a5fe8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 77, 223, 0.3);
}

/* ========================================
   CHAMPS DE SAISIE
   ======================================== */

/**
 * Style des champs de saisie
 */
.input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-color);
    box-sizing: border-box;
}

/**
 * Focus sur les champs de saisie
 */
.input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 77, 223, 0.1);
}

/**
 * Placeholder des champs de saisie
 */
.input::placeholder {
    color: #999;
    opacity: 1;
}

/* ========================================
   CARTES DE SERVICES (ÉTAPE 1)
   ======================================== */

/**
 * Grille des services
 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/**
 * Carte de service individuelle
 */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

/**
 * Effet hover sur les cartes de service
 */
.service-card:hover,
.service-card:focus {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-light);
}

/**
 * État sélectionné des cartes de service
 */
.service-card input:checked ~ .service-label {
    color: var(--primary-color);
    font-weight: 700;
}

/**
 * État sélectionné de la carte entière
 */
.service-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(2, 77, 223, 0.05) 0%, rgba(2, 77, 223, 0.02) 100%);
    box-shadow: 0 4px 16px rgba(2, 77, 223, 0.15);
    transform: translateY(-2px);
}

/**
 * Icône sélectionnée
 */
.service-card.selected .service-icon svg {
    filter: drop-shadow(0 2px 4px rgba(2, 77, 223, 0.2));
}

/**
 * Label de la carte de service
 */
.service-label {
    margin-top: 12px;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

/**
 * Icône de la carte de service
 */
.service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* ========================================
   RECHERCHE DE CLIENTS (ÉTAPE 2)
   ======================================== */

/**
 * Carte de recherche de clients
 */
.client-search-card {
    border-radius: 12px;
    box-shadow: 0 0 8px 0 #e9eaf7;
    border: 1.5px solid #e9eaf7;
    background: #fff;
}

/**
 * Champ de recherche dans la carte
 */
.client-search-card .input {
    background: #f7f8fa;
    color: #888;
    border: none;
    box-shadow: none;
    text-align: center;
}

/**
 * Focus sur la carte de recherche
 */
.client-search-card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 77, 223, 0.1);
}

/**
 * Placeholder des champs de saisie
 */
.client-search-card .input::placeholder {
    color: #b0b0c3;
    opacity: 1;
}

/* ========================================
   TABLEAU DES RÉSULTATS (ÉTAPE 3)
   ======================================== */

/**
 * Container responsive du tableau
 */
.table-responsive {
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

/**
 * Tableau des résultats
 */
#resultsTable {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/**
 * En-têtes du tableau
 */
#resultsTable th {
    background: #f8f9fa;
    border: none;
    padding: 16px 12px;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    vertical-align: middle;
}

/**
 * Cellules du tableau
 */
#resultsTable td {
    padding: 12px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/**
 * Lignes du tableau
 */
#resultsTable tbody tr {
    transition: var(--transition);
}

/**
 * Effet hover sur les lignes
 */
#resultsTable tbody tr:hover {
    background-color: #f8f9fa;
}

/**
 * Cellule du nom de compte avec tooltip
 */
.account-name-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.email-cell {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.account-name-cell:hover,
.email-cell:hover {
    text-decoration: none;
    color: #024DDF;
}

/* ========================================
   PAGINATION
   ======================================== */

/**
 * Boutons de pagination
 */
#pagination .pagination.btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/**
 * Effet hover sur les boutons de pagination
 */
#pagination .pagination.btn:hover,
#pagination .pagination.btn:focus {
    background: #1a5fe8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(2, 77, 223, 0.3);
}

/**
 * Boutons de pagination désactivés
 */
#pagination .pagination.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/**
 * Container de pagination
 */
#pagination {
    margin: 24px 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/**
 * Tablettes et petits écrans
 */
@media (max-width: 800px) {
    .form-container {
        padding: 24px 20px 20px 20px;
        margin: 0 16px;
    }
}

/**
 * Mobiles
 */
@media (max-width: 600px) {
    .form-container {
        padding: 20px 16px 16px 16px;
        margin: 0 8px;
    }

    .quote-title,
    .step h2 {
        font-size: 1.5rem;
    }

    .step-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .prev-step-btn,
    .next-step-btn {
        width: 100%;
        text-align: center;
    }
}

/**
 * Grille des services responsive
 */
@media (max-width: 700px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/**
 * Tableau responsive
 */
@media (max-width: 1200px) {
    .table-responsive {
        overflow-x: auto;
    }

    #resultsTable th,
    #resultsTable td {
        min-width: 120px;
        white-space: nowrap;
    }

    #resultsTable th:first-child,
    #resultsTable td:first-child {
        min-width: 60px;
    }
}

/**
 * Très petits écrans
 */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .progress-labels {
        width: 280px;
    }

    .progress-bar {
        width: 280px;
    }
}

#resultsTable th,
#resultsTable td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#resultsTable td:last-child,
#resultsTable th:last-child {
  max-width: 180px;
}
