/* ==========================================================================
   CodingHero Custom WordPress Styles
   Toutes les modifications liées à WordPress (404, widgets, WPForms, etc.)
   Ne pas toucher desktop.css et responsive.css du thème original HTML
   ========================================================================== */

/* ==========================================================================
   404 Error Page - Simple & Clean
   ========================================================================== */

.error-404-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 20px 80px;
    background: #f8f9fa;
}

.error-404-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Hide footer on 404 page */
body.error404 .footer {
    display: none;
}

/* Responsive 404 */
@media (max-width: 768px) {
    .error-404-wrapper {
        padding: 120px 20px 60px;
    }
}

/* ==========================================================================
   WPForms Styling
   ========================================================================== */

/* Inputs, Textarea, Select - Style personnalisé */
body .wpforms-form input[type="text"],
body .wpforms-form input[type="email"],
body .wpforms-form input[type="tel"],
body .wpforms-form input[type="url"],
body .wpforms-form input[type="password"],
body .wpforms-form input[type="number"],
body .wpforms-form textarea,
body .wpforms-form select {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
    background-color: #fff;
}

body .wpforms-form input[type="text"]:focus,
body .wpforms-form input[type="email"]:focus,
body .wpforms-form input[type="tel"]:focus,
body .wpforms-form input[type="url"]:focus,
body .wpforms-form input[type="password"]:focus,
body .wpforms-form input[type="number"]:focus,
body .wpforms-form textarea:focus,
body .wpforms-form select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submit Button - Sans !important avec sélecteurs plus spécifiques */
body .wpforms-form .wpforms-submit,
body div.wpforms-container-full .wpforms-form button[type="submit"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    height: auto;
    cursor: pointer;
}

body .wpforms-form .wpforms-submit:hover,
body div.wpforms-container-full .wpforms-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Icon dans le bouton - bi-envelope-fill (F6C0) */
body .wpforms-form .wpforms-submit::before,
body div.wpforms-container-full .wpforms-form button[type="submit"]::before {
    font-family: 'bootstrap-icons';
    content: "\F6C0";
    font-size: 1.1rem;
}

/* ==========================================================================
   Footer Legal Links
   ========================================================================== */

.footer-legal .hover-underline {
    transition: all 0.3s ease;
}

.footer-legal .hover-underline:hover {
    text-decoration: underline;
    color: #fff;
}

/* ==========================================================================
   Page Template Styling
   ========================================================================== */

.page-wrapper {
    padding: 120px 0 80px;
    min-height: 100vh;
    background: #f8f9fa;
}

.breadcrumb-wrapper {
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

/* Yoast Breadcrumb Styling */
.breadcrumb-wrapper a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-wrapper a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-wrapper .breadcrumb_last {
    color: #6b7280;
}

.page-content {
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.page-header {
    border-bottom: 3px solid #2563eb;
    padding-bottom: 1.5rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.page-entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #374151;
}

.page-entry-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-entry-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-entry-content p {
    margin-bottom: 1.25rem;
}

.page-entry-content ul,
.page-entry-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.page-entry-content li {
    margin-bottom: 0.5rem;
}

.page-entry-content a {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.page-entry-content a:hover {
    color: #1d4ed8;
}

/* Responsive Page Template */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 100px 0 60px;
    }
    
    .page-content {
        padding: 2rem 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Futures modifications WordPress ici
   ========================================================================== */

/* Navbar Focus Outline */
.navbar-brand:focus,
.navbar-brand:focus-visible,
.navbar-toggler:focus,
.navbar-toggler:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Bootstrap Icons - Force font-display swap */
@font-face {
    font-family: "bootstrap-icons";
    src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff2") format("woff2"),
         url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff") format("woff");
    font-display: swap;
}

/* Project Image Background Position */
.project-image {
    background-position: top center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* Skeleton Loader for Projects - Dark theme */
.projects-skeleton {
    display: contents;
}

.project-card.skeleton {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-text:last-of-type {
    width: 85%;
}

.skeleton-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skeleton-tags span {
    height: 24px;
    width: 60px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Fade in animation for loaded projects */
.project-item {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
