/* ========================================
   SAM – Smart Auto Market | style.css
   ======================================== */

/* ===== Variables globales ===== */
:root {
    --main-bg: #f4faff;
    --primary: #007bff;
    --primary-dark: #0056b3;
    --header-bg: #003366;
    --text-dark: #1a1a1a;
    --text-light: #555;
    --font-main: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/* ===== Reset & base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--main-bg);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 70px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Typo ===== */
h1, h2, h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

p.lead {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 1rem 0 2rem 0;
    text-align: center;
}

/* ===== Boutons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 4px;
}

/* ===== Header ===== */
.site-header {
    background-color: var(--header-bg);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.logo a {
    color: #fff;
    font-size: 1.7rem;
    font-weight: bold;
    text-decoration: none;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 60px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Formulaire grille inscription ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-grid label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-grid input,
.form-grid select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ===== Popup Login ===== */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s ease;
}

.popup-content h2 {
    margin-bottom: 20px;
}

.popup-content label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.popup-content input[type="email"],
.popup-content input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.popup-content input[type="checkbox"] {
    margin-right: 5px;
}

.popup-content .btn {
    width: 100%;
    margin-top: 20px;
}

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

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

.close {
    position: absolute;
    top: 12px;
    right: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: black;
}

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

/* ===== SAM le robot (animation) ===== */
#sam-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 160px;
  z-index: 99999;
  transition: opacity 1s ease;
}

#sam-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

#sam-avatar {
  width: 100%;
  max-width: 160px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .site-header {
        position: relative; /* ✅ Plus de header flottant sur mobile */
        box-shadow: none;   /* Optionnel : retire l'ombre si besoin */
    }

    .header-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        margin-bottom: 10px;
    }

    .btn,
    .btn-small {
        width: 100%;
        text-align: center;
    }

    .popup-content {
        width: 90%;
    }

    body {
        padding-top: 0; /* ✅ On enlève le padding inutile */
    }
}

.plan-selection {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    justify-content: space-around;
    flex-wrap: wrap;
}

.plan-card {
    flex: 1;
    min-width: 280px;
    border: 2px solid #ccc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: #f9f9f9;
    transition: 0.3s ease;
}

.plan-card:hover {
    transform: scale(1.02);
    border-color: #007bff;
}

.plan-card h3 {
    margin-bottom: 10px;
}

.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.plan-card ul li {
    margin-bottom: 8px;
}

.plan-card button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.plan-card.highlight {
    border: 2px solid #ffa500;
    background: #fffbe8;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  max-width: 900px;
  margin: 0 auto;
}

.form-grid label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.form-grid .full-width {
  grid-column: 1 / 3;
}
.payment-summary {
  background: #f5faff;
  border: 1px solid #cce5ff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  max-width: 500px;
}

.payment-form {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
}
/* --- Login Page --- */
.login-page {
  max-width: 400px;
  margin: 50px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-page h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #222;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #444;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.login-form input:focus {
  border-color: #007BFF;
  outline: none;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.login-footer a.forgot-link {
  color: #007BFF;
  text-decoration: none;
}

.login-footer a.forgot-link:hover {
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background-color: #007BFF;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.error-message {
  background-color: #f8d7da;
  color: #842029;
  padding: 10px 15px;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
  margin-bottom: 15px;
}

.register-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.register-link a {
  color: #007BFF;
  text-decoration: none;
}

.register-link a:hover {
  text-decoration: underline;
}
.dashboard-enhanced {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
    position: relative;
}

.welcome-title {
    text-align: center;
    font-size: 2rem;
    color: #102b60;
    margin-bottom: 1rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #143d7a;
}

.card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card ul li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.form-row input {
    flex: 1;
    padding: 0.7rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.btn-primary {
    background: #0066ff;
    color: white;
    padding: 0.7rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.btn-primary:hover {
    background: #0050cc;
}

.badge-lifetime {
    background: #d4edda;
    padding: 0.5rem 1rem;
    border-left: 5px solid #28a745;
    margin-top: 1rem;
    border-radius: 4px;
    color: #155724;
}

.badge-pending {
    background: #fff3cd;
    padding: 0.5rem 1rem;
    border-left: 5px solid #ffc107;
    margin-top: 1rem;
    border-radius: 4px;
    color: #856404;
}

.robot-sam {
    position: absolute;
    bottom: 30px;
    right: 30px;
}
.user-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 30px;
}

/* Popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
}
.popup-content {
  background: white;
  padding: 25px;
  border-radius: 8px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.popup-content h3 {
  margin-top: 0;
}
/* ===== User Dashboard 3 Colonnes Style ===== */
.user-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 40px;
  max-width: 1200px;
  margin: auto;
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 30px;
  transition: transform 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-5px);
}

.dashboard-card h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.3rem;
  color: #143d7a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-card p {
  margin-bottom: 10px;
}

.status-badge {
  margin-top: 15px;
  padding: 10px;
  font-weight: bold;
  border-radius: 6px;
  display: inline-block;
}

.status-lifetime {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

/* Switch Style */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.4s;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider.round {
  background-color: #28a745;
}

input:checked + .slider.round:before {
  transform: translateX(24px);
}

.robot-sam {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  z-index: 9999;
}
/* ===== iPhone Style Switch ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #28a745; /* vert actif */
}

input:focus + .slider {
  box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
  transform: translateX(22px);
}
.badge-lifetime {
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
}
.badge-yearly {
    background: #007bff;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
}
.badge-monthly {
    background: #17a2b8;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
}
.badge-pending {
    background: #ffc107;
    color: black;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
}
/* ===== Navigation ===== */
.navbar ul {
  display: flex;
  gap: 20px;
  list-style: none;
}

.navbar ul li a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

.hamburger {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: white;
}

/* ===== Responsive navbar ===== */
@media (max-width: 768px) {
  .navbar {
    display: none;
    width: 100%;
  }

  .navbar.active {
    display: block;
    background-color: var(--header-bg);
    padding: 10px 0;
  }

  .navbar ul {
    flex-direction: column;
    padding-left: 0;
    margin: 0;
  }

  .navbar ul li {
    padding: 10px 20px;
  }

  .hamburger {
    display: block;
  }
}
/* ===== Hamburger Icon Animation (✕ effect) ===== */
.hamburger {
  width: 30px;
  height: 22px;
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: #fff;
  border-radius: 3px;
  transition: 0.4s ease;
}

/* Animation vers ✕ */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


/* Corrige la duplication dans les médias queries */
@media (max-width: 768px) {
	.navbar {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

  .navbar.active {
    display: block;
    max-height: 100vh;
    overflow-y: auto;
    background-color: var(--header-bg);
    padding: 10px 0;
    z-index: 999;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: auto; 
  }

  .navbar ul {
    flex-direction: column;
    padding: 10px 0;
  }

  .navbar ul li {
    padding: 10px 20px;
  }
}
/* Boîte de contact personnalisée */
.container.contact-box {
  max-width: 600px;
  margin: 60px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.06);
}
/* style.css */

.btn-select {
    background-color: #007bff;  /* même couleur que les boutons */
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-select:hover {
    background-color: #0056b3;
}

.btn-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.4);
}
/* style.css */

.lang-select {
    background-color: #002b5c;   /* même bleu que le header */
    color: #ffffff;              /* texte blanc */
    border: 1px solid #ffffff;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;            /* enlève le style natif */
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: background-color 0.3s ease;
}

.lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
}

.lang-select option {
    background-color: #002b5c;  /* fond déroulant */
    color: #ffffff;             /* texte des options blanc */
}
