/**
 * GHA Public Pages — Styles partagés
 * Pages publiques : Contact, CGV, Mentions légales, etc.
 * Préfixes : .gha-pp-* (layout partagé), .gha-contact-* (spécifique contact)
 *
 * @package GHA\Theme
 */


/* ==========================================================================
   CSS Variables — GHA Design System v2
   ========================================================================== */
:root {
    --gha-primary: #1e40af;
    --gha-primary-light: #dbeafe;
    --gha-primary-dark: #1e3a8a;
    --gha-text: #1e293b;
    --gha-text-secondary: #64748b;
    --gha-text-light: #94a3b8;
    --gha-border: #e2e8f0;
    --gha-border-hover: #cbd5e1;
    --gha-bg: #f8fafc;
    --gha-white: #ffffff;
    --gha-radius: 12px;
    --gha-radius-sm: 8px;
    --gha-focus-ring: 0 0 0 3px rgba(30, 64, 175, 0.1);
}


/* ==========================================================================
   Base — Scopé sous .gha-pp-page
   ========================================================================== */
.gha-pp-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--gha-text-secondary);
    background: var(--gha-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    padding: 0 16px 64px;
}

.gha-pp-page *,
.gha-pp-page *::before,
.gha-pp-page *::after {
    box-sizing: border-box;
}

.gha-pp-page h1,
.gha-pp-page h2,
.gha-pp-page h3 {
    font-family: 'Sora', sans-serif;
    color: var(--gha-text);
    line-height: 1.2;
    margin: 0;
}

.gha-pp-page a {
    color: var(--gha-primary);
    text-decoration: none;
}

.gha-pp-page a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   PUBLIC PAGES — Layout partagé (.gha-pp-*)
   ========================================================================== */

/* Mini hero */
.gha-pp-hero {
    text-align: center;
    padding: 56px 16px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.gha-pp-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.gha-pp-hero p {
    font-size: 16px;
    color: var(--gha-text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container centré */
.gha-pp-container {
    max-width: 960px;
    margin: 0 auto;
}


/* ==========================================================================
   CONTACT — Layout 2 colonnes
   ========================================================================== */
.gha-contact-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* Card formulaire */
.gha-contact-form-card {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius);
    padding: 32px;
}

/* Groupe de champs côte à côte */
.gha-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Champ individuel */
.gha-contact-field {
    margin-bottom: 20px;
}

.gha-contact-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gha-text);
    margin-bottom: 6px;
}

.gha-contact-field input,
.gha-contact-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--gha-text);
    background: var(--gha-white);
    border: 1.5px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

.gha-contact-field input:focus,
.gha-contact-field textarea:focus {
    border-color: var(--gha-primary);
    box-shadow: var(--gha-focus-ring);
}

.gha-contact-field input::placeholder,
.gha-contact-field textarea::placeholder {
    color: var(--gha-text-light);
    font-size: 13px;
}

.gha-contact-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

/* Bouton envoyer — filled #1e40af, hover = outline inversé */
.gha-contact-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--gha-white);
    background: var(--gha-primary);
    border: 2px solid var(--gha-primary);
    border-radius: var(--gha-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.gha-contact-submit:hover {
    background: transparent;
    color: var(--gha-primary);
}

.gha-contact-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.gha-contact-submit svg {
    transition: transform 0.2s ease;
}

.gha-contact-submit:hover svg {
    transform: translateX(2px);
}


/* ==========================================================================
   CONTACT — Colonne infos
   ========================================================================== */
.gha-contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gha-contact-info-card {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius);
    padding: 28px;
}

.gha-contact-info-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.gha-contact-info-item + .gha-contact-info-item {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gha-border);
}

.gha-contact-info-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: var(--gha-primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gha-primary);
}

.gha-contact-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gha-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gha-contact-info-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--gha-text);
}

.gha-contact-info-value a {
    color: var(--gha-text);
    text-decoration: none;
    transition: color 0.15s;
}

.gha-contact-info-value a:hover {
    color: var(--gha-primary);
    text-decoration: none;
}

/* Carte délai de réponse */
.gha-contact-hours-card {
    background: var(--gha-primary-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--gha-radius);
    padding: 20px 24px;
}

