/* ==============================
   DOCUMENTATION PAGE STYLES
   ============================== */

.doc-main {
    padding-top: 120px;
    min-height: 100vh;
    background-color: #f8f8f8;
}

.doc-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Onglets principaux */
.doc-tabs {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.doc-tab {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    padding: 10px 5px;
    position: relative;
    transition: color 0.3s ease;
}

.doc-tab:hover {
    color: #333;
}

.doc-tab.active {
    color: #333;
}

.doc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #333;
}

/* Barre de téléchargement */
.doc-download-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.doc-selected-count {
    font-size: 14px;
    color: #666;
}

.doc-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a6b5a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.doc-download-btn:hover:not(:disabled) {
    background: #1e5245;
}

.doc-download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Contenu des onglets */
.doc-content {
    display: none;
}

.doc-content.active {
    display: block;
}

/* Grille des produits principaux */
.doc-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Section produit */
.doc-product-section {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.doc-product-header {
    position: relative;
    width: 100%;
    height: 55px;
    overflow: hidden;
}

.doc-product-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-product-header h3 {
    position: absolute;
    bottom: 10px;
    left: 15px;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin: 0;
}

.doc-product-header h3 strong {
    font-weight: 700;
}

/* Liste des documents */
.doc-list {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.doc-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    gap: 10px;
}

.doc-item:last-child {
    border-bottom: none;
}

.doc-checkbox {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #2a6b5a;
}

.doc-icon {
    color: #666;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.doc-icon:hover {
    color: #2a6b5a;
}

.doc-item.featured .doc-icon {
    color: #2a6b5a;
}

.doc-name {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

/* Grille secondaire */
.doc-secondary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.doc-secondary-section {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.doc-secondary-header {
    position: relative;
    width: 100%;
    height: 55px;
    overflow: hidden;
}

.doc-secondary-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-secondary-header h3 {
    position: absolute;
    bottom: 10px;
    left: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    margin: 0;
}

/* Placeholder pour les onglets vides */
.doc-placeholder {
    text-align: center;
    padding: 100px 20px;
    color: #999;
    font-size: 18px;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media screen and (max-width: 1200px) {
    .doc-products-grid,
    .doc-secondary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .doc-main {
        padding-top: 80px;
    }
    
    .doc-tabs {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
    
    .doc-tab {
        font-size: 14px;
    }
    
    .doc-download-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .doc-products-grid,
    .doc-secondary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .doc-product-header,
    .doc-secondary-header {
        height: 50px;
    }
}

@media screen and (max-width: 480px) {
    .doc-container {
        padding: 20px 15px;
    }
    
    .doc-tabs {
        gap: 10px;
    }
    
    .doc-tab {
        font-size: 12px;
        padding: 8px 3px;
    }
    
    .doc-name {
        font-size: 12px;
    }
    
    .doc-download-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .doc-products-grid,
    .doc-secondary-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-product-header,
    .doc-secondary-header {
        height: 45px;
    }
}

/* ==============================
   MODAL FORMULAIRE DOCUMENTATION
   ============================== */

.doc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.doc-modal-overlay.active {
    display: flex;
}

.doc-modal {
    background: #fff;
    width: 90%;
    max-width: 440px;
    border-radius: 4px;
    padding: 35px 35px 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.doc-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

.doc-modal-close:hover {
    color: #333;
}

.doc-modal-intro {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    margin: 0 0 25px 0;
    padding-right: 20px;
}

.doc-hidden-field {
    display: none;
}

.doc-form-group {
    margin-bottom: 18px;
}

.doc-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.doc-form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.doc-form-group input:focus {
    outline: none;
    border-color: #2a6b5a;
}

.doc-form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0 8px;
}

.doc-form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #2a6b5a;
}

.doc-form-check label {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    cursor: pointer;
}

.doc-terms-link {
    color: #333;
    text-decoration: underline;
}

.doc-terms-link:hover {
    color: #2a6b5a;
}

.doc-form-required {
    font-size: 12px;
    color: #c5a55a;
    margin: 10px 0 20px;
}

.doc-form-submit {
    width: 100%;
    padding: 14px;
    background: #c5a55a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.3s ease;
    letter-spacing: 0.5px;
}

.doc-form-submit:hover {
    background: #b0923e;
}

@media screen and (max-width: 480px) {
    .doc-modal {
        padding: 25px 20px 20px;
        width: 95%;
    }
    
    .doc-modal-intro {
        font-size: 13px;
    }
}
