/*
 * Feuille de style commune - header/footer applicatif partagé
 * (public/partials/header.php et public/partials/footer.php)
 * Basée sur le style de dashboard.php.
 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

a { color: inherit; }

.container { max-width: 1000px; margin: 0 auto; padding: 20px; }

/* Header applicatif */
.header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.logo { color: #1DA1F2; font-size: 24px; font-weight: bold; text-decoration: none; }
.user-info { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.credits { background: #1DA1F2; color: white; padding: 8px 16px; border-radius: 20px; font-weight: bold; text-decoration: none; display: inline-block; }
.credits:hover { background: #1a91da; }
.nav-link, .logout { color: #666; text-decoration: none; }
.nav-link:hover, .logout:hover { color: #1DA1F2; }
.user-email { color: #999; font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Picto compte + menu déroulant */
.account-menu { position: relative; }
.account-toggle { display: none; }
.account-icon { display: inline-block; font-size: 20px; line-height: 1; cursor: pointer; user-select: none; }
.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    padding: 8px 0;
    z-index: 20;
}
.account-dropdown a { display: block; padding: 10px 16px; font-size: 14px; color: #333; text-decoration: none; }
.account-dropdown a:hover { background: #f5f5f5; color: #1DA1F2; }
.account-toggle:checked ~ .account-dropdown { display: block; }

/* Nav centrale desktop */
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav .nav-link { font-weight: 600; }

/* Hamburger mobile (masqué en desktop) */
.nav-toggle { display: none; }
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}
.hamburger span { display: block; height: 2px; width: 100%; background: #333; border-radius: 2px; }
.btn-small {
    background: #1DA1F2;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}
.btn-small:hover { background: #1a91da; }
.lang-selector select { padding: 6px 10px; border-radius: 6px; border: 1px solid #ddd; cursor: pointer; background: white; }

/* Boutons génériques */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #1DA1F2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-right: 10px;
    font-weight: bold;
}
.btn:hover { background: #1a91da; }
.btn-secondary { background: #17BF63; }
.btn-secondary:hover { background: #149652; }

/* Footer applicatif */
.site-footer {
    background: white;
    padding: 30px 0;
    border-top: 1px solid #eee;
    margin-top: 60px;
    text-align: center;
    color: #666;
}
.site-footer a { color: #1DA1F2; text-decoration: none; margin: 0 12px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin-top: 15px; }

/* Carte cliquable (ex: encart crédits du dashboard) */
.card-link { display: block; text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); }

/* Sections de contenu (landing, features.php) */
.landing-section { padding: 80px 40px; }
.landing-section-alt { background: #f8f9fa; }
.section-content { max-width: 1200px; margin: 0 auto; }
.section-content h2 { font-size: 36px; text-align: center; margin-bottom: 60px; color: #333; }

/* How it works */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { text-align: center; padding: 30px; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: #1DA1F2; color: white; border-radius: 50%; font-size: 24px; font-weight: bold; margin-bottom: 20px; }
.step h3 { font-size: 22px; margin-bottom: 15px; color: #333; }
.step p { color: #666; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-5px); }
.feature-icon { font-size: 40px; margin-bottom: 15px; }
.feature-card h3 { margin-bottom: 10px; color: #1DA1F2; }
.feature-card p { color: #666; font-size: 14px; }

/* Pricing */
.pricing-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 800px; margin: 0 auto; }
.pricing-card { background: white; padding: 40px; border-radius: 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.pricing-card.featured { border: 3px solid #17BF63; }
.pricing-card h3 { color: #1DA1F2; margin-bottom: 15px; }
.pricing-card .price { font-size: 48px; font-weight: bold; color: #333; margin: 20px 0; }
.pricing-card .price small { font-size: 16px; color: #666; }
.pricing-card p { color: #666; margin-bottom: 25px; }

/* Header applicatif - mobile */
@media (max-width: 768px) {
    .header { padding: 12px 20px; }
    .logo img { height: 28px; }
    .logo > div > div:first-child { font-size: 18px; }
    .logo > div > div:last-child { display: none; }

    .hamburger { display: flex; order: 2; }
    .main-nav, .user-info {
        display: none;
        width: 100%;
        order: 3;
    }
    .nav-toggle:checked ~ .main-nav,
    .nav-toggle:checked ~ .user-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid #eee;
    }

    .how-steps, .features-grid, .pricing-cards { grid-template-columns: 1fr; }

    .account-dropdown { left: 0; right: auto; }
}