.gha-contact-hours-title {
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-primary-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gha-contact-hours-text {
    font-size: 13px;
    color: var(--gha-primary);
    line-height: 1.6;
}


/* ==========================================================================
   TOAST — Notification succès/erreur
   ========================================================================== */
.gha-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    background: var(--gha-white);
    border-radius: var(--gha-radius-sm);
    padding: 14px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', system-ui, sans-serif;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 380px;
}

.gha-toast.gha-toast-visible {
    transform: translateX(0);
}

.gha-toast-success {
    border-left: 4px solid #22c55e;
    color: #166534;
}

.gha-toast-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.gha-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}


/* ==========================================================================
   HONEYPOT — Champ caché anti-spam
   ========================================================================== */
.gha-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}


/* ==========================================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .gha-pp-hero {
        padding: 40px 16px 28px;
    }

    .gha-pp-hero h1 {
        font-size: 26px;
    }

    .gha-pp-hero p {
        font-size: 15px;
    }

    .gha-contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gha-contact-form-card {
        padding: 24px 20px;
    }

    .gha-contact-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .gha-contact-submit {
        width: 100%;
        justify-content: center;
    }

    .gha-toast {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}


/* ==========================================================================
   LEGAL PAGES — Styles spécifiques (.gha-legal-*)
   ========================================================================== */

/* Mini hero */
.gha-legal-hero {
    text-align: center;
    padding: 48px 16px 32px;
}

.gha-legal-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.gha-legal-date {
    font-size: 14px;
    color: var(--gha-text-light);
}


/* Navigation tabs */
.gha-legal-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 0 24px 24px;
    background: var(--gha-bg);
}

.gha-legal-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--gha-text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.gha-legal-nav a:hover {
    background: var(--gha-white);
    color: var(--gha-text);
    border-color: var(--gha-border);
    text-decoration: none;
}

.gha-legal-nav a.active {
    background: var(--gha-white);
    color: var(--gha-primary);
    border-color: var(--gha-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}


/* Main layout: content + TOC sidebar */
.gha-legal-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 40px;
    align-items: start;
}


/* Content card */
.gha-legal-content {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius);
    padding: 48px 56px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    max-width: 800px;
}

.gha-legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gha-bg);
    scroll-margin-top: 80px;
}

.gha-legal-content h2:first-child {
    margin-top: 0;
}

.gha-legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
}

.gha-legal-content p {
    font-size: 15px;
    color: var(--gha-text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.gha-legal-content ul,
.gha-legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.gha-legal-content li {
    font-size: 15px;
    color: var(--gha-text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.gha-legal-content li strong {
    color: var(--gha-text);
}

.gha-legal-content strong {
    color: var(--gha-text);
    font-weight: 600;
}

.gha-legal-content a {
    color: var(--gha-primary);
    text-decoration: none;
}

.gha-legal-content a:hover {
    text-decoration: underline;
}


/* Tables */
.gha-legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.gha-legal-content th {
    background: var(--gha-bg);
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--gha-text);
    border-bottom: 2px solid var(--gha-border);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gha-legal-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gha-border);
    color: var(--gha-text-secondary);
    line-height: 1.5;
}

.gha-legal-content tr:last-child td {
    border-bottom: none;
}


/* Info blocks (éditeur, hébergeur) */
.gha-legal-info {
    background: var(--gha-bg);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.gha-legal-info p {
    margin-bottom: 6px;
    font-size: 14px;
}

.gha-legal-info p:last-child {
    margin-bottom: 0;
}


/* TOC sidebar */
.gha-legal-toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.gha-legal-toc-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gha-text-light);
    margin-bottom: 12px;
}

.gha-legal-toc a {
    display: block;
    font-size: 13px;
    color: var(--gha-text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-left: 2px solid var(--gha-border);
    transition: all 0.15s ease;
    line-height: 1.4;
}

.gha-legal-toc a:hover {
    color: var(--gha-primary);
    border-left-color: var(--gha-primary);
    background: #f1f5f9;
    text-decoration: none;
}

.gha-legal-toc a.active {
    color: var(--gha-primary);
    border-left-color: var(--gha-primary);
    font-weight: 500;
}


/* LEGAL PAGES — Responsive */
@media (max-width: 991px) {
    .gha-legal-layout {
        grid-template-columns: 1fr;
    }

    .gha-legal-toc {
        display: none;
    }

    .gha-legal-content {
        padding: 32px 24px;
    }

    .gha-legal-hero h1 {
        font-size: 26px;
    }

    .gha-legal-nav {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .gha-legal-nav a {
        white-space: nowrap;
    }
}
