All files / app/components not-found.component.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157                                                                                                                                                                                                                                                                                                                1x        
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
 
@Component({
  selector: 'app-not-found',
  standalone: true,
  imports: [CommonModule, RouterModule],
  template: `
    <div class="not-found-container">
      <div class="not-found-content">
        <div class="error-code">404</div>
        <h1 class="error-title">Page non disponible</h1>
        <p class="error-message">
          Désolé, la page que vous recherchez n'existe pas ou a été déplacée.
        </p>
        <div class="error-actions">
          <button class="home-button" routerLink="/">
            Retour à l'accueil
          </button>
        </div>
      </div>
    </div>
  `,
  styles: [`
    .not-found-container {
      min-height: 70vh;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #7A8B5A;
      padding: 2rem;
      position: relative;
      overflow: hidden;
    }
 
    /* Motifs organiques subtils en arrière-plan */
    .not-found-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><defs><pattern id="organicPattern404" x="0" y="0" width="150" height="150" patternUnits="userSpaceOnUse"><path d="M75,20 Q85,30 90,40 Q95,50 90,60 Q85,70 75,65 Q65,70 60,60 Q55,50 60,40 Q65,30 75,20 Z" fill="none" stroke="rgba(107,122,74,0.4)" stroke-width="0.4"/><circle cx="40" cy="40" r="12" fill="none" stroke="rgba(107,122,74,0.35)" stroke-width="0.3"/><circle cx="110" cy="40" r="15" fill="none" stroke="rgba(107,122,74,0.4)" stroke-width="0.35"/><circle cx="75" cy="100" r="18" fill="none" stroke="rgba(107,122,74,0.3)" stroke-width="0.3"/><path d="M20,75 Q35,65 50,75 Q65,85 80,75 Q95,65 110,75 Q125,85 130,75" fill="none" stroke="rgba(107,122,74,0.3)" stroke-width="0.25"/></pattern></defs><rect width="100%" height="100%" fill="url(%23organicPattern404)"/></svg>');
      background-size: 300px 300px;
      opacity: 0.4;
      z-index: 0;
    }
 
    .not-found-content {
      text-align: center;
      max-width: 600px;
      padding: 3rem 2rem;
      background: white;
      border-radius: 16px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
      position: relative;
      z-index: 1;
    }
 
    .error-code {
      font-size: 8rem;
      font-weight: 800;
      color: var(--secondary-green);
      line-height: 1;
      margin-bottom: 1rem;
      background: linear-gradient(135deg, var(--secondary-green), #81c784);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
 
    .error-title {
      font-size: 2.5rem;
      font-weight: 700;
      color: var(--dark-gray);
      margin-bottom: 1rem;
    }
 
    .error-message {
      font-size: 1.2rem;
      color: var(--dark-gray);
      opacity: 0.8;
      margin-bottom: 2.5rem;
      line-height: 1.6;
    }
 
    .error-actions {
      display: flex;
      justify-content: center;
      gap: 1rem;
    }
 
    .home-button {
      background: var(--secondary-green);
      color: white;
      border: none;
      padding: 1rem 2.5rem;
      border-radius: 12px;
      font-size: 1.1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
      display: inline-block;
    }
 
    .home-button:hover {
      background: #45a049;
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    }
 
    @media (max-width: 768px) {
      .not-found-content {
        padding: 2rem 1.5rem;
      }
 
      .error-code {
        font-size: 5rem;
      }
 
      .error-title {
        font-size: 2rem;
      }
 
      .error-message {
        font-size: 1rem;
      }
 
      .home-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
      }
    }
 
    @media (max-width: 480px) {
      .error-code {
        font-size: 4rem;
      }
 
      .error-title {
        font-size: 1.6rem;
      }
 
      .error-message {
        font-size: 0.95rem;
      }
    }
  `]
})
export class NotFoundComponent {
}