/**
 * PAGES - STYLES CSS
 * Fichier de styles pour les pages spécifiques de l'application
 *
 * Organisation:
 * 0. Common elements (buttons, etc.)
 * 1. Homepage (index.html)
 * 2. Instructions pages (check-in, check-out)
 * 3. Appareils pages
 * 4. Recommendations page
 * 5. Reservation detail page
 * 6. Media queries
 */

/* ========================================
   0. COMMON ELEMENTS
   ======================================== */

/**
 * Bouton retour (utilisé sur toutes les pages de détail)
 */
.btn-back {
    display: inline-block;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--text-secondary, #7f8c8d);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-small, 8px);
    font-weight: 600;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ========================================
   1. HOMEPAGE (INDEX.HTML)
   ======================================== */

/**
 * Header avec logo et fond coloré
 */
.home-logo-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: var(--secondary-color);
    margin: 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.home-logo-header img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/**
 * Slogan sous le logo
 */
.home-slogan {
    color: white;
    font-size: 1.1rem;
    font-weight: 400;
    font-style: italic;
    margin-top: 1.5rem;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

/**
 * Carte de bienvenue
 */
.home-welcome {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.home-welcome h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

/**
 * Message d'accueil
 */
.home-message {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/**
 * Icônes SVG sur la homepage (Facebook, Instagram)
 * Utilise la couleur primaire du branding
 */
.home-welcome .social-links svg,
.action-blocks .social-links svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-color);
}

/* ========================================
   2. INSTRUCTIONS PAGES (CHECK-IN/CHECK-OUT)
   ======================================== */

/**
 * Container principal pour les pages de détail d'instructions
 */
.checkin-detail-page,
.checkout-detail-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/**
 * Header de la page de détail
 */
.detail-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.detail-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.detail-header-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.detail-header h1 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.detail-subtitle {
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

/**
 * Contenu principal de la page de détail
 */
.detail-content {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-medium);
    margin-bottom: var(--spacing-lg);
}

/**
 * Section d'instructions
 */
.instructions-section {
    margin-bottom: var(--spacing-xl);
}

.instructions-section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.instructions-text {
    line-height: 1.8;
    color: var(--text-secondary);
}

/**
 * Section vidéo
 */
.video-section {
    margin-top: var(--spacing-xl);
}

.video-section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/**
 * Grille d'informations
 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.info-card {
    background: var(--light-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-small);
    border-left: 4px solid var(--primary-color);
}

.info-card-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.info-card-value {
    color: var(--text-secondary);
}

.info-card-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/**
 * Bouton checkout primaire avec gradient
 */
.btn-checkout-primary {
    background: linear-gradient(135deg, var(--button-primary-color) 0%, var(--button-primary-hover) 100%);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl, 3rem);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 400px;
}

.btn-checkout-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-checkout-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #95a5a6;
}

/**
 * Status de confirmation
 */
.status-confirmed {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #d4edda;
    color: var(--success-color);
    border-radius: var(--border-radius-small);
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

/**
 * Checklist pour la procédure de checkout
 */
.checklist {
    margin-top: var(--spacing-md);
}

.checklist-category {
    margin-bottom: var(--spacing-lg);
}

.checklist-category h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-small);
    transition: background 0.2s;
}

.checklist-item:hover {
    background: var(--light-bg);
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checklist-item input[type="checkbox"]:checked + .checklist-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.checklist-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/**
 * Info boxes pour les messages d'information
 */
.info-box {
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
    border-left: 4px solid;
}

.info-box.success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.info-box.info {
    background: #d1ecf1;
    border-color: #0c5460;
    color: #0c5460;
}

.info-box-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-xs);
}

.info-box-title {
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
}

.info-box-content {
    line-height: 1.6;
}

/* ========================================
   3. APPAREILS PAGES
   ======================================== */

/**
 * Page liste des appareils/tutoriels
 */
.appareils-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.page-header-branding {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo-small {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto 1rem;
    display: block;
}

.featured-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.page-subtitle {
    color: var(--text-secondary);
}

.btn-block {
    display: block;
    text-align: center;
    margin-top: 1rem;
}

.btn-back-spaced {
    margin-top: 1rem;
}

/**
 * Page détail d'un appareil
 */
.appareil-detail-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.detail-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--light-bg, var(--background-color));
    color: var(--text-secondary);
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.detail-content {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-small);
}

/**
 * Section vidéo dans appareil detail
 */
.video-section {
    margin: var(--spacing-lg) 0;
}

.video-section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.instructions-text {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
    margin-top: var(--spacing-md);
}

/**
 * Bouton pour ouvrir une vidéo externe
 */
.btn-open-video {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--button-primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-open-video:hover {
    background: var(--button-primary-hover);
    transform: translateY(-2px);
}

/* ========================================
   4. RECOMMENDATIONS PAGE
   ======================================== */

/**
 * Page des recommandations
 */
.recommendations-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/**
 * Barre de filtres de catégories
 */
.category-filters {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
}

/**
 * Bouton de filtre de catégorie
 */
.filter-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/**
 * Métadonnées des cartes de recommandation
 */
.card-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
}

.distance {
    color: var(--info-color);
    font-weight: 600;
}

.price {
    color: var(--warning-color);
    font-weight: 600;
}

/**
 * Petit bouton de carte pour Google Maps
 */
.btn-map-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--info-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-map-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* ========================================
   5. RESERVATION DETAIL PAGE
   ======================================== */

/**
 * Détails de la réservation
 */
.reservation-details {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-small);
    margin-bottom: var(--spacing-lg);
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.reservation-item:last-child {
    border-bottom: none;
}

.item-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.item-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.price-value {
    color: var(--success-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.item-time {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.item-status-available {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.item-status-locked {
    color: var(--text-light);
    font-size: 1rem;
    font-style: italic;
}

/* ========================================
   6. MEDIA QUERIES RESPONSIVE
   ======================================== */

/**
 * Tablettes et petits écrans
 */
@media (max-width: 768px) {
    .home-logo-header img {
        max-width: 220px;
    }

    .home-logo-header {
        padding: 2rem 1rem 1.5rem;
    }

    .home-slogan {
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    .home-welcome h1 {
        font-size: 1.5rem;
    }

    .home-message {
        font-size: 1rem;
    }

    .category-filters {
        justify-content: flex-start;
    }

    .reservation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/**
 * Très petits écrans
 */
@media (max-width: 480px) {
    .checkin-detail-page,
    .checkout-detail-page,
    .appareils-page,
    .appareil-detail-page,
    .recommendations-page {
        padding: var(--spacing-sm);
    }

    .detail-content {
        padding: var(--spacing-md);
    }
}
