/**
 * RUNLABS Terms and Conditions - Shortcodes Styles
 * 
 * Mise en page uniforme pour CGU, CGV et Politique de Confidentialité
 * 
 * @package Runlabs_Terms
 * @version 1.0.5
 */

/* ==========================================================================
   Container principal
   ========================================================================== */

.runlabs-terms-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 40px 50px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.7;
    color: #334155;
    font-size: 14px; /* Base: 16px - 2 = 14px */
}

/* ==========================================================================
   Titres (tous réduits de 2 points)
   ========================================================================== */

.runlabs-terms-content h1 {
    font-size: 1.75em; /* Était 2em (~32px), maintenant ~28px */
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.runlabs-terms-content h2 {
    font-size: 1.35em; /* Était 1.5em (~24px), maintenant ~22px */
    font-weight: 600;
    color: #1e293b;
    margin: 35px 0 20px 0;
    padding: 0;
    line-height: 1.4;
}

.runlabs-terms-content h3 {
    font-size: 1.1em; /* Était 1.2em (~19px), maintenant ~17px */
    font-weight: 600;
    color: #334155;
    margin: 25px 0 15px 0;
    padding: 0;
    line-height: 1.4;
}

.runlabs-terms-content h4 {
    font-size: 1em; /* Était 1.1em (~18px), maintenant ~16px */
    font-weight: 600;
    color: #475569;
    margin: 20px 0 10px 0;
    padding: 0;
    line-height: 1.4;
}

/* Premier h1 ou h2 sans marge top */
.runlabs-terms-content > h1:first-child,
.runlabs-terms-content > h2:first-child {
    margin-top: 0;
}

/* ==========================================================================
   Sous-titre et date
   ========================================================================== */

.runlabs-terms-content > p:first-of-type {
    font-size: 0.95em; /* Était 1em, maintenant ~13px */
    color: #64748b;
    margin-bottom: 5px;
}

.runlabs-terms-content > p:nth-of-type(2) {
    font-style: italic;
    color: #64748b;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   Paragraphes
   ========================================================================== */

.runlabs-terms-content p {
    margin: 0 0 15px 0;
    text-align: justify;
    font-size: 1em; /* Hérite de 14px */
}

.runlabs-terms-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Listes
   ========================================================================== */

.runlabs-terms-content ul,
.runlabs-terms-content ol {
    margin: 15px 0 15px 25px;
    padding: 0;
    font-size: 1em; /* Hérite de 14px */
}

.runlabs-terms-content li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.runlabs-terms-content li:last-child {
    margin-bottom: 0;
}

/* Listes imbriquées */
.runlabs-terms-content ul ul,
.runlabs-terms-content ol ol,
.runlabs-terms-content ul ol,
.runlabs-terms-content ol ul {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* ==========================================================================
   Tableaux
   ========================================================================== */

.runlabs-terms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9em; /* Était 0.95em (~15px), maintenant ~13px */
}

.runlabs-terms-content table th,
.runlabs-terms-content table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #e2e8f0;
    vertical-align: top;
}

.runlabs-terms-content table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    width: 30%;
}

.runlabs-terms-content table td {
    background: #ffffff;
}

.runlabs-terms-content table tr:hover td {
    background: #f8fafc;
}

/* ==========================================================================
   Liens
   ========================================================================== */

.runlabs-terms-content a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.runlabs-terms-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ==========================================================================
   Citations et définitions
   ========================================================================== */

.runlabs-terms-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    font-style: italic;
    color: #475569;
    font-size: 0.95em; /* ~13px */
}

.runlabs-terms-content strong {
    font-weight: 600;
    color: #1e293b;
}

/* Définitions (format « Terme » : définition) */
.runlabs-terms-content p strong:first-child {
    color: #1e293b;
}

/* ==========================================================================
   Code et éléments techniques
   ========================================================================== */

.runlabs-terms-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
    font-size: 0.85em; /* Était 0.9em, maintenant ~12px */
    color: #475569;
}

/* ==========================================================================
   Séparateurs
   ========================================================================== */

.runlabs-terms-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 30px 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 768px) {
    .runlabs-terms-content {
        padding: 25px 20px;
        margin: 15px 0;
        font-size: 13px; /* Était 14px - 1 pour mobile */
    }
    
    .runlabs-terms-content h1 {
        font-size: 1.5em; /* Était 1.6em */
    }
    
    .runlabs-terms-content h2 {
        font-size: 1.2em; /* Était 1.3em */
    }
    
    .runlabs-terms-content h3 {
        font-size: 1em; /* Était 1.1em */
    }
    
    .runlabs-terms-content table {
        font-size: 0.8em; /* Était 0.85em */
    }
    
    .runlabs-terms-content table th,
    .runlabs-terms-content table td {
        padding: 10px;
    }
    
    .runlabs-terms-content table th {
        width: 35%;
    }
}

@media screen and (max-width: 480px) {
    .runlabs-terms-content {
        padding: 20px 15px;
        border-radius: 6px;
        font-size: 12px; /* Encore plus petit sur très petit écran */
    }
    
    .runlabs-terms-content h1 {
        font-size: 1.3em; /* Était 1.4em */
    }
    
    .runlabs-terms-content h2 {
        font-size: 1.1em; /* Était 1.2em */
    }
    
    /* Tableaux responsive */
    .runlabs-terms-content table,
    .runlabs-terms-content thead,
    .runlabs-terms-content tbody,
    .runlabs-terms-content th,
    .runlabs-terms-content td,
    .runlabs-terms-content tr {
        display: block;
    }
    
    .runlabs-terms-content table th {
        width: 100%;
        background: #f1f5f9;
        font-weight: 600;
    }
    
    .runlabs-terms-content table td {
        border-top: none;
    }
    
    .runlabs-terms-content table tr {
        margin-bottom: 15px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        overflow: hidden;
    }
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {
    .runlabs-terms-content {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        font-size: 11pt; /* Taille print standard */
    }
    
    .runlabs-terms-content h1 {
        font-size: 16pt;
    }
    
    .runlabs-terms-content h2 {
        font-size: 14pt;
    }
    
    .runlabs-terms-content h3 {
        font-size: 12pt;
    }
    
    .runlabs-terms-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .runlabs-terms-content a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
