/*
 Theme Name: Historiqa theme
 Template: generatepress
 Author: Rachid Laborantin
 Author URI: https://rachidlaborantin.xyz
 Description: A personal theme derived from generatepress theme.
 Version: 1.0
*/


/* Application globale */
body {
    font-family: 'MomoTrustSans', sans-serif;
}

/* Transparent header variant */
.site-header.header-transparent {
  background: transparent;
  box-shadow: none;
  position: absolute; /* sits over hero section */
}

/* Transparent header links */
.site-header.header-transparent .nav-link {
  color: #ffffff; /* white text over hero image */
}

.site-header.header-transparent .nav-link:hover {
  color: var(--color-secondary, #3b82f6);
}

body {
  margin: 0 !important;
  padding: 0 !important;
}

.site-content,
.site-main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* ================================================
   REUSABLE FORM DIALOG STYLES
   ================================================ */

/* Prevent body scroll when dialog is open */
body.dialog-open {
    overflow: hidden;
}

/* Dialog Overlay */
.historiqa-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.historiqa-form-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Dialog Container */
.historiqa-form-dialog {
    background: var(--color-white);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.historiqa-form-overlay.active .historiqa-form-dialog {
    transform: scale(1) translateY(0);
}

/* Close Button */
.form-dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gray);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.form-dialog-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
}

/* Dialog Content */
.form-dialog-content {
    padding: 40px;
}

/* Dialog Header */
.form-dialog-header {
    margin-bottom: 30px;
}

.form-dialog-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'MomoTrustSans', sans-serif;
    color: var(--color-primary);
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.form-dialog-description {
    font-size: 1rem;
    color: var(--color-gray);
    margin: 0;
    line-height: 1.6;
}

/* Form Styles */
.historiqa-reusable-form .form-group {
    margin-bottom: 20px;
}

.historiqa-reusable-form label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.historiqa-reusable-form .required {
    color: var(--color-secondary);
}

.historiqa-reusable-form input[type="text"],
.historiqa-reusable-form input[type="email"],
.historiqa-reusable-form input[type="tel"],
.historiqa-reusable-form select,
.historiqa-reusable-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'MomoTrustSans', sans-serif;
}

.historiqa-reusable-form input:focus,
.historiqa-reusable-form select:focus,
.historiqa-reusable-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.historiqa-reusable-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Messages */
.form-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message strong {
    font-weight: 600;
}

/* Submit Button */
.form-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'MomoTrustSans', sans-serif;
    border: none;
    border-radius: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-submit-btn:hover:not(:disabled) {
    background: var(--color-tertiary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 36, 78, 0.3);
}

.form-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-submit-btn .btn-loader svg {
    width: 20px;
    height: 20px;
}

/* Form Trigger Button (for pages) */
.historiqa-form-trigger {
    display: inline-block;
    padding: 14px 32px;
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'MomoTrustSans', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.historiqa-form-trigger:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 36, 78, 0.2);
    color: var(--color-white);
}

/* ================================================
   CONTACT PAGE FORM STYLES
   ================================================ */

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'MomoTrustSans', sans-serif;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.contact-form .submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'MomoTrustSans', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.contact-form .submit-btn:hover:not(:disabled) {
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 36, 78, 0.3);
}

.contact-form .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .historiqa-form-overlay {
        padding: 10px;
    }
    
    .historiqa-form-dialog {
        border-radius: 16px;
        max-height: 95vh;
    }
    
    .form-dialog-content {
        padding: 30px 24px;
    }
    
    .form-dialog-title {
        font-size: 1.5rem;
        margin-right: 40px;
    }
    
    .form-dialog-close {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .form-dialog-content {
        padding: 24px 20px;
    }
    
    .form-dialog-title {
        font-size: 1.3rem;
    }
    
    .historiqa-reusable-form input,
    .historiqa-reusable-form select,
    .historiqa-reusable-form textarea {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    .form-submit-btn {
        padding: 14px 28px;
        font-size: 1rem;
    }
}