/* ============================================================
   ADDITIONS À INTÉGRER DANS styles.css — Groupe SORPS
   Audit Sécurité / RGPD / Performance — Février 2026
   ============================================================ */

/* -----------------------------------------------------------
   0. ATTRIBUT HTML hidden — forcer display:none même si le CSS
      déclare display:flex/grid (sinon la modale s'affiche au chargement)
   ----------------------------------------------------------- */
[hidden] { display: none !important; }


/* -----------------------------------------------------------
   1. FONTS AUTO-HÉBERGÉES (supprimer tout @import Google Fonts)
   ----------------------------------------------------------- */

/* Supprimer cette ligne si elle existe dans votre fichier :
   @import url('https://fonts.googleapis.com/css2?family=...');
*/

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/inter-800.woff2') format('woff2');
}

/* Mettre à jour la déclaration de font dans body */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}


/* -----------------------------------------------------------
   2. ANIMATIONS : prefers-reduced-motion (accessibilité)
   ----------------------------------------------------------- */

/* Envelopper toutes les animations existantes dans ce media query */
@media (prefers-reduced-motion: no-preference) {
  .fade-in-up {
    animation: fadeInUp 0.6s ease-out both;
  }

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

  .animate-on-scroll {
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
}

/* Pour les utilisateurs préférant moins de mouvement */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .animate-on-scroll {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* -----------------------------------------------------------
   3. DELAYS D'ANIMATION (remplace les styles inline)
   ----------------------------------------------------------- */
.hero-stats .stat-item:nth-child(1) { animation-delay: 0.3s; }
.hero-stats .stat-item:nth-child(2) { animation-delay: 0.4s; }
.hero-stats .stat-item:nth-child(3) { animation-delay: 0.5s; }


/* -----------------------------------------------------------
   4. NOTIFICATIONS FORMULAIRE (remplace les alert() natifs)
   ----------------------------------------------------------- */
.form-notif {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid transparent;
}

.form-notif--success {
  background: #f0fff4;
  border-color: #38a169;
  color: #276749;
}

.form-notif--error {
  background: #fff5f5;
  border-color: #e53e3e;
  color: #c53030;
}


/* -----------------------------------------------------------
   5. NOTICE RGPD FORMULAIRE
   ----------------------------------------------------------- */
.rgpd-notice {
  background: #ebf8ff;
  border: 1px solid #bee3f8;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
}

.rgpd-notice p {
  font-size: 0.8rem;
  color: #2c5282;
  line-height: 1.6;
  margin: 0;
}

.rgpd-notice a {
  color: #3182ce;
  font-weight: 600;
}


/* -----------------------------------------------------------
   6. STYLES FOOTER LÉGAL
   ----------------------------------------------------------- */
footer nav a {
  color: inherit;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.2s;
}

footer nav a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* -----------------------------------------------------------
   7. LOGO : le span remplace le H1 dans le header
      (le H1 est maintenant dans la section hero)
   ----------------------------------------------------------- */
.logo {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  /* Conserver le style visuel de l'ancien H1 */
}


/* -----------------------------------------------------------
   8. BUBBLE FLOTTANTE DE CONTACT
   ----------------------------------------------------------- */

/* Bouton bulle fixe en bas à droite */
.contact-bubble {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem 0.85rem 1.1rem;
  background: #c9a84c;
  color: #0a0a08;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-bubble:hover,
.contact-bubble:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px rgba(201, 168, 76, 0.6);
  background: #d9b85c;
  outline: none;
}

.contact-bubble:active {
  transform: translateY(0) scale(0.98);
}

/* Anneau de pulsation (attire l'attention) */
.contact-bubble::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  border: 2px solid rgba(201, 168, 76, 0.5);
  animation: bubblePulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes bubblePulse {
  0%   { opacity: 0.8; transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.18); }
  100% { opacity: 0;   transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-bubble::before { animation: none; }
}

/* Sur mobile : afficher uniquement l'icône */
@media (max-width: 480px) {
  .contact-bubble {
    padding: 1rem;
    border-radius: 50%;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  .contact-bubble-label { display: none; }
}


/* -----------------------------------------------------------
   9. MODAL DE CONTACT
   ----------------------------------------------------------- */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 2rem 7rem 2rem; /* espace au-dessus de la bubble */
}

/* Backdrop semi-transparent */
.contact-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  animation: backdropIn 0.2s ease;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Boîte modale */
.contact-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  background: #111110;
  border: 1px solid #2e2e24;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal-backdrop,
  .contact-modal-box { animation: none; }
}

/* Header de la modale */
.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #2e2e24;
}

.contact-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f5f0e8;
  margin: 0;
}

.contact-modal-close {
  background: none;
  border: none;
  color: #a09880;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color 0.15s;
  font-family: inherit;
}

.contact-modal-close:hover,
.contact-modal-close:focus-visible {
  color: #f5f0e8;
  outline: none;
}

/* Corps de la modale (formulaire) */
#contactForm {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .contact-modal { padding: 0 1rem 7rem 1rem; }
  .modal-form-row { grid-template-columns: 1fr; }
  .contact-modal-box { max-height: 85vh; }
}

.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a09880;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.modal-form-group .required {
  color: #c9a84c;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: #1a1a14;
  border: 1px solid #2e2e24;
  border-radius: 8px;
  color: #f5f0e8;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.modal-form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.modal-form-group textarea {
  resize: vertical;
  min-height: 90px;
}

.modal-form-group input::placeholder,
.modal-form-group textarea::placeholder {
  color: #5a5545;
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* Notice RGPD compacte */
.rgpd-mini {
  font-size: 0.75rem;
  color: #5a5545;
  line-height: 1.5;
  margin: -0.25rem 0 0;
}

.rgpd-mini a {
  color: #a09880;
  text-decoration: underline;
}

.rgpd-mini a:hover {
  color: #c9a84c;
}

/* Bouton d'envoi */
.modal-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: #c9a84c;
  color: #0a0a08;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.25rem;
}

.modal-submit-btn:hover:not(:disabled) {
  background: #d9b85c;
  transform: translateY(-1px);
}

.modal-submit-btn:disabled {
  cursor: not-allowed;
}
