/*
 * Components CSS - Thème Perso
 * Description: Composants communs et réutilisables utilisés sur plusieurs pages
 * Version: 2.0.0
 * Auteur: Perso
 * 
 * Note: Les variables CSS sont chargées automatiquement via functions.php
 * avant ce fichier, donc toutes les variables sont disponibles.
 */

/* =========================
==================
   STYLES DE BASE - ÉLÉMENTS FONDAMENTAUX
   =========================================== */

/* Typography de base */
body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    color: var(--black);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

h5 {
    font-size: 1.1rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

/* Liens de base */
a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: none;
}

/* Liens avec icônes - pas de soulignement */
a[class*="social"], 
a[aria-label*="Social"],
.social-link,
.icon-link,
a .fa,
a .fas,
a .far,
a .fab {
    text-decoration: none !important;
}

/* Screen reader only class */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Utility classes */
.white-text {
    color: white !important;
}

/* ===========================================
   LOGO COMMUN (utilisé header + footer)
   =========================================== */

.logo {
    flex-shrink: 0 !important;
}

.logo-img,
.footer-logo-img {
    height: 55px !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

.logo-img:hover,
.footer-logo-img:hover {
    transform: scale(1.05) !important;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo-img {
        height: 45px !important;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 40px !important;
    }
}

/* ===========================================
   LAYOUT - CONTAINERS (utilisé partout)
   =========================================== */

/* Container principal - utilisé sur TOUTES les pages */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================================
   TITRES COMMUNS (utilisés sur plusieurs pages)
   =========================================== */

/* Titre avec style "étiquette" - utilisé sur secteurs, tarifs, services, a-propos, mentions-legales */
.label-title {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    background-color: transparent;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight:normal;
    line-height: 1;
    cursor: default;
    width: fit-content;
}

/* ===========================================
   BOUTONS COMMUNS (utilisés sur plusieurs pages)
   =========================================== */

/* Boutons de base - utilisés sur secteurs et autres */
.btn {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    font-family: var(--font-family);
    cursor: pointer;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

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

.btn-secondary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Boutons spécialisés communs */
.btn-signin {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
}

.btn-signin:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
    padding: 10px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
}

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

.btn-contact {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

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

/* ===========================================
   CARDS COMMUNES (utilisées sur plusieurs pages)
   =========================================== */

/* Structure de base des cards */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 30px;
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--black);
    margin-bottom: 20px;
    line-height: 1.2;
}

.card-description {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.card-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.card-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===========================================
   SECTIONS CTA COMMUNES (utilisées sur plusieurs pages)
   =========================================== */

/* Section Call-to-Action - utilisée sur secteurs, tarifs */
.cta-section {
    background: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.3;
    font-family: var(--font-family);
}

.cta-description {
    margin-bottom: 40px;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
    font-family: var(--font-family);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* ===========================================
   GRILLES ET LAYOUTS COMMUNS
   =========================================== */

/* Grille pour tarifs - 3 colonnes */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Grille services - responsive */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

/* Layout flex centré */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* ===========================================
   SECTIONS COMMUNES
   =========================================== */

/* Titre de section standard */
.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 30px;
    text-align: center;
    font-family: var(--font-family);
}

/* Espacement des sections */
.section {
    padding: 80px 0;
}

.section-light {
    background-color: var(--bg-light);
}

.section-white {
    background-color: var(--white);
}

/* ===========================================
   ÉLÉMENTS DE PRIX (utilisés sur tarifs)
   =========================================== */

.price {
    margin-bottom: 15px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-unit {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 5px;
}

/* ===========================================
   FEATURES/CARACTÉRISTIQUES (utilisées sur tarifs)
   =========================================== */

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 16px;
}

.feature span {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===========================================
   BOUTON BACK TO TOP (utilisé sur toutes les pages)
   =========================================== */

/* Bouton Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    box-shadow: 0 4px 20px rgba(202, 151, 36, 0.4);
    /* Amélioration pour les interactions tactiles */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* S'assurer que l'icône dans le bouton back-to-top s'affiche */
.back-to-top i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    color: var(--white);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(202, 151, 36, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px) scale(0.95);
    transition: all 0.1s ease;
}

/* ===========================================
   RESPONSIVE - ADAPTATIONS MOBILES
   =========================================== */

/* Tablettes */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
        min-width: 140px;
    }
    
    .btn-signin,
    .btn-login {
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .btn-contact {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .page-title,
    .title,
    .btn-title,
    .portfolio-title,
    .pricing-title {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .pricing-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .price-amount {
        font-size: 2rem;
    }
    
    /* Back to Top responsive */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        font-size: 18px;
        z-index: 1001;
        box-shadow: 0 6px 25px rgba(202, 151, 36, 0.5);
    }
    
    .back-to-top:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 8px 30px rgba(202, 151, 36, 0.7);
    }
    
    .back-to-top:active {
        transform: translateY(-1px) scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .back-to-top.visible {
        transform: translateY(0) scale(1);
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .btn-signin,
    .btn-login {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .btn-contact {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .page-title,
    .title,
    .btn-title,
    .portfolio-title,
    .pricing-title {
        font-size: 0.95rem;
        padding: 6px 18px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card-header {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .card-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .flex-between {
        flex-direction: column;
        gap: 15px;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
    
    .feature {
        gap: 8px;
    }
    
    .feature span {
        font-size: 0.9rem;
    }
    
    /* Back to Top responsive mobile */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 16px;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 20px rgba(202, 151, 36, 0.4);
    }
    
    .back-to-top:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 25px rgba(202, 151, 36, 0.6);
    }
    
    .back-to-top:active {
        transform: translateY(0) scale(0.9);
        transition: all 0.1s ease;
    }
    
    .back-to-top.visible {
        transform: translateY(0) scale(1);
    }
}

/* Très petits écrans */
@media (max-width: 375px) {
    .back-to-top {
        bottom: 12px;
        right: 12px;
        width: 45px;
        height: 45px;
        font-size: 15px;
        box-shadow: 0 3px 15px rgba(202, 151, 36, 0.4);
    }
    
    .back-to-top:hover {
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 5px 20px rgba(202, 151, 36, 0.5);
    }
    
    .back-to-top:active {
        transform: scale(0.88);
    }
}

/* Support pour les écrans à haute densité */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .back-to-top {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

