/*
 Utilitaires globaux: typographie, espacements, layout, bords, gradients
 Dépend de: style.css (variables CSS)
*/

/* Gradients utilitaires */
.gradient-primary { background: var(--gradient-primary); }
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Espacements */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.p-4  { padding: var(--space-4); }
.p-8  { padding: var(--space-8); }

/* Typographie utilitaire */
.text-center   { text-align: center; }
.text-primary  { color: var(--text-primary); }
.text-secondary{ color: var(--text-secondary); }
.text-muted    { color: var(--text-muted); }
.text-accent   { color: var(--accent); }

.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-base{ font-size: var(--text-base); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

.font-light     { font-weight: var(--font-weight-light); }
.font-normal    { font-weight: var(--font-weight-normal); }
.font-medium    { font-weight: var(--font-weight-medium); }
.font-semibold  { font-weight: var(--font-weight-semibold); }
.font-bold      { font-weight: var(--font-weight-bold); }

/* Layout utilitaire */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-8 { gap: var(--space-8); }

/* Conteneurs */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.container-full {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
}

.container-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Bordures utilitaires */
.rounded-sm  { border-radius: var(--radius-sm); }
.rounded-md  { border-radius: var(--radius-md); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-xl  { border-radius: var(--radius-xl); }
.rounded-full{ border-radius: var(--radius-full); }

/* ===== SMOOTH SCROLL ===== */
html, .smooth-scroll { scroll-behavior: smooth; }

/* ===== ACCESSIBILITÉ ===== */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* === CONTENU PRINCIPAL (déplacé depuis style.css) === */
.site-main {
    /* Marge dynamique: hauteur du header + 16px */
    padding: var(--space-4) 0;
    background: var(--background);
    min-height: calc(100vh - 140px);
}

/* ========================================
   BLOG TEMPLATE UTILS (template-blog.php)
   Styles génériques réutilisables
======================================== */

/* En-tête de page générique (titre + description) */
.page-header {
    margin: var(--spacing-8) 0 var(--spacing-6);
    padding: var(--spacing-6) var(--spacing-6);
    border-radius: var(--radius-xl);
}

.page-title {
    margin: 0 0 var(--spacing-2) 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #ffffff;
}

.page-description {
    margin: 0;
    color: #b4b4b8;
    font-size: var(--font-size-base);
}

/* Contenu blog */
.content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-6);
    margin-top: 120px;
}

/* État aucun article */
.no-posts { 
    margin: var(--spacing-8) auto; 
    max-width: 900px; 
}

.no-posts-content { 
    text-align: center; 
    padding: var(--spacing-8); 
}

@media (max-width: 768px) {
    .page-header { padding: var(--spacing-5); margin: var(--spacing-6) 0 var(--spacing-4); }
    .content-area { padding: 0 var(--spacing-4); }
}

/* === Migrated from assets/css/components.css: global transitions and sr-only === */
* { transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ===== RESPONSIVE LAYOUT (déplacé depuis style.css) ===== */
/* Écrans moyens-larges (lg: 1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .container { padding: 0; }
}

/* Mobiles larges et tablettes (max-width: 768px) */
@media (max-width: 768px) {
    .container { padding: 0; }
    .container-full { padding: 0; }
    .site-main { padding: var(--space-0) 0; }
}

/* Mobiles compacts (max-width: 480px) */
@media (max-width: 480px) {
    .container { padding: 0; }
    .container-full { padding: 0; }
    .site-main { padding: var(--space-0) 0; }
}

/* ===== ACCESSIBILITÉ (déplacé depuis style.css) ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .scroll-indicator-hero { display: none; }
}
